我正在使用 Nexus 3.5.0-02 和两个 Docker 存储库。一种用于快照,一种用于发布。快照存储库工作正常。但从昨天开始,当我尝试从发布存储库中拉取或推送 Docker 映像时,我得到了
MissingBlobException
。
org.sonatype.nexus.repository.storage.RetryDeniedException: Reached max retries: 8/8
6.10.2017 15:17:14 at org.sonatype.nexus.repository.storage.StorageTxImpl.allowRetry(StorageTxImpl.java:216)
6.10.2017 15:17:14 at sun.reflect.GeneratedMethodAccessor342.invoke(Unknown Source)
6.10.2017 15:17:14 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
6.10.2017 15:17:14 at java.lang.reflect.Method.invoke(Method.java:498)
6.10.2017 15:17:14 at org.sonatype.nexus.common.stateguard.SimpleMethodInvocation.proceed(SimpleMethodInvocation.java:53)
6.10.2017 15:17:14 at org.sonatype.nexus.common.stateguard.StateGuardAspect$1.invoke(StateGuardAspect.java:69)
6.10.2017 15:17:14 at com.sun.proxy.$Proxy226.allowRetry(Unknown Sour
.
.
.
6.10.2017 15:17:14Caused by: org.sonatype.nexus.repository.storage.MissingBlobException: Blob default@1E8F08E5-2C4760ED-7456B67F-5BA48EFB-5A2C18C3:abfa2c22-259a-49bd-85de-4d0431dc0174 exists in metadata, but is missing from the blobstore
6.10.2017 15:17:14 at org.sonatype.nexus.repository.storage.StorageTxImpl.requireBlob(StorageTxImpl.java:847)
6.10.2017 15:17:14 at sun.reflect.GeneratedMethodAccessor252.invoke(Unknown Source)
6.10.2017 15:17:14 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
6.10.2017 15:17:14 at java.lang.reflect.Method.invoke(Method.java:498)
6.10.2017 15:17:14 at org.sonatype.nexus.common.stateguard.SimpleMethodInvocation.proceed(SimpleMethodInvocation.java:53)
6.10.2017 15:17:14 at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
6.10.2017 15:17:14 at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:270)
6.10.2017 15:17:14 at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:53)
6.10.2017 15:17:14 at org.sonatype.nexus.common.stateguard.StateGuardAspect$1.invoke(StateGuardAspect.java:63)
6.10.2017 15:17:14 at com.sun.proxy.$Proxy226.requireBlob(Unknown Source)
6.10.2017 15:17:14 at org.sonatype.nexus.repository.docker.internal.DockerHostedFacetImpl.getManifestByTag(DockerHostedFacetImpl.java:745)
6.10.2017 15:17:14 at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:56)
6.10.2017 15:17:14 ... 147 common frames omitted
并非每个 Docker 镜像存储库都会出现此问题。但是,如果它发生在某些图像上,则无法拉或推该图像。我发现,当我推送镜像时出现这个异常,Docker镜像的一层无法存储。
我无法解释 Nexus 内部发生的事情。但有没有解决这个问题的方法或解决办法?
我在 Nexus 上的 Maven 存储库也遇到了同样的问题
3.7.1-02
。就我而言,是快照存储库损坏了。
Blob efs-maven-snapshots@A8699C1C-BF3D1E08-7499E994-765D71F0-8D62CAF3:4eb114a2-a83f-4601-b40e-d582f198a75f exists in metadata, but is missing from the blobstore
我设法通过 Nexus GUI 删除存储库、保留 Blob 存储,然后再次创建存储库来修复此问题。