Upgrade Nexus2 to Nexus3 on different servers - Failed Prepare state

Hello,

I tried to upgrade/migrate from an older nexus 2 installation to nexus 3 and followed the steps in the documentation.

First I Upgraded the Nexus2 Instance successfully to the latest Version and is now on:
Nexus Repository Manager OSS 2.14.20-02

I installed the docker container for Nexus 3 on another server and tried to Upgrade the repositories and all configuration from the nexus 2 instance. There is always the following Failure. on one specific repository in the “Preparing Step”, i am using the http download transfer type.

Anyone experienced similar behavior during an upgrade?

The Log from the nexus3 instance:

2021-04-20 12:07:42,825+0000 DEBUG [plan-executor-12-thread-4] admin com.sonatype.nexus.migration.repository.orient.OrientRepositoryPrepareStep - Transitioning: RUNNING → FAILED
2021-04-20 12:07:42,828+0000 WARN [plan-executor-12-thread-4] admin com.sonatype.nexus.migration.repository.orient.OrientRepositoryPrepareStep - Prepare repository for upgrade: central failed
javax.validation.ConstraintViolationException: attributes[negativeCache].timeToLive: must be greater than or equal to 0
at org.sonatype.nexus.repository.manager.internal.RepositoryImpl.validate(RepositoryImpl.java:174)
at org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl.newRepository(RepositoryManagerImpl.java:193)
at org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl.create(RepositoryManagerImpl.java:345)
at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:272)
at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:54)
at org.sonatype.nexus.repository.manager.RepositoryManager$create$4.call(Unknown Source)
at com.sonatype.nexus.migration.repository.RepositoryPrepareStep.doRun(RepositoryPrepareStep.groovy:138)
at com.sonatype.nexus.migration.plan.Step.run(Step.groovy:271)
at com.sonatype.nexus.migration.plan.Step$run$1.call(Unknown Source)
at com.sonatype.nexus.migration.plan.StepExecutor.runSync(StepExecutor.groovy:168)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:352)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:68)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:169)
at com.sonatype.nexus.migration.plan.StepExecutor$_runAsync_closure1.doCall(StepExecutor.groovy:197)
at com.sonatype.nexus.migration.plan.StepExecutor$_runAsync_closure1.doCall(StepExecutor.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:264)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)
at groovy.lang.Closure.call(Closure.java:420)
at groovy.lang.Closure.call(Closure.java:414)
at groovy.lang.Closure.run(Closure.java:501)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

Check the configuration of the central proxy in nxrm 2. I’m guessing the Expiration Settings > Not Found Cache TTL is a negative number and needs to be a positive number (or 0).

Thanks a lot for this Hint! Worked and is now upgrading :smile: