question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Connection timeout when connect using ssh tunneling

See original GitHub issue

Currently, I am able to connect to sql server using ssh tunneling using a nodejs package. However I cannot do the same with mssql-cli. The command I tried is:

~ mssql-cli -S "tcp:localhost,1433" -d database -U username -P password

Error message:

Error message: Connection Timeout Expired.  
The timeout period elapsed during the post-login phase.  
The connection could have timed out while waiting for server to complete the login process and respond; 
Or it could have timed out while attempting to create multiple active connections.  
The duration spent while attempting to connect to this server was - 
[Pre-Login] initialization=51; handshake=767; 
[Login] initialization=4; authentication=8; 
[Post-Login] complete=14067;

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
thorstenkampecommented, Sep 29, 2018

Try 127.0.0.1 instead of localhost. That is a known issue with mssql-cli and also sqlcmd.

0reactions
authercommented, Jun 19, 2020

Me too the same issue without corrected yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

strange output on ssh tunneling: output failed; connect failed
If you are tunneling with Firefox through ssh, some http connections can simply timeout due to server load or improper configuration.
Read more >
How to reliably keep an SSH tunnel open? - Super User
The interval specified is in seconds, so you can provide some fine tuning. If your stateful firewall has a 5 minute idle timeout,...
Read more >
"Connection timed out" Error When Connecting via SSH
Incorrect IP address or hostname – The error may be due to a simple typo. Before you check anything else, make sure you're...
Read more >
"Connection timed out" error when connecting via SSH
There are several possibilities that can lead to this error, most of which have to do with your SSH connection settings. The most...
Read more >
Resolve "Connection refused" or "Connection timed out ... - AWS
Error message: "ssh: connect to host ec2-X-X-X-X.compute-1.amazonaws.com port 22: Connection timed out". This error message comes from the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found