redash
redash copied to clipboard
can not retrieving schema from MSSQL Server
Issue Summary
I get time out error when I want to retrieve the database schema to execute a query and get this error:
{
"job": {
"id": "793ec547-981f-4685-850a-f3636881742f",
"updated_at": 0,
"status": 4,
"error": "b'DB-Lib error message 20009, severity 9:\\nUnable to connect: Adaptive Server is unavailable or does not exist (172.25.143.154)\\nNet-Lib error during Connection timed out (110)\\n'",
"result": null,
"query_result_id": null
}
}
It is worth noting that the connection to the database is also established after a long time. Also, in the firewall and database, access through IP and port is open and the Database is accessible from MSS Management Studio.
Steps to Reproduce
- Install the Redash from wiki instruction Link
- Add MSSQL Database and test connection then try to add and execute query
- Get above error
Technical details:
- Redash Version: 23.12.0-dev (dev)
- Browser/OS: Windows 10 - WSL - Chrome
- How did you install Redash: Install the Redash from wiki instruction Link
Hi @majidebraa,
I checked the query runner for MSSQL and found it gets a DB connection on every call... So, Redash doesn't use an established connection even if it already exists.
- https://github.com/getredash/redash/blob/master/redash/query_runner/mssql.py#L85
- https://github.com/getredash/redash/blob/master/redash/query_runner/mssql.py#L120
Net-Lib error during Connection timed out (110)
I think that for some reason it is not possible to connect to MSSQL when acquiring schema information. I have no idea other than that.
Please let me know if anyone has encountered a similar situation... thank you.
Is this still an issue?
If I recall correctly, a connection timeout can sometimes be cases by an wrongly configured MS SQL Firewall. Can you setup a telnet session from Redash to the MS SQL server? And does the error go away when the firewall is (temporary) disabled?