Login failed for user while trying to connect Bamboo to a database

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 trying to connect Bamboo with a database, the Bamboo logs (<bamboo-home>/logs/atlassian-bamboo.log) show the following error:

1 Failed to initialize pool: Login failed for user 'User-Name'

Environment

Observed while upgrading Bamboo from version 6.5 to 9.0.0, with Microsoft SQL Server as the external database.

Diagnosis

Looking at the <bamboo-home>/logs/atlassian-bamboo.log the bellow error messages can be seen:

1 2 3 INFO [performSetupDatabaseConnectionBackgroundThread] [SetupDatabaseConnectionAction] Validating connection to url: [jdbc:sqlserver://server:1433;databaseName=XXXXX] ERROR [performSetupDatabaseConnectionBackgroundThread] [DefaultAtlassianBootstrapManager] Could not successfully test your database: com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user 'User-Name'. ClientConnectionId:zx70e792-2cks-4b20-a231-90j23j7fdlc2

Cause

The issue can happen ifthe username and/or password connecting to the database are incorrect. 

Solution

Please check with your Database Administrator if the username and password are correct. Also, please verify if you can connect to the database using the credentials.

It's important to remember that Bamboo will try to connect to the database using the credentials configured in the <bamboo-home>/bamboo.cfg.xml file, on the following lines. 

1 2 3 <property name="hibernate.connection.password">XXXXX</property> ... <property name="hibernate.connection.username">XXXXX</property>

If the password or username needs to be adjusted, it should be done on those lines.

Updated on February 25, 2025

Still need help?

The Atlassian Community is here for you.