I updated our 2 Nexus instances from 3.46.0 to 3.47.1 (read the info about 3.47.0 before starting the update), but I now have issues with one of the instances.
On the first instance, we have a Docker registry, this one updated just fine.
On the second instance, we have PyPi and Raw repos. The update itself seemed to work just fine. Nothing in the logs pointed to any errors whatsoever.
Today I got a call from my colleagues that they aren’t able to download any files from the repos on the second instance anymore. Checking the logs I found lots of stacktraces like these:
2023-02-13 01:10:47,517+0100 WARN [qtp206947563-1125] *UNKNOWN org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Failure servicing: GET /repository/site/index.html
java.lang.IllegalArgumentException: Not a valid blob reference
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:144)
at org.sonatype.nexus.blobstore.api.BlobRef.parse(BlobRef.java:80)
at org.sonatype.nexus.repository.storage.AssetEntityAdapter.readFields(AssetEntityAdapter.java:239)
at org.sonatype.nexus.repository.storage.AssetEntityAdapter.readFields(AssetEntityAdapter.java:1)
at org.sonatype.nexus.repository.storage.MetadataNodeEntityAdapter.readFields(MetadataNodeEntityAdapter.java:1)
at org.sonatype.nexus.orient.entity.EntityAdapter.readEntity(EntityAdapter.java:286)
at org.sonatype.nexus.repository.storage.MetadataNodeEntityAdapter.findByProperty(MetadataNodeEntityAdapter.java:167)
at org.sonatype.nexus.repository.storage.StorageTxImpl.findAssetWithProperty(StorageTxImpl.java:396)
at sun.reflect.GeneratedMethodAccessor82.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
-- cut --
Trying to examine a file in Nexus’ browser gave a popup with the same error: ‘Not a valid blob reference’.
I tried to run some tasks like ‘Repair - Rebuild repository browse’, after which Nexus’ browser was completely empty! From the log:
org.sonatype.nexus.repository.browse.node.RebuildBrowseNodeFailedException: Could not re-create browse nodes
at org.sonatype.nexus.repository.browse.internal.orient.OrientRebuildBrowseNodeService.rebuild(OrientRebuildBrowseNodeService.java:132)
at org.sonatype.nexus.repository.browse.node.RebuildBrowseNodesTask.execute(RebuildBrowseNodesTask.java:54)
at org.sonatype.nexus.repository.RepositoryTaskSupport.execute(RepositoryTaskSupport.java:79)
at org.sonatype.nexus.scheduling.TaskSupport.call(TaskSupport.java:100)
at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.doExecute(QuartzTaskJob.java:143)
at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.execute(QuartzTaskJob.java:106)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.sonatype.nexus.quartz.internal.QuartzThreadPool.lambda$0(QuartzThreadPool.java:145)
at org.sonatype.nexus.thread.internal.MDCAwareRunnable.run(MDCAwareRunnable.java:40)
at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120)
at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108)
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)
Caused by: java.lang.IllegalArgumentException: Not a valid blob reference
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:144)
at org.sonatype.nexus.blobstore.api.BlobRef.parse(BlobRef.java:80)
at org.sonatype.nexus.repository.storage.AssetEntityAdapter.readFields(AssetEntityAdapter.java:239)
at org.sonatype.nexus.repository.storage.AssetEntityAdapter.readFields(AssetEntityAdapter.java:1)
at org.sonatype.nexus.repository.storage.MetadataNodeEntityAdapter.readFields(MetadataNodeEntityAdapter.java:1)
at org.sonatype.nexus.orient.entity.EntityAdapter.readEntity(EntityAdapter.java:286)
at org.sonatype.nexus.orient.entity.action.ReadEntityByIdAction.execute(ReadEntityByIdAction.java:46)
at org.sonatype.nexus.orient.entity.IterableEntityAdapter.read(IterableEntityAdapter.java:89)
at org.sonatype.nexus.repository.storage.AssetStoreImpl.getById(AssetStoreImpl.java:71)
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.browse.internal.orient.OrientRebuildBrowseNodeService.rebuild(OrientRebuildBrowseNodeService.java:113)
... 15 common frames omitted
I then also tied ‘Repair - Reconcile component database from blob store’, which didn’t seem to do anything. Log is similar to the above stack-traces.
Hoping that my files were actually still there, I reverted back to 3.46.0 on the second instance. Thankfully everything was still there.
To me, it sounds like the fix for 3.47.0 may be having some side effects in 3.47.1 – but only on some types of repository?