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.

Unable to connect to server on custom port

See original GitHub issue

Hi,

I`m having problems with connecting to SQL Server On Linux using mssql-cli using Ubuntu 16.04. This is not related to firewall etc, as connection from same machine using mssql tool works fine.

Steps to reproduce:

  1. setup sql server on port different than 1433
  2. try to connect using following command: mssql-cli -S HOST,PORT

Expected result: Successful connection

Actual result: Connection did not succeed. 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=111; handshake=363; [Login] initialization=4; authentication=8; [Post-Login] complete=14033;

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:6
  • Comments:6

github_iconTop GitHub Comments

4reactions
chriswolf-nrgcommented, Mar 22, 2018

This works for me:

$ mssql-cli -S "tcp:someserver.domain.net,1435" -U someuser

You should make sure to prefix with tcp: and have the whole protocol:host,port in quotes.

0reactions
mdavis-xyzcommented, Jan 17, 2022

It works for me with that comma separation (even without double quotes).

The issue I had is that a comma separator is not intuitive. I first assumed there was some other flag (-P? Nope, that’s password), then I tried host:port.

I think this needs to be documented. PR #522 does that. (But it hasn’t been merged, and I don’t know why.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Encountering a Could not connect to Access Server using the ...
Could not connect to Access Server using the <server name> and <port number> . Access Server may be down or the host name...
Read more >
Unable to connect to different HTTP port on server
When you remove the specific port number it defaults to port 80. So there is something that is blocking the other port.
Read more >
Unable to access custom port in Azure VM - Microsoft Learn
Try the below: Allow the custom port in the inbound rules of NSG. Allow the custom port in your IP Tables/Windows Firewall.
Read more >
I can't connect to Minecraft servers with custom Port - Arqade
To answer your original question: It sounds like netshare is a proxy server. That means that it has to receive the requests as...
Read more >
Linux client unable to connect to server using custom port ...
Hello, I'm unable to connect to my url using a custom port for my linux client. For e.g., the linux client cannot connect...
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