When attempting to access the URL for Bitbucket Data Center through a browser, an error stating "The database, as currently configured, is not accessible"

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

When attempting to access the Bitbucket URL through a browser, the following error is encountered where Bitbucket is configured with a PostgreSQL database:

1 2 3 A fatal error has occurred The following problem occurred, which prevented Atlassian Bitbucket from starting: The database, as currently configured, is not accessible. Please see the logs for more details.

Environment

Tested on Bitbucket 8.9.1

Applies to Bitbucket Server/Datacenter 7.x and 8.x.

Diagnosis

  1. Ping hostname defined in bitbucket.properties for the database.

    1 2 3 4 Example: ping hostname PING localhost (10.xx.xx.xx): 56 data bytes 64 bytes from 10.xx.xx.xx: icmp_seq=0 ttl=64 time=0.051 ms 64 bytes from 10.xx.xx.xx: icmp_seq=1 ttl=64 time=0.089 ms
  2. Telnet on Hostname and port defined in bitbucket.properties file for the database.

    1 2 3 4 Example: telnet hostname 3333 Trying 10.xx.xx.xx... Connected to localhost. Escape character is '^]'.

Cause

This issue may arise from communication difficulties between the Bitbucket Data Center and the PostgreSQL Database, which can be attributed to network issues or the database being down. Should the ping and telnet commands also result in a 'connection refused' error, it is necessary to collaborate with both the Database Administration (DBA) team and the network team to resolve the issue.

Solution

Addressing the communication problem with the assistance of the network team, or restoring the PostgreSQL database with the support of the DBA team if it is down, should effectively resolve this issue.

Updated on February 25, 2025

Still need help?

The Atlassian Community is here for you.