-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mssql ConnectionError #20594
Comments
Alright I found some logs that may be helpful. I created a second project using Node so debugging is easier: For Node v18.16.0, open node_modules/tedious/lib/connection.js#1040 In line 1041 add a console.log -> Back in Deno project, set In line 1041 add a console.log -> Node logs:
Deno logs:
It seems there is a issue when attempting to negotiate the TLS certificate. |
hi @sant123 , i got the same issue, while is not a fix i managed to proceed with |
Could you run:
... and paste the output here? It may be that the underlying cipher supported by the DB engine is not supported by our TLS code. |
|
It looks like the TLS cipher should be supported -- I will make sure that we correctly enable it for our tls library. |
@massalinux Could you run this from Deno 1.38.2, but using the address of your database?
|
@mmastrac here it is
|
Hmm. It looks like the server is not running or is not accessible. Is the docker container running? Can you access it any other way? You maybe need to use 0.0.0.0 as a hostname |
Hi Matt, actually i can connect to that address at that port to SQLServer via mssql (with the encrypt: false option), do you want me to run additional tests? |
Running this code with Deno v1.38.3 const hostname = "localhost";
const port = 1433;
const conn = await Deno.connectTls({ hostname, port });
console.log(await conn.handshake()); My Docker instance: |
These are the logs from the container:
|
I have the same troubles as in #20594 (comment) while connecting to an Azure MS SQL server using mssql library . In node.js, I can connect easily. In deno, when running import mssql from "npm:mssql";
await mssql.connect("Server=abcdef-dev-sql-db.123456.database.windows.net,1433;Database=somedb;User Id=someuser;Password=somepassword"); # I've replaced the actual credentials here with fake ones ofc I get this output:
Testing input:
output:
Output for
@mmastrac let me know if I can help anyhow differently in this. Unfortunately this currently blocks me in using mssql & deno for my project, as I need it to connect to Azure MS SQL :( P.S. My mssql server requires VPN connection. I've got enabled it globally on my OS X. I can connect to mssql server using node.js and DataGrip easily (without the need of preconfiguring any certificates in the connection settings). I tried adding |
Using Deno v1.40.1 now logs the following warnings:
|
Having the exact issue, unable to connect to Azure MSSQL dbs. |
@nathanwhit are you planning on working on this in the near future? |
Just like many others I too am blocked. Unfortunately this is the bug that will force me to ditch Deno as no other possible workaround exists. |
Like many others, I have been waiting for a fix for this. I was hoping that this would work in 2.0, but I'm still getting the exact same errors as I did in 1.4x. I would love to begin to use Deno, but this bug is preventing me from switching. @satyarohith are you planning on addressing this any time soon? |
Trying to convert a Node project to Deno and hitting the same issue. As a last measure, has anyone found a different module that doesn't have this problem ? Or is it something fundumental with the way Deno connects to MSSQL server ? |
@mderazon I couldn't find a workable solution/workaround to this issue and was forced to port out. |
@mderazon Same here I'm afraid. I had to use Node.js instead. I just tried it again with the latest Deno (v2.0.4) and sadly, it still doesn't work. I don't think it's a fundamental Deno issue, "just" a Node.js compatibility issue. I suspect it's possible to write a new Deno-native SQL Server driver, but it's just that no one has (yet). |
I believe that adoption of Deno depends of creators officially support ways to connect to database in platform. They have to learn with elixir community which has all components they need to create anything, sadly functional languages are not good. |
Hi, I'm trying to run this code with mssql:
But I get
Uncaught (in promise) ConnectionError: Failed to connect to localhost:1433 in 15000ms
I decided to do the same with Node v18.16.0 and worked perfectly:
The SQL Server is running inside a Docker container:
I'm using Deno latest version as of today v1.37.0
The text was updated successfully, but these errors were encountered: