Upgrade 3.6.0 to 3.6.1 failure

97 views
Skip to first unread message

Patrick Leyman

unread,
Nov 20, 2017, 5:22:29 AM11/20/17
to Nexus Users
Hi all,

I'm trying to upgrade from 3.6.0 towards 3.6.1, but when starting 3.6.1, the internal upgrade fails:
2017-11-20 08:56:28,738+0100 ERROR [FelixStartLevel]  *SYSTEM org.sonatype.nexus.extender.NexusContextListener - Failed to start nexus
com.orientechnologies.orient.core.storage.ORecordDuplicatedException: Cannot index record #85:2: found duplicated key 'activiti.enabled' in index 'healthcheckconfig_property_name_idx' previously assigned to the record #87:3
DB name="config"
at com.orientechnologies.orient.core.index.OIndexUnique$1.validate(OIndexUnique.java:47)
at com.orientechnologies.orient.core.index.OIndexUnique$1.validate(OIndexUnique.java:37)
at com.orientechnologies.orient.core.index.sbtree.local.OSBTree.put(OSBTree.java:873)
at com.orientechnologies.orient.core.index.sbtree.local.OSBTree.validatedPut(OSBTree.java:267)
at com.orientechnologies.orient.core.index.engine.OSBTreeIndexEngine.validatedPut(OSBTreeIndexEngine.java:169)
at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.doValidatedPutIndexValue(OAbstractPaginatedStorage.java:2462)
at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.validatedPutIndexValue(OAbstractPaginatedStorage.java:2431)
at com.orientechnologies.orient.core.index.OIndexUnique.put(OIndexUnique.java:82)
at com.orientechnologies.orient.core.index.OIndexUnique.put(OIndexUnique.java:35)
at com.orientechnologies.orient.core.index.OIndexAbstract.putInSnapshot(OIndexAbstract.java:956)
at com.orientechnologies.orient.core.index.OIndexAbstract.applyIndexTxEntry(OIndexAbstract.java:790)
at com.orientechnologies.orient.core.index.OIndexAbstract.addTxOperation(OIndexAbstract.java:762)
at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.commitIndexes(OAbstractPaginatedStorage.java:1848)
at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.commit(OAbstractPaginatedStorage.java:1806)
at com.orientechnologies.orient.core.tx.OTransactionOptimistic.doCommit(OTransactionOptimistic.java:541)
at com.orientechnologies.orient.core.tx.OTransactionOptimistic.commit(OTransactionOptimistic.java:99)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:2907)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:2876)
at org.sonatype.nexus.orient.transaction.OrientTransaction.commit(OrientTransaction.java:83)
at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:67)
at org.sonatype.nexus.transaction.Operations.transactional(Operations.java:200)
at org.sonatype.nexus.transaction.Operations.run(Operations.java:155)
at org.sonatype.nexus.orient.transaction.OrientOperations.run(OrientOperations.java:63)
at com.sonatype.nexus.plugins.healthcheck.service.impl.ConfigDatabaseUpgrade_1_4.apply(ConfigDatabaseUpgrade_1_4.java:88)
at org.sonatype.nexus.upgrade.internal.UpgradeServiceImpl.lambda$3(UpgradeServiceImpl.java:195)
at java.util.ArrayList.forEach(ArrayList.java:1249)
at org.sonatype.nexus.upgrade.internal.UpgradeServiceImpl.doUpgrade(UpgradeServiceImpl.java:137)
at org.sonatype.nexus.upgrade.internal.UpgradeServiceImpl.doStart(UpgradeServiceImpl.java:93)
at org.sonatype.nexus.common.stateguard.StateGuardLifecycleSupport.start(StateGuardLifecycleSupport.java:67)
at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
at org.sonatype.nexus.common.stateguard.StateGuard$TransitionImpl.run(StateGuard.java:191)
at org.sonatype.nexus.common.stateguard.TransitionsInterceptor.invoke(TransitionsInterceptor.java:56)
at org.sonatype.nexus.extender.NexusLifecycleManager.startComponent(NexusLifecycleManager.java:153)
at org.sonatype.nexus.extender.NexusLifecycleManager.to(NexusLifecycleManager.java:93)
at org.sonatype.nexus.extender.NexusContextListener.frameworkEvent(NexusContextListener.java:188)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1429)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
at java.lang.Thread.run(Thread.java:748)


I already tried to remove the 'activiti' proxy repository in the old version and launched the upgrade again, but it resulted in exactly the same error.

Anyone has any idea how to fix this?

Thanks in advance,
Patrick

Patrick Leyman

unread,
Nov 20, 2017, 9:47:49 AM11/20/17
to Nexus Users
Found the solution myself...
There was a double entry in ../sonatype-work/nexus3/etc/healthcheck.properties (case was different but name was exactly the same):
activiti.enabled=false
Activiti.enabled=false

After removing the last one, the upgrade worked fine.

Peter Lynch

unread,
Nov 20, 2017, 10:28:29 AM11/20/17
to Patrick Leyman, Nexus Users
On Mon, Nov 20, 2017 at 10:47 AM, Patrick Leyman <ple...@gmail.com> wrote:
Found the solution myself...
There was a double entry in ../sonatype-work/nexus3/etc/healthcheck.properties (case was different but name was exactly the same):
activiti.enabled=false
Activiti.enabled=false


There is a bug in versions 3.6.0 and earlier where when a repository is deleted ( in your case Activiti ) , it does not get removed from ./sonatype-work/nexus3/etc/healthcheck.properties immediately. 

In 3.6.1, the upgrade step moves the healthcheck.properties to the config database and healthcheck.properties will no longer exist.

Basically you found the correct solution to work around the failed upgrade, by removing the healthcheck.properties entry for the repo name that no longer exists.

However we should be able to avoid this so I filed https://issues.sonatype.org/browse/NEXUS-14960  - thanks for letting us know of the problem and solution.

--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users+unsubscribe@glists.sonatype.com.
To post to this group, send email to nexus...@glists.sonatype.com.
To view this discussion on the web visit https://groups.google.com/a/glists.sonatype.com/d/msgid/nexus-users/d9ec0f47-2b7c-4b1e-95a0-ffb32999f1c0%40glists.sonatype.com.

Reply all
Reply to author
Forward
0 new messages