Could not restore the backup - Attempted reconnect 3 times. Giving up.

Still need help?

The Atlassian Community is here for you.

Ask the community

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:

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:

Last modified on Mar 7, 2016

Was this helpful?

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