Bitbucket Server as a service and the database as currently configured is not accessible error

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

If Bitbucket Server is configured as a service on Windows, the following appears on the UI when it is started by the service:

A fatal error has occurred
The following problem occurred which prevents Atlassian Bitbucket Server from starting correctly:

The database, as currently configured, is not accessible. Bitbucket Server is configured to use the mysql driver (com.mysql.jdbc.Driver) but it is not available. Please follow the instructions to install the driver as per Connecting Bitbucket Server to MySQL.

However, when starting Bitbucket Server manually from its binary works just fine.

Cause

The database connector lib was not in the correct place. The driver when placed under <Bitbucket home directory>/lib only works when manually starting Bitbucket Server.

Resolution

As a workaround, place the MySQL jar connector (mysql-connector-java-5.1.x-bin.jar) under <BITBUCKET_INSTALLATION_DIR>/app/WEB_INF/lib instead if you are starting Bitbucket Server as a service.

This is not given as a primary guideline on 2023-10-24_01-30-33_Connecting Bitbucket Server to MySQL because the driver would be lost when upgrading Bitbucket Server. Hence, if you upgrade Bitbucket Server at this stage you will need to perform this again.

The final fix was included in  BSERV-3163 - Getting issue details... STATUS .

Last modified on Apr 29, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.