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

Docker pull through proxy repository fails if remote is not available

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.1
    • Fix Version/s: 3.0.2
    • Component/s: Docker
    • Labels:
    • Story Points:
      3
    • Sprint:
      Sprint 74

      Description

      Set up a docker proxy repository against dockerhub, pull an image through it.

      Then disable outbound network access (for testing, I did this by setting an http proxy server that doesn't exist in the HTTP settings).

      Then try to pull the image again. This fails with a 502 error.

      docker pull 192.168.1.83:18887/tomcat
      Using default tag: latest
      Error response from daemon: Received unexpected HTTP status: 502 Bad Gateway

      The nexus.log shows what you would expect:

      2016-06-29 12:32:40,579-0500 INFO  [qtp384210737-175] admin org.sonatype.nexus.internal.httpclient.HttpClientManagerImpl - Saving configuration: HttpClientConfiguration{connection=null, proxy=ProxyConfiguration{http=ProxyServerConfiguration{enabled=true, host='192.168.1.65', port=8889, authentication=null}, https=null, nonProxyHosts=null}, authentication=null}
      2016-06-29 12:32:47,533-0500 WARN  [qtp384210737-73] admin org.sonatype.nexus.repository.docker.internal.DockerProxyFacetImpl - Failed to fetch: v2/library/tomcat/manifests/latest
      org.apache.http.conn.HttpHostConnectException: Connect to 192.168.1.65:8889 [/192.168.1.65] failed: Connection refused
      	at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:151) [na:na]
      	at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) [na:na]
      	at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:388) [na:na]
      	at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) [na:na]
      	at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) [na:na]
      	at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) [na:na]
      	at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) [na:na]
      	at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) [httpcore:0.0.0]
      	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) [httpcore:0.0.0]
      	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55) [httpcore:0.0.0]
      	at org.sonatype.nexus.repository.httpclient.FilteredHttpClient$2.call(FilteredHttpClient.java:196) [org.sonatype.nexus.repository:3.0.1.01]
      	at org.sonatype.nexus.repository.httpclient.FilteredHttpClient$2.call(FilteredHttpClient.java:1) [org.sonatype.nexus.repository:3.0.1.01]
      	at org.sonatype.nexus.repository.httpclient.FilteredHttpClient.filter(FilteredHttpClient.java:99) [org.sonatype.nexus.repository:3.0.1.01]
      	at org.sonatype.nexus.repository.httpclient.FilteredHttpClient.execute(FilteredHttpClient.java:192) [org.sonatype.nexus.repository:3.0.1.01]
      	at org.sonatype.nexus.repository.docker.internal.DockerProxyFacetImpl.execute(DockerProxyFacetImpl.java:285) [na:na]
      	at org.sonatype.nexus.repository.proxy.ProxyFacetSupport.fetch(ProxyFacetSupport.java:222) [org.sonatype.nexus.repository:3.0.1.01]
      	at org.sonatype.nexus.repository.proxy.ProxyFacetSupport.fetch(ProxyFacetSupport.java:202) [org.sonatype.nexus.repository:3.0.1.01]
      	at org.sonatype.nexus.repository.proxy.ProxyFacetSupport.get(ProxyFacetSupport.java:164) [org.sonatype.nexus.repository:3.0.1.01]
      	at org.sonatype.nexus.repository.proxy.ProxyHandler.handle(ProxyHandler.java:48) [org.sonatype.nexus.repository:3.0.1.01]
      	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:79) [org.sonatype.nexus.repository:3.0.1.01]
      	at org.sonatype.nexus.repository.storage.UnitOfWorkHandler.handle(UnitOfWorkHandler.java:39) [org.sonatype.nexus.repository:3.0.1.01]
      

        Attachments

          Activity

            People

            • Assignee:
              jtom Joe Tom
              Reporter:
              rseddon Rich Seddon
              Last Updated By:
              Peter Lynch
            • Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: