none
Error code 0x2746 connecting to locally-running SQL Server on Linux RRS feed

  • Question

  • After some upgrades, I'm afraid I didn't (keep track of which ones) I have become unable to connect to SQL Server from my Linux development box (Ubuntu). I had been doing NodeJS development using the mssql/tedious packages, connecting to both SQL Server running on Linux and Azure. Now I am unable to connect to either server. I am unable to connect using either the node libraries or sqlcmd. Here's the error I see when using `sqlcmd` connecting to my local database, which is running with no server errors in the logs:

    Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : TCP Provider: Error code 0x2746.
    Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Client unable to establish connection

    What is error code 0x2746? How can I fix this?

    Here's all the versions I think you might ask for:

    Distro: Ubuntu 18.04.3 LTS

    mssql-server: 14.0.3223.3-15

    sqlcmd: Version 17.4.0001.1 Linux

    openssl: 1.1.1  11 Sep 2018

    Let me know if there are any more details that would help.

    Sunday, August 25, 2019 6:38 PM

All replies

  • By the way, downgrading to mssql-server 14.0.3192.2-2 fixed things. Is this a known issue? Is there a way to resolve the issue without downgrading?

    Sunday, August 25, 2019 6:45 PM
  • 0x2746 = 10054 decimal. This error is "Connection reset by peer. A existing connection was forcibly closed by the remote host." For some reason, SQL Server does not want to talk to you. I would expect that there are messages in the SQL Server errorlog giving more details. I saw that you had reverted to the earlier version, but you may still have errorlog files around.


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

    Sunday, August 25, 2019 7:30 PM
  • Hi Jacob H. Page,

    Please check whether below links could help you. A few systems may require version 1.0 of the OpenSSL libraries to connect to SQL Server. 

    Error: TCP Provider: Error code 0x2746. During the Sql setup in linux through terminal

    Installing SQL Server 2017 for Linux on Ubuntu 18.04 LTS

    Best regards,
    Cathy

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to  MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Monday, August 26, 2019 3:11 AM