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

Docker - Delete unused manifests and images fails with "java.lang.IllegalStateException: Unit of work has not been set"

    Details

    • Notability:
      2
    • InvestmentLayer:
      support-escalated
    • Aha Concept:
      non-concept

      Description

      Docker - Delete unused manifests and images ( repository.docker.gc ) task is consistently failing with this exception in one customer deployment:

      2022-02-16 15:16:53,375+0300 WARN [quartz-10-thread-19] *SYSTEM org.sonatype.nexus.repository.docker.internal.orient.DockerGCFacetImpl - Unable to read V2 Manifest for asset Asset{metadata=AttachedEntityMetadata{schema=asset, document=asset#56:254389
      \{bucket}
      v1}, name=v2/ci00411341/ci01086783_poirot/example/manifests/poirot-1.227-test}, Blob docker_proxy@DF6AC0EE-F9F6C968-665DBDC2-620D6A6C-81E8C610:e49dde84-0721-4264-9b6c-570d77abf074 exists in metadata, but is missing from the blobstore
       2022-02-16 15:39:22,725+0300 ERROR [quartz-10-thread-19] *SYSTEM org.sonatype.nexus.repository.docker.tasks.DockerGCTask - Failed to run task 'Docker - Delete unused manifests and images' on repository 'docker_proxy'
       java.lang.IllegalStateException: Unit of work has not been set
       at com.google.common.base.Preconditions.checkState(Preconditions.java:510)
       at org.sonatype.nexus.transaction.UnitOfWork.currentWork(UnitOfWork.java:229)
       at org.sonatype.nexus.transaction.UnitOfWork.end(UnitOfWork.java:119)
       at org.sonatype.nexus.repository.docker.internal.orient.DockerGCFacetImpl.deleteUnusedManifestsAndImages(DockerGCFacetImpl.java:107)
       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.docker.tasks.DockerGCTask.execute(DockerGCTask.java:48)
       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)
      

      Component database was checked for corruption and none found.

      Expected

      Determine what is leading to this failure and prevent it.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            plynch Peter Lynch
            Last Updated By:
            Nicholas Blair Nicholas Blair
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                tigCommentSecurity.panel-title