You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The client would establish a connection successfully when encrypted: true is used.
Actual behaviour:
The client is disconnected, which results in this stack trace at the client:
ConnectionError: Failed to connect to <redacted> - socket hang up
at Connection.<anonymous> (/app/node_modules/mssql/lib/tedious.js:244:17)
at Object.onceWrapper (events.js:313:26)\n at Connection.emit (events.js:223:5)
at Connection.socketError (/app/node_modules/tedious/lib/connection.js:1095:12)
at Connection.socketEnd (/app/node_modules/tedious/lib/connection.js:1118:12)
at Socket.<anonymous> (/app/node_modules/tedious/lib/connection.js:977:14)
at Socket.emit (events.js:228:7)\n at endReadableNT (_stream_readable.js:1185:12)
at processTicksAndRejections (internal/process/task_queues.js:81:21)
On the server, we got this error for the first through third connection attempts:
Error: 17832, Severity: 20, State: 2.
The login packet used to open the connection is structurally invalid; the connection has been closed. Please contact the vendor of the client library. [CLIENT: <redacted>]
On the fourth attempt, we got this error:
Error: 17836, Severity: 20, State: 17.
Length specified in network packet payload did not match number of bytes read; the connection has been closed. Please contact the vendor of the client library. [CLIENT: <redacted>]
This issue began manifesting when we upgraded from node 12.13.1 -> 12.14.1. We've only seen it manifest against this one database, which unfortunately is a third party system that I don't have direct access to. It only manifests when encrypted is set to true. I tried provisioning the closest-versioned RDS instance that's available (Microsoft SQL Server 2016 (SP2-CU11) (KB4527378) - 13.0.5598.27 (X64)), but wasn't able to make the issue manifest against that server either. This appears very similar in nature to (now closed) upstream tediousjs/tedious#923. Based on that, as well as the stack trace, I think this probably belongs upstream in the tedious project, but thought it best to report here first.
SQL Server: Microsoft SQL Server 2016 (SP2-CU12) (KB4536648) - 13.0.5698.0 (X64)
Tedious resolved to 11.3.0 as per yarn.lock.
The text was updated successfully, but these errors were encountered:
torywheelwright
changed the title
"Failure to connect" with encryption enabled on node v12.14.1
"Failed to connect" with encryption enabled on node v12.14.1
Aug 2, 2021
Interesting, as the logic and code for the login packets belongs in the tedious driver, it's not something that I think it directly to do with this library (as you point out). I think it should be opened there.
It might be worth checking if this issue manifests itself when using the tedious driver directly.
Expected behaviour:
The client would establish a connection successfully when
encrypted: true
is used.Actual behaviour:
The client is disconnected, which results in this stack trace at the client:
On the server, we got this error for the first through third connection attempts:
On the fourth attempt, we got this error:
This issue began manifesting when we upgraded from node 12.13.1 -> 12.14.1. We've only seen it manifest against this one database, which unfortunately is a third party system that I don't have direct access to. It only manifests when
encrypted
is set totrue
. I tried provisioning the closest-versioned RDS instance that's available (Microsoft SQL Server 2016 (SP2-CU11) (KB4527378) - 13.0.5598.27 (X64)
), but wasn't able to make the issue manifest against that server either. This appears very similar in nature to (now closed) upstream tediousjs/tedious#923. Based on that, as well as the stack trace, I think this probably belongs upstream in the tedious project, but thought it best to report here first.Configuration:
Software versions
Tedious resolved to 11.3.0 as per yarn.lock.
The text was updated successfully, but these errors were encountered: