Login failed for user while trying to connect Bamboo to a database
プラットフォームについて: 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 は除く
要約
When trying to connect Bamboo with a database, the Bamboo logs (<bamboo-home>/logs/atlassian-bamboo.log
) show the following error:
Failed to initialize pool: Login failed for user 'User-Name'
環境
Observed while upgrading Bamboo from version 6.5 to 9.0.0, with Microsoft SQL Server as the external database.
診断
Looking at the <bamboo-home>/logs/atlassian-bamboo.log
the bellow error messages can be seen:
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
原因
The issue can happen if the username and/or password connecting to the database are incorrect.
ソリューション
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.
<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.