Jira had problems starting up due to database connection

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Jira does not start with error message Jira couldn't connect to your database.

Environment

8.13.4

Diagnosis

  • Analysis of logs shows below mentioned error message in atlassian-jira.log:

2021-12-22 03:00:09,599-0500 localhost-startStop-1 ERROR [c.a.config.bootstrap.DefaultAtlassianBootstrapManager] Could not successfully test your database: com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host abchost, port 2023 has failed. Error: "abchost. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.". at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:228) at com.microsoft.sqlserver.jdbc.SQLServerException.ConvertConnectExceptionToSQLServerException(SQLServerException.java:279) at com.microsoft.sqlserver.jdbc.SocketFinder.findSocket(IOBuffer.java:2431) at com.microsoft.sqlserver.jdbc.TDSChannel.open(IOBuffer.java:656) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:2440) at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:2103) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:1950) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:1162) at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:735) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:247)

Cause

A possible cause is that connectivity from database server and Jira is hampered due to the port is blocked by a firewall. So check connectivity of database server from Jira:

  • Make sure connectivity of database from Jira Server instance is fine.

    • Try to connect via any database browser tool.

    • Check connectivity to database with following netcat command(sudo apt-get install netcat):

nc -vnz -w 1 [database server IP] [database port]
  • If database is reachable then output should be like

root@kali:~# nc -vnz -w 1 192.168.1.123 5432 Connection to 192.168.1.123 5432 port [tcp/*] succeeded! root@kali:~#
  • Check if there are any firewall rules configured .

Solution

  • Verify the connection properties. Make sure that an instance of the database Server is running on the host and accepting TCP/IP connections at the port.

  • Make sure that TCP connections to the port are not blocked by a firewall. You might have to contact Infrastructure team or Database administrators.

Updated on May 22, 2025

Still need help?

The Atlassian Community is here for you.