Jira had problems starting up due to database connection
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
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.
*Fisheye および Crucible は除く
要約
Jira could not start. Observed error message Jira couldn't connect to your database. Here is the screenshot for more reference:
環境
8.13.4
診断
- 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)
考えられる原因
Connectivity from database server and Jira is hampered due to the port is blocked by a firewall. So let's 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 .
ソリューション
- 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.