Restore fails with password authentication failed for user

Symptoms

Restore can't be executed. The following appears in the <path/to/backup/client>/log/atlassian-sbc-YYYY-MM-DD-HHMM.log:

2014-01-11 23:25:11,785 INFO Initializing
2014-01-11 23:25:15,130 INFO Unpacking stash-20140111-231408-003.tar to /opt/stash-home
2014-01-11 23:31:21,378 INFO Validating database before restore
2014-01-11 23:31:21,718 ERROR stash-20140111-231408-003.tar could not be restored. Reason: Could not get JDBC Connection; nested exception is org.postgresql.util.PSQLException: FATAL: password authentication failed for user "stashuser"
org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.postgresql.util.PSQLException: FATAL: password authentication failed for user "stashuser"
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80) ~[spring-jdbc-3.2.4.RELEASE.jar:3.2.4.RELEASE]
at com.atlassian.stash.internal.db.DefaultDatabaseValidator.validate(DefaultDatabaseValidator.java:35) ~[stash-dao-impl-2.9.0-m2.jar:na]
... 7 more frames available in the log file


Cause

The new database you are trying to restore Stash into was created with a different username/password from the previous database

Resolution

The backup client needs the new database to be totally clean and configured just like the first installation of Stash as described on each of different database types of the Connecting Stash to an external database document.

If you are restoring Stash to a new database and you have different user/password, please make sure you specify the jdbc.override parameter and all the other jdbc parameters as described in Restoring Stash into a DB are passed during the restore.

Last modified on Feb 23, 2016

Was this helpful?

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