Bamboo fails to start due to database connectivity issue
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
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
This KB focuses on the issue while starting Bamboo instances but fails due to database connectivity errors seen in the log file.
Environment
7.2.3
Diagnosis
It is possible that Bamboo instance isn't starting and you can see the below errors in the atlassian-bamboo.log file:
2022-03-18 09:40:57,169 ERROR [localhost-startStop-1] [BootstrapUpgradeHelper] Error getting database connection
org.hibernate.HibernateException: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
at org.hibernate.hikaricp.internal.HikariCPConnectionProvider.configure(HikariCPConnectionProvider.java:63)
...
Caused by: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:512)
Cause
The logs suggest that the database is not accepting connection, which means bamboo is unable to connect to the database running on localhost:5432 or the database is up and running. This will not let bamboo instance connect to database and hence bamboo will fail to start.
Solution
Make sure the database is up and running and make sure bamboo server is able to establish connection with the bamboo database.