Artifactory / Docker - 从远程仓库拉取结果导致 artifcatory 和 docker 客户端出现异常

Artifactory / Docker - Pulling from a remote repo results in a exception in artifcatory and in the docker client

Artifactory Pro 版本 4.11.0

Docker 桌面客户端:enter image description here

具有映射到本地和远程存储库的虚拟存储库 (docker)。 当我如下拉取远程 docker 图像时,

docker拉docker.artifactory/nginx:最新

当我看到 repo(s) 是虚拟的和远程的时,它似乎被下载了 repo browser如所附的屏幕截图所示显示内容。

但我从 docker 客户端收到如下响应 2020-12-21T21:00:55Z dockerd time="2020-12-21T21:00:55.547679900Z" level=info msg="错误后尝试拉取下一个端点:收到意外的 HTTP 状态:500 内部服务器错误” 2020-12-21T21:00:55Z dockerd time="2020-12-21T21:00:55.552055900Z" level=error msg="POST /v1.41/[=36 的处理程序=] 返回错误:收到意外的 HTTP 状态:500 内部服务器错误"

并且在人工日志中,我看到以下错误

2020-12-21 20:37:30,047 [http-nio-8081-exec-10] [INFO ] (o.a.a.d.r.v.r.v.DockerV2VirtualRepoHandler:105) - Fetching docker manifest for repo 'nginx' and tag 'latest'
2020-12-21 20:37:31,812 [http-nio-8081-exec-10] [INFO ] (o.a.r.HttpRepo      :420) - docker-remote downloading https://registry-1.docker.io/v2/library/nginx/manifests/latest 1.33 KB 
2020-12-21 20:37:32,009 [http-nio-8081-exec-10] [INFO ] (o.a.r.HttpRepo      :433) - docker-remote downloaded  https://registry-1.docker.io/v2/library/nginx/manifests/latest 1.33 KB at 6.83 KB/sec
2020-12-21 20:37:32,871 [http-nio-8081-exec-10] [INFO ] (o.a.r.HttpRepo      :420) - docker-remote downloading https://registry-1.docker.io/v2/library/nginx/blobs/sha256:ae2feff98a0cc5095d97c6c283dcd33090770c76d63877caa99aefbbe4343bdd 7.31 KB 
2020-12-21 20:37:32,927 [http-nio-8081-exec-10] [INFO ] (o.a.r.HttpRepo      :433) - docker-remote downloaded  https://registry-1.docker.io/v2/library/nginx/blobs/sha256:ae2feff98a0cc5095d97c6c283dcd33090770c76d63877caa99aefbbe4343bdd 7.31 KB at 136.72 KB/sec
2020-12-21 20:37:33,132 [http-nio-8081-exec-6] [INFO ] (o.a.a.d.r.v.r.v.DockerV2VirtualRepoHandler:105) - Fetching docker manifest for repo 'nginx' and tag 'sha256:13e4551010728646aa7e1b1ac5313e04cf75d051fa441396832fcd6d600b5e71'
2020-12-21 20:37:33,132 [http-nio-8081-exec-6] [INFO ] (o.j.r.d.v.r.h.DockerV2LocalRepoHandler:533) - Fetching docker manifest for repo 'nginx' and digest 'sha256:13e4551010728646aa7e1b1ac5313e04cf75d051fa441396832fcd6d600b5e71' in repo 'docker-local'
2020-12-21 20:37:33,150 [http-nio-8081-exec-6] [ERROR] (o.a.r.c.e.GlobalExceptionMapper:48) - null
java.lang.NullPointerException: null
    at org.artifactory.addon.docker.rest.v2.repo.virtual.DockerV2VirtualRepoHandler.execute(DockerV2VirtualRepoHandler.java:178) ~[artifactory-addon-docker-5.0.1.jar:na]
    at org.artifactory.addon.docker.rest.v2.repo.virtual.DockerV2VirtualRepoHandler.getManifest(DockerV2VirtualRepoHandler.java:106) ~[artifactory-addon-docker-5.0.1.jar:na]
    at org.jfrog.repomd.docker.v2.rest.DockerV2Resource.getManifest(DockerV2Resource.java:81) ~[docker-4.3.21.jar:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_102]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_102]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_102]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_102]
    at com.sun.jersey.spi.container.JavaMethodInvokerFactory.invoke(JavaMethodInvokerFactory.java:60) ~[jersey-server-1.19.jar:1.19]
    at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) ~[jersey-server-1.19.jar:1.19]
    at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) ~[jersey-server-1.19.jar:1.19]
    at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) ~[jersey-server-1.19.jar:1.19]
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) ~[jersey-server-1.19.jar:1.19]
    at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137) ~[jersey-server-1.19.jar:1.19]
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) ~[jersey-server-1.19.jar:1.19]
    at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) ~[jersey-server-1.19.jar:1.19]
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) ~[jersey-server-1.19.jar:1.19]
    at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) ~[jersey-server-1.19.jar:1.19]
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542) [jersey-server-1.19.jar:1.19]
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473) [jersey-server-1.19.jar:1.19]
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419) [jersey-server-1.19.jar:1.19]
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409) [jersey-server-1.19.jar:1.19]
    at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409) [jersey-servlet-1.19.jar:1.19]
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558) [jersey-servlet-1.19.jar:1.19]
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733) [jersey-servlet-1.19.jar:1.19]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) [servlet-api.jar:na]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) [catalina.jar:8.0.39]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.39]
    at org.artifactory.webapp.servlet.RepoFilter.execute(RepoFilter.java:185) [artifactory-web-application-5.0.1.jar:na]
    at org.artifactory.webapp.servlet.RepoFilter.doFilter(RepoFilter.java:94) [artifactory-web-application-5.0.1.jar:na]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.39]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.39]
    at org.artifactory.webapp.servlet.AccessFilter.useAuthentication(AccessFilter.java:399) [artifactory-web-application-5.0.1.jar:na]
    at org.artifactory.webapp.servlet.AccessFilter.authenticateAndExecute(AccessFilter.java:275) [artifactory-web-application-5.0.1.jar:na]
    at org.artifactory.webapp.servlet.AccessFilter.doFilterInternal(AccessFilter.java:205) [artifactory-web-application-5.0.1.jar:na]
    at org.artifactory.webapp.servlet.AccessFilter.doFilter(AccessFilter.java:165) [artifactory-web-application-5.0.1.jar:na]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.39]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.39]
    at org.artifactory.webapp.servlet.RequestFilter.doFilter(RequestFilter.java:67) [artifactory-web-application-5.0.1.jar:na]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.39]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.39]
    at org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:164) [spring-session-1.2.2.RELEASE.jar:na]
    at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:80) [spring-session-1.2.2.RELEASE.jar:na]
    at org.artifactory.webapp.servlet.SessionFilter.doFilter(SessionFilter.java:62) [artifactory-web-application-5.0.1.jar:na]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.39]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.39]
    at org.artifactory.webapp.servlet.ArtifactoryFilter.doFilter(ArtifactoryFilter.java:116) [artifactory-web-application-5.0.1.jar:na]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.39]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.39]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) [catalina.jar:8.0.39]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [catalina.jar:8.0.39]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) [catalina.jar:8.0.39]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [catalina.jar:8.0.39]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [catalina.jar:8.0.39]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:509) [catalina.jar:8.0.39]
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1104) [tomcat-coyote.jar:8.0.39]
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684) [tomcat-coyote.jar:8.0.39]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520) [tomcat-coyote.jar:8.0.39]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476) [tomcat-coyote.jar:8.0.39]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_102]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_102]
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.0.39]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102]

Artifactory 4.11.0 非常旧,Docker 自该版本以来发生了很大变化。您正在尝试下载“多架构图像”,并且直到 Artifactory 才引入对此的支持,直到 6.5.1。 Docker(集线器和客户端)以及 Artifactory 与其交互的方式还有很多其他更改,您应该升级到最新版本的 Artifactory。至少,您应该升级到最新的 6.x,最好是升级到最新的 7.x,尽管这有点复杂。