Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-17790

Repair - Reconcile component database from blob store failure

    XMLWordPrintable

    Details

      Description

      A user ran the "Repair - Reconcile component database from blob store" task this failed with the exception seen below.  From the stack, it seems a maven-metadata.xml file was being restored and the file already existed in the target repository.   This is logged as a warning, which is fine, but there are two big problems with the way this was handled:

      1. The repository and path of the failed asset are not printed
      2. The task should not stop just because one file couldn't be restored

       

      2018-08-13 16:54:18,826-0500 WARN [quartz-5-thread-8] *SYSTEM org.sonatype.nexus.quartz.internal.task.QuartzTaskJob - Task bc3285fe-bc71-4d2b-ac3b-af42b0911a37 : 'repair component database from blob store' [blobstore.rebuildComponentDB] execution failure 
      java.lang.IllegalArgumentException: Blob is already attached to an asset 
      at com.google.common.base.Preconditions.checkArgument(Preconditions.java:135) 
      at org.sonatype.nexus.repository.storage.StorageTxImpl.attachBlob(StorageTxImpl.java:713) 
      at sun.reflect.GeneratedMethodAccessor186.invoke(Unknown Source) 
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
      at java.lang.reflect.Method.invoke(Method.java:498) 
      at org.sonatype.nexus.common.stateguard.SimpleMethodInvocation.proceed(SimpleMethodInvocation.java:53) 
      at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39) 
      at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:270) 
      at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:53) 
      at org.sonatype.nexus.common.stateguard.StateGuardAspect$1.invoke(StateGuardAspect.java:63) 
      at com.sun.proxy.$Proxy206.attachBlob(Unknown Source) 
      at org.sonatype.nexus.repository.maven.internal.MavenFacetImpl.putAssetPayload(MavenFacetImpl.java:428) 
      at org.sonatype.nexus.repository.maven.internal.MavenFacetImpl.putFile(MavenFacetImpl.java:415) 
      at org.sonatype.nexus.repository.maven.internal.MavenFacetImpl.put(MavenFacetImpl.java:397) 
      at org.sonatype.nexus.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:45) 
      at org.sonatype.nexus.blobstore.restore.maven.internal.MavenRestoreBlobStrategy.createAssetFromBlob(MavenRestoreBlobStrategy.java:112) 
      at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:56) 
      at org.sonatype.nexus.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:54) 
      at org.sonatype.nexus.blobstore.restore.maven.internal.MavenRestoreBlobStrategy.createAssetFromBlob(MavenRestoreBlobStrategy.java:1) 
      at org.sonatype.nexus.blobstore.restore.BaseRestoreBlobStrategy.doRestore(BaseRestoreBlobStrategy.java:111) 
      at org.sonatype.nexus.blobstore.restore.BaseRestoreBlobStrategy.restore(BaseRestoreBlobStrategy.java:79) 
      at org.sonatype.nexus.blobstore.restore.RestoreMetadataTask.restore(RestoreMetadataTask.java:128) 
      at org.sonatype.nexus.blobstore.restore.RestoreMetadataTask.execute(RestoreMetadataTask.java:99) 
      at org.sonatype.nexus.blobstore.restore.RestoreMetadataTask.execute(RestoreMetadataTask.java:1) 
      at org.sonatype.nexus.scheduling.TaskSupport.call(TaskSupport.java:93) 
      at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.doExecute(QuartzTaskJob.java:145) 
      at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.execute(QuartzTaskJob.java:108) 
      at org.quartz.core.JobRunShell.run(JobRunShell.java:202) 
      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) 
      2018-08-13 16:54:18,827-0500 INFO [quartz-5-thread-8] *SYSTEM org.sonatype.nexus.quartz.internal.task.QuartzTaskInfo - Task 'repair component database from blob store' [blobstore.rebuildComponentDB] state change RUNNING -> WAITING (FAILED)
      
      

        Attachments

          Activity

            People

            Assignee:
            mdodgson Mark Dodgson
            Reporter:
            rseddon Rich Seddon
            Last Updated By:
            Peter Lynch Peter Lynch
            Team:
            NXRM - Cypher
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title