com.atlassian.confluence.upgrade.UpgradeException: Cannot proceed with upgrade. Cluster upgrade lock acquired but could not successfully tag build number in the CONFVERSION table. This may because you are trying to rerun an upgrade that has failed or there are communication problems between one or more nodes in your cluster. Please zip up your logs and attach onto a support ticket at http://support.atlassian.com.

Atlassian JIRA | Paul Curren | 8 years ago
  1. 0

    When trying to upgrade QA-EAC recently, the upgrade failed with the message - {noformat} 2009-06-02 00:23:01,940 FATAL [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized Upgrade failed, application will not start: Cannot proceed with upgrade. Cluster upgrade lock ac quired but could not successfully tag build number in the CONFVERSION table. This may because you are trying to rerun an upgrade that has failed or there are communication problems between one or more nodes in your cluste r. Please zip up your logs and attach onto a support ticket at http://support.atlassian.com. com.atlassian.confluence.upgrade.UpgradeException: Cannot proceed with upgrade. Cluster upgrade lock acquired but could not successfully tag build number in the CONFVERSION table. This may because you are trying to rerun an upgrade that has failed or there are communication problems between one or more nodes in your cluster. Please zip up your logs and attach onto a support ticket at http://support.atlassian.com. at com.atlassian.confluence.upgrade.impl.DefaultUpgradeManager.permitDatabaseUpgrades(DefaultUpgradeManager.java:134) {noformat} The problem is that the CONFVERSION entry for the current build (1624 in this case) already has the pre_upgrade_version entry indicating it has been upgraded. This will probably happen if the server is stopped or throws an exception during the upgrade. The individual upgrade tasks are wrapped in a transaction and the VersionHistoryDao is also wrapped (responsible for adding the tag). However, the DefaultUpgradeManager is not wrapped in a transaction so when it catches any exceptions during upgrade the changes it has made (using the VersionDataDao) will not be rolledback. That's my theory anyway.

    Atlassian JIRA | 8 years ago | Paul Curren
    com.atlassian.confluence.upgrade.UpgradeException: Cannot proceed with upgrade. Cluster upgrade lock acquired but could not successfully tag build number in the CONFVERSION table. This may because you are trying to rerun an upgrade that has failed or there are communication problems between one or more nodes in your cluster. Please zip up your logs and attach onto a support ticket at http://support.atlassian.com.
  2. 0

    When trying to upgrade QA-EAC recently, the upgrade failed with the message - {noformat} 2009-06-02 00:23:01,940 FATAL [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized Upgrade failed, application will not start: Cannot proceed with upgrade. Cluster upgrade lock ac quired but could not successfully tag build number in the CONFVERSION table. This may because you are trying to rerun an upgrade that has failed or there are communication problems between one or more nodes in your cluste r. Please zip up your logs and attach onto a support ticket at http://support.atlassian.com. com.atlassian.confluence.upgrade.UpgradeException: Cannot proceed with upgrade. Cluster upgrade lock acquired but could not successfully tag build number in the CONFVERSION table. This may because you are trying to rerun an upgrade that has failed or there are communication problems between one or more nodes in your cluster. Please zip up your logs and attach onto a support ticket at http://support.atlassian.com. at com.atlassian.confluence.upgrade.impl.DefaultUpgradeManager.permitDatabaseUpgrades(DefaultUpgradeManager.java:134) {noformat} The problem is that the CONFVERSION entry for the current build (1624 in this case) already has the pre_upgrade_version entry indicating it has been upgraded. This will probably happen if the server is stopped or throws an exception during the upgrade. The individual upgrade tasks are wrapped in a transaction and the VersionHistoryDao is also wrapped (responsible for adding the tag). However, the DefaultUpgradeManager is not wrapped in a transaction so when it catches any exceptions during upgrade the changes it has made (using the VersionDataDao) will not be rolledback. That's my theory anyway.

    Atlassian JIRA | 8 years ago | Paul Curren
    com.atlassian.confluence.upgrade.UpgradeException: Cannot proceed with upgrade. Cluster upgrade lock acquired but could not successfully tag build number in the CONFVERSION table. This may because you are trying to rerun an upgrade that has failed or there are communication problems between one or more nodes in your cluster. Please zip up your logs and attach onto a support ticket at http://support.atlassian.com.
  3. 0

    h4. Steps to Reproduce # Set up a Confluence 5.1.x instance # Change some usernames in one of the tables to have trailing spaces. Example: {code:sql}update content set creator=concat(creator, ' ') where contenttype='USERINFO' and creator='admin';{code} # Upgrade to Confluence 5.2.5 h4. Expected Results Upgrade should proceed smoothly without any issues h4. Actual Results After Confluence retrieve all usernames: {code}2013-09-25 17:45:56,713 INFO [main] [atlassian.confluence.upgrade.UpgradeTask] doUpgrade Retrieving usernames from the database. 2013-09-25 17:45:56,923 INFO [main] [atlassian.confluence.upgrade.UpgradeTask] doUpgrade Found 32 unique usernames that need mapping created. {code} It is trying to insert all the users into {{user_mapping}} table: {code}2013-09-25 17:45:56,961 DEBUG [main] [net.sf.hibernate.SQL] log insert into user_mapping (username, lower_username, user_key) values (?, ?, ?) 2013-09-25 17:45:56,962 TRACE [main] [sf.hibernate.type.StringType] nullSafeSet binding 'admin' to parameter: 1 2013-09-25 17:45:56,962 TRACE [main] [sf.hibernate.type.StringType] nullSafeSet binding 'admin' to parameter: 2 {code} and then it tries to insert the same username (with trailing space) to {{user_mapping}} table {code}2013-09-25 17:45:56,982 DEBUG [main] [net.sf.hibernate.SQL] log insert into user_mapping (username, lower_username, user_key) values (?, ?, ?) 2013-09-25 17:45:56,982 TRACE [main] [sf.hibernate.type.StringType] nullSafeSet binding 'admin ' to parameter: 1 2013-09-25 17:45:56,983 TRACE [main] [sf.hibernate.type.StringType] nullSafeSet binding 'admin ' to parameter: 2 {code} However, this fails: {code}2013-09-25 17:45:56,993 ERROR [main] [sf.hibernate.util.JDBCExceptionReporter] logExceptions Duplicate entry 'admin ' for key 'lower_username' {code} {code}2013-09-25 22:44:29,391 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized Upgrade failed, application will not start: Upgrade task com.atlassian.confluence.upgrade.upgradetask.ReferencedUsersUserMappingUpgradeTask@6be9ac06 failed during the SCHEMA_UPGRADE phase due to: Unable to complete user mapping creation. com.atlassian.confluence.upgrade.UpgradeException: Upgrade task com.atlassian.confluence.upgrade.upgradetask.ReferencedUsersUserMappingUpgradeTask@6be9ac06 failed during the SCHEMA_UPGRADE phase due to: Unable to complete user mapping creation. at com.atlassian.confluence.upgrade.AbstractUpgradeManager.executeUpgradeStep(AbstractUpgradeManager.java:278) at com.atlassian.confluence.upgrade.AbstractUpgradeManager.runSchemaUpgradeTasks(AbstractUpgradeManager.java:203) .... Caused by: java.lang.RuntimeException: Unable to complete user mapping creation. at com.atlassian.confluence.upgrade.upgradetask.AbstractUserMappingUpgradeTask.doUpgrade(AbstractUserMappingUpgradeTask.java:71) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ..... Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'admin' for key 'lower_username' at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) ..... {code} Replicated by upgrading to 5.2.3 as well. h4. Findings MySQL and SQL Server (possibly others) database servers ignore trailing space when comparing strings. On instances where a user with a certain username and another user with the same username with whitespace characters in the end (e.g. 'jdoe' and 'jdoe ') have existed, the upgrade is likely to fail h4. Workaround # Rollback your Confluence database to pre-upgrade state and ensure that the {{user_mapping}} table does not exist. If it does, run this query to drop it: {code:sql}drop table user_mapping;{code} # Run the following SQL queries to find out which tables are affected: {code:sql} select * from ATTACHMENTS where creator like binary '% ' or lastmodifier like binary '% '; select * from CONTENT where creator like binary '% ' or lastmodifier like binary '% ' or username like binary '% '; select * from CONTENT_LABEL where owner like binary '% '; select * from CONTENT_PERM where username like binary '% ' or creator like binary '% ' or lastmodifier like binary '% '; select * from cwd_user where user_name like binary '% ' or lower_user_name like binary '% '; select * from LIKES where username like binary '% '; select * from LINKS where creator like binary '% ' or lastmodifier like binary '% '; select * from logininfo where username like binary '% '; select * from NOTIFICATIONS where username like binary '% ' or creator like binary '% ' or lastmodifier like binary '% '; select * from OS_PROPERTYENTRY where entity_name like binary 'CWD_% '; select * from PAGETEMPLATES where creator like binary '% ' or lastmodifier like binary '% '; select * from remembermetoken where username like binary '% '; select * from SPACEGROUPPERMISSIONS where permusername like binary '% '; select * from SPACEGROUPS where creator like binary '% ' or lastmodifier like binary '% '; select * from SPACEPERMISSIONS where permusername like binary '% ' or creator like binary '% ' or lastmodifier like binary '% '; select * from SPACES where creator like binary '% ' or lastmodifier like binary '% '; select * from TRACKBACKLINKS where creator like binary '% ' or lastmodifier like binary '% '; {code} # Run the following SQL queries to fix affected tables: {code:sql} update ATTACHMENTS set creator = rtrim(creator), lastmodifier = rtrim(lastmodifier); update CONTENT set creator = rtrim(creator), lastmodifier = rtrim(lastmodifier), username = rtrim(username); update CONTENT_LABEL set owner = rtrim(owner); update CONTENT_PERM set creator = rtrim(creator), lastmodifier = rtrim(lastmodifier), username = rtrim(username); update cwd_user set user_name = rtrim(user_name), lower_user_name = rtrim(lower_user_name); update LIKES set username = rtrim(username); update LINKS set creator = rtrim(creator), lastmodifier = rtrim(lastmodifier); update logininfo set username = rtrim(username); update NOTIFICATIONS set creator = rtrim(creator), lastmodifier = rtrim(lastmodifier), username = rtrim(username); update OS_PROPERTYENTRY set entity_name = rtrim(entity_name) where entity_name like 'CWD_%'; update PAGETEMPLATES set creator = rtrim(creator), lastmodifier = rtrim(lastmodifier); update remembermetoken set username = rtrim(username); update SPACEGROUPPERMISSIONS set permusername = rtrim(permusername); update SPACEGROUPS set creator = rtrim(creator), lastmodifier = rtrim(lastmodifier); update SPACEPERMISSIONS set permusername = rtrim(permusername), creator = rtrim(creator), lastmodifier = rtrim(lastmodifier); update SPACES set creator = rtrim(creator), lastmodifier = rtrim(lastmodifier); update TRACKBACKLINKS set creator = rtrim(creator), lastmodifier = rtrim(lastmodifier); {code} # Restart Confluence. Upgrade should pick up where it failed and it should complete successfully.

    Atlassian JIRA | 3 years ago | Amalia Sanusi [Atlassian]
    com.atlassian.confluence.upgrade.UpgradeException: Upgrade task com.atlassian.confluence.upgrade.upgradetask.ReferencedUsersUserMappingUpgradeTask@6be9ac06 failed during the SCHEMA_UPGRADE phase due to: Unable to complete user mapping creation.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Trying to upgrade Confluence 3.1 to 3.513 as pre-cursor to upgrading to 4.2 Getting this exception: 2012-04-26 16:37:19,512 ERROR [main] [confluence.user.migration.LdapRepositoryConfigurationMigrator] validateObjectClassDefined Property groupSearchFilter does not define an objectClass filter 2012-04-26 16:37:19,543 ERROR [main] [confluence.user.migration.LdapRepositoryConfigurationMigrator] validateObjectClassDefined Property userSearchFilter does not define an objectClass filter 2012-04-26 16:37:19,547 INFO [main] [confluence.user.migration.AtlassianUserMigrator] validate validated repository [ ldapRepository ] with [ com.atlassian.confluence.user.migration.LdapRepositoryConfigurationMigrator@2e98f864 ] 2012-04-26 16:37:19,550 INFO [main] [confluence.user.migration.AtlassianUserMigrator] validate validated repository [ hibernateRepository ] with [ com.atlassian.confluence.user.migration.HibernateRepositoryConfigurationMigrator@3cdb8522 ] 2012-04-26 16:37:19,694 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized Upgrade failed, application will not start: Upgrade task com.atlassian.confluence.upgrade.upgradetask.AtlassianUserToEmbeddedCrowdConfigurationUpgradeTask@2f823290 failed during the VALIDATION phase com.atlassian.confluence.upgrade.UpgradeException: Upgrade task com.atlassian.confluence.upgrade.upgradetask.AtlassianUserToEmbeddedCrowdConfigurationUpgradeTask@2f823290 failed during the VALIDATION phase at com.atlassian.confluence.upgrade.AbstractUpgradeManager.executeUpgradeStep(AbstractUpgradeManager.java:205) at com.atlassian.confluence.upgrade.AbstractUpgradeManager.validateUpgradeTasks(AbstractUpgradeManager.java:140) at com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgrade(AbstractUpgradeManager.java:70) at com.atlassian.confluence.upgrade.impl.DefaultUpgradeManager.upgrade(DefaultUpgradeManager.java:140) at com.atlassian.confluence.upgrade.UpgradeLauncherServletContextListener.contextInitialized(UpgradeLauncherServletContextListener.java:28) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:785) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445) at org.apache.catalina.core.StandardService.start(StandardService.java:519) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:581) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) 2012-04-26 16:37:19,742 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized 2 errors were encountered during upgrade: 2012-04-26 16:37:19,745 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized 1: Property groupSearchFilter does not define an objectClass filter 2012-04-26 16:37:19,748 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized 2: Property userSearchFilter does not define an objectClass filter here is our atlassian-user.xml. We've been using it with 3.1 for the past 2 years. <atlassian-user> <repositories> <ldap key="ldapRepository" name="LDAP Repository@hecate.atlassian.com" cache="true"> <host>*****.bcbsa.com</host> <port>****</port> <securityPrincipal>uid=*****,ou=Pseudo Accounts, ou=Global, dc=bcbsa,dc=com</securityPrincipal> <securityCredential>******</securityCredential> <securityProtocol>plain</securityProtocol> <securityAuthentication>simple</securityAuthentication> <baseContext>dc=bcbsa,dc=com</baseContext> <baseUserNamespace>ou=people,ou=bcbs,dc=bcbsa,dc=com</baseUserNamespace> <baseGroupNamespace>ou=orgs,ou=bcbs,dc=bcbsa,dc=com</baseGroupNamespace> <usernameAttribute>uid</usernameAttribute> <userSearchFilter>(objectClass=inetorgperson)</userSearchFilter> <firstnameAttribute>givenName</firstnameAttribute> <surnameAttribute>sn</surnameAttribute> <emailAttribute>mail</emailAttribute> <groupnameAttribute>o</groupnameAttribute> <groupSearchFilter>(objectclass=bcbsorganization1)</groupSearchFilter> <!--dummy value to not load orgs as groups--> <membershipAttribute>uniqueMember</membershipAttribute> <userSearchAllDepths>false</userSearchAllDepths> <groupSearchAllDepths>false</groupSearchAllDepths> </ldap> <hibernate name="Hibernate Repository" key="hibernateRepository" description="Hibernate Repository" cache="true" /> </repositories> </atlassian-user>

    Atlassian JIRA | 5 years ago | Michael Roytman
    com.atlassian.confluence.upgrade.UpgradeException: Upgrade task com.atlassian.confluence.upgrade.upgradetask.AtlassianUserToEmbeddedCrowdConfigurationUpgradeTask@2f823290 failed during the VALIDATION phase
  6. 0

    Hi, this happend a second time now and I think it' worth to open a ticket: http://forums.atlassian.com/thread.jspa?threadID=55065 The upgrade to Confluence 3.5 fails, when thumbnails have special characters like german umlauts. Or is this a configuration issue? {code} 2011-06-29 08:52:22,840 DEBUG [main] [springframework.orm.hibernate.HibernateTransactionManager] doCleanupAfterCompletion Closing Hibernate Session [net.sf.hibernate.impl.SessionImpl@62ecd2de] after transaction 2011-06-29 08:52:22,841 DEBUG [main] [springframework.orm.hibernate.SessionFactoryUtils] closeSession Closing Hibernate Session 2011-06-29 08:52:22,841 DEBUG [main] [mchange.v2.resourcepool.BasicResourcePool] trace trace com.mchange.v2.resourcepool.BasicResourcePool@76f4da6d [managed: 1, unused: 0, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@43794494) 2011-06-29 08:52:23,054 DEBUG [main] [atlassian.johnson.config.JohnsonConfig] configureEventChecks Adding eventcheck of class: com.atlassian.confluence.setup.johnson.WebAppContextPathCheck 2011-06-29 08:52:23,060 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized Upgrade failed, application will not start: Upgrade task failed: class com.atlassian.confluence.upgrade.upgradetask.PurgeThumbnailsUpgradeTask com.atlassian.confluence.upgrade.UpgradeException: Upgrade task failed: class com.atlassian.confluence.upgrade.upgradetask.PurgeThumbnailsUpgradeTask at com.atlassian.confluence.upgrade.AbstractUpgradeManager.doUpgrade(AbstractUpgradeManager.java:213) at com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgrade(AbstractUpgradeManager.java:92) at com.atlassian.confluence.upgrade.impl.DefaultUpgradeManager.upgrade(DefaultUpgradeManager.java:139) at com.atlassian.confluence.upgrade.UpgradeLauncherServletContextListener.contextInitialized(UpgradeLauncherServletContextListener.java:28) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4704) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) 2011-06-29 08:52:23,083 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized 1 errors were encountered during upgrade: 2011-06-29 08:52:23,084 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized 1: Error removing thumbnails directory [/home/confluence-upgrade/intern/thumbnails] from confluence home 2011-06-29 08:52:23,084 DEBUG [main] [atlassian.confluence.setup.ConfluenceListableBeanFactory] getBean Returning cached instance of singleton bean 'lifecycleManager' 2011-06-29 08:52:23,085 DEBUG [main] [springframework.orm.hibernate.HibernateTransactionManager] getTransaction Using transaction object [org.springframework.orm.hibernate.HibernateTransactionManager$HibernateTransactionObject@279e5431] 2011-06-29 08:52:23,086 DEBUG [main] [springframework.orm.hibernate.HibernateTransactionManager] getTransaction Creating new transaction with name [com.atlassian.event.EventManager.publishEvent]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT 2011-06-29 08:52:23,086 DEBUG [main] [springframework.orm.hibernate.HibernateTransactionManager] doBegin Opened new Session [net.sf.hibernate.impl.SessionImpl@ba97149] for Hibernate transaction {code} Thanks, Peter

    Atlassian JIRA | 5 years ago | Peter Meier
    com.atlassian.confluence.upgrade.UpgradeException: Upgrade task failed: class com.atlassian.confluence.upgrade.upgradetask.PurgeThumbnailsUpgradeTask

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.atlassian.confluence.upgrade.UpgradeException

      Cannot proceed with upgrade. Cluster upgrade lock acquired but could not successfully tag build number in the CONFVERSION table. This may because you are trying to rerun an upgrade that has failed or there are communication problems between one or more nodes in your cluster. Please zip up your logs and attach onto a support ticket at http://support.atlassian.com.

      at com.atlassian.confluence.upgrade.impl.DefaultUpgradeManager.permitDatabaseUpgrades()
    2. com.atlassian.confluence
      DefaultUpgradeManager.permitDatabaseUpgrades
      1. com.atlassian.confluence.upgrade.impl.DefaultUpgradeManager.permitDatabaseUpgrades(DefaultUpgradeManager.java:134)
      1 frame