Confluence Database Setup Fails for MS SQL Server with Connection Refused
Symptoms
Error trying to configure direct JDBC connection for MS SQL 2005/2008:
The following error(s) occurred:
- Configuring the database failed. Couldn't create the database schema.
- 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:
Last modified on Apr 13, 2016
Powered by Confluence and Scroll Viewport.