Could not restore the backup - Attempted reconnect 3 times. Giving up.
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
Symptoms
After running the restore client to a newly created MySQL DB instance, the following appears in the <path/to/backup/client>/log/atlassian-sbc-YYYY-MM-DD-HHMM.log:
1
2
3
4
5
6
7
8
2014-06-22 21:44:58,487 INFO Initializing
2014-06-22 21:44:59,731 INFO Unpacking bitbucket-20140618-221025-932.tar to /var/atlassian/application-data/bitbucket
2014-06-22 21:45:00,687 INFO Validating database before restore
2014-06-22 21:45:11,869 ERROR bitbucket-20140618-221025-932.tar could not be restored. Reason: Could not get JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80) ~[spring-jdbc-4.0.0.RELEASE.jar:4.0.0.RELEASE]
at com.atlassian.bitbucket.internal.db.DefaultDatabaseValidator.validate(DefaultDatabaseValidator.java:35) ~[bitbucket-dao-impl-2.11.6.jar:na]
... 7 more frames available in the log file
Cause
The database user for the database has no permissions on the database you created.
Resolution
Please set the permissions for your user as described on the document below according to the database you are setting up:
Was this helpful?