Upgrade Fails Due to Previously Failed Upgrade Attempt on Same Instance

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

An upgraded Confluence instance fails to start up and displays the following message:

Upgrade failed. Please consult the system logs for details. You will need to fix these problems, restore your database and confluence home directory to the pre upgrade state. Then retry the upgrade.

A similar error appears in the atlassian-confluence.log:

1 2 2012-05-09 02:52:33,697 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized Upgrade failed, application will not start: Upgrade task com.atlassian.confluence.upgrade.upgradetask.AtlassianUserToEmbeddedCrowdConfigurationUpgradeTask@e805af4 failed during the UPGRADE phase due to: Hibernate operation: could not insert: [com.atlassian.crowd.model.directory.DirectoryImpl#30900225]; SQL []; Duplicate entry 'upgraded atlassian-user ldap (ldaprepository)' for key 2; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'upgraded atlassian-user ldap (ldaprepository)' for key 2 com.atlassian.confluence.upgrade.UpgradeException: Upgrade task com.atlassian.confluence.upgrade.upgradetask.AtlassianUserToEmbeddedCrowdConfigurationUpgradeTask@e805af4 failed during the UPGRADE phase due to: Hibernate operation: could not insert: [com.atlassian.crowd.model.directory.DirectoryImpl#30900225]; SQL []; Duplicate entry 'upgraded atlassian-user ldap (ldaprepository)' for key 2; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'upgraded atlassian-user ldap (ldaprepository)' for key 2

Cause

The instance you are attempting to upgrade has already had one upgrade attempt against it. What has happened is that the database has not been properly rolled back to the state prior to the original upgrade attempt which causes a conflict when creating new tables.

Resolution

Ensure that the home directory and database are returned to the state from before the original upgrade attempt.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.