[GH-ISSUE #4276] MSSQL connection error #2722

Closed
opened 2026-02-22 18:30:57 -05:00 by yindo · 5 comments
Owner

Originally created by @PederLAB on GitHub (Aug 12, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4276

This issue is simular to #4236 but is for Anythingllm 1.8.4 connecting error to MSSQL 2019 . We can ODBC connection from the Windows running Anythingllm to the other Windows vm running MSSQL 2019. But same username and password is denied inside the Anythingllm 1.8.4 trying to connect to same MSSQL 2019 instance. Unfortunately this is a "Show stopper" for the project. So appreciate any help or workaround.

I see that Microsoft it self has just released an MSSQL MCP server (open source) https://devblogs.microsoft.com/azure-sql/introducing-mssql-mcp-server/ but was hoping to get the built-in Anythingllm SQL-connector to work

Originally created by @PederLAB on GitHub (Aug 12, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4276 This issue is simular to #4236 but is for Anythingllm 1.8.4 connecting error to MSSQL 2019 . We can ODBC connection from the Windows running Anythingllm to the other Windows vm running MSSQL 2019. But same username and password is denied inside the Anythingllm 1.8.4 trying to connect to same MSSQL 2019 instance. Unfortunately this is a "Show stopper" for the project. So appreciate any help or workaround. I see that Microsoft it self has just released an MSSQL MCP server (open source) https://devblogs.microsoft.com/azure-sql/introducing-mssql-mcp-server/ but was hoping to get the built-in Anythingllm SQL-connector to work
yindo added the needs info / can't replicate label 2026-02-22 18:30:57 -05:00
yindo closed this issue 2026-02-22 18:30:57 -05:00
Author
Owner

@timothycarambat commented on GitHub (Aug 12, 2025):

Is the address/host for the MSSQL connection referencing localhost or an internal IP? It could be that the hostname is not resolved in the docker container.

I am assuming you are in Docker since it was not reported in the issue.

@timothycarambat commented on GitHub (Aug 12, 2025): Is the address/host for the MSSQL connection referencing `localhost` or an internal IP? It could be that the hostname is not resolved in the docker container. I am assuming you are in Docker since it was not reported in the issue.
Author
Owner

@PederLAB commented on GitHub (Aug 13, 2025):

Thank you for quick feedback. No this is not with Docker, it is native on Windows. And we use IP not hostname. And we use standard MSSQL 1433 port

@PederLAB commented on GitHub (Aug 13, 2025): Thank you for quick feedback. No this is not with Docker, it is native on Windows. And we use IP not hostname. And we use standard MSSQL 1433 port
Author
Owner

@timothycarambat commented on GitHub (Aug 14, 2025):

Since v1.8.4 we have preflight checks which would indicate that the connection is valid before saving. Assuming this connection was freshly input and not pre-existing from a prior version then that should imply the connection is valid at least.

This is a newly input DB connection, yeah?

@timothycarambat commented on GitHub (Aug 14, 2025): Since [v1.8.4](https://docs.anythingllm.com/changelog/v1.8.4#improvements) we have preflight checks which would indicate that the _connection_ is valid before saving. Assuming this connection was freshly input and not pre-existing from a prior version then that should imply the connection is valid at least. This is a newly input DB connection, yeah?
Author
Owner

@PederLAB commented on GitHub (Aug 16, 2025):

I follow your "Docker lead" and managed on my Windows Laptop to run Anythingllm navtiv on the Windows OS and spin up an MSSQL 2019 in a Docker Container, and managed to connect. But in the Proof of Concept, this is not an option. We need an Win OS native Anythingllm and a Win OS nativ MSSQL 2019 to communicate both on same LAN. I was looking for --verbose flag to start the Anythingllm, but did not see anything.
1 . Do you have any suggestion for more troubleshoot?
2. Is the MCP-server way, the right way thinking forward?
(MSSQL MCP server (open source) https://devblogs.microsoft.com/azure-sql/introducing-mssql-mcp-server/ )

@PederLAB commented on GitHub (Aug 16, 2025): I follow your "Docker lead" and managed on my Windows Laptop to run Anythingllm navtiv on the Windows OS and spin up an MSSQL 2019 in a Docker Container, and managed to connect. But in the Proof of Concept, this is not an option. We need an Win OS native Anythingllm and a Win OS nativ MSSQL 2019 to communicate both on same LAN. I was looking for --verbose flag to start the Anythingllm, but did not see anything. 1 . Do you have any suggestion for more troubleshoot? 2. Is the MCP-server way, the right way thinking forward? (MSSQL MCP server (open source) https://devblogs.microsoft.com/azure-sql/introducing-mssql-mcp-server/ )
Author
Owner

@timothycarambat commented on GitHub (Aug 17, 2025):

We need an Win OS native Anythingllm and a Win OS nativ MSSQL 2019 to communicate both on same LAN

MCP would not solve your issue, because ultimately, your issue is networking, not code. So in this case are you not able to set up a Windows server running MSSQL, then exposing the port properly through the firewall, and check if it that port/privateIP is reachable from another device on LAN?

If so, then all that should be needed is AnythingLLM on the other device and input that same IP/PORT for the LAN MSSQL service. Since you are able to resolve a localhost Docker container where AnythingLLM is on that same system this indicates there is no bug, its just a networking issue on, most likely, the service/computer running the MSSQL server since it cannot resolve.

I don't have enough information for your specific networking configuration to debug it further, but this just sounds like a standard firewall/networking issue. My bet is likely firewall rules on the MSSQL machine blocking incoming requests on the port that is serving MSSQL

@timothycarambat commented on GitHub (Aug 17, 2025): > We need an Win OS native Anythingllm and a Win OS nativ MSSQL 2019 to communicate both on same LAN MCP would not solve your issue, because ultimately, your issue is networking, not code. So in this case are you not able to set up a Windows server running MSSQL, then exposing the port properly through the firewall, and check if it that port/privateIP is reachable from another device on LAN? If so, then all that should be needed is AnythingLLM on the other device and input that same IP/PORT for the LAN MSSQL service. Since you are able to resolve a localhost Docker container where AnythingLLM is on that same system this indicates there is no bug, its just a networking issue on, most likely, the service/computer running the MSSQL server since it cannot resolve. I don't have enough information for your specific networking configuration to debug it further, but this just sounds like a standard firewall/networking issue. My bet is likely firewall rules on the MSSQL machine blocking incoming requests on the port that is serving MSSQL
yindo changed title from MSSQL connection error to [GH-ISSUE #4276] MSSQL connection error 2026-06-05 14:48:10 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#2722