com.microsoft.sqlserver.jdbc.SQLServerException

The TCP/IP connection to the host has failed. java.net.ConnectException: Connection refused: connect

Samebug tips1

If you're not using yet, consider using the SQLServerDataSource to set your server configurations. Also, check if the server is accepting TCP/IP connections and if there's no firewall blocking the connections.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web1392

  • The TCP/IP connection to the hosthas failed. java.net.ConnectException: Connection refused: connect
  • via bigresource.com by Unknown author, 1 year ago
    The TCP/IP connection to the host has failed. java.net.ConnectException: Connection refused: connect
  • The TCP/IP connection to the hosthas failed. java.net.ConnectException: Connection refused: connect
  • Stack trace

    • com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host has failed. java.net.ConnectException: Connection refused: connect at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:171) at connectURL.main(connectURL.java:43)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    4 times, 4 weeks ago
    Once, 4 months ago
    Once, 6 months ago
    2 times, 9 months ago
    Unknown user
    Once, 11 months ago
    110 more bugmates