Confluence Database Setup Fails for MS SQL Server with Connection Refused

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

Error trying to configure direct JDBC connection for MS SQL 2005/2008:

The following error(s) occurred:

  1. Configuring the database failed. Couldn't create the database schema.
  2. java.sql.SQLException: Network error IOException: Connection refused: connect

As it's shown in the logs:

Caused by: java.sql.SQLException: Network error IOException: Connection refused: connect
at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:385)
at net.sourceforge.jtds.jdbc.ConnectionJDBC3.<init>(ConnectionJDBC3.java:50)
at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:182)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager.getTestDatabaseConnection(DefaultAtlassianBootstrapManager.java:347)
... 172 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)

Cause

Remote connection on SQL Server isn't enabled. The reason this is happening is that the port or the connection itself is not being permitted or routed to the SQL Server.

Resolution

Enable the remote connection and mixed mode authentication in MS SQL as shown in this article:

http://blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx

Last modified on Apr 13, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.