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

NPE when using docker proxy and not sending a Host header

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Automatically Closed
    • Affects Version/s: 3.41.0, 3.41.1
    • Fix Version/s: None
    • Component/s: Docker, Docker-Nexus
    • Labels:
      None

      Description

       

      Hello,

      We are using Nexus Repo (in a docker container), and one of the use cases is to use it as a proxy for docker.io.

      After upgrading to 3.41.0 we are experiencing the following NPE's when using the docker cli to pull images.

       

      `*SYSTEM org.eclipse.jetty.server.HttpChannel - /v2/
      java.lang.NullPointerException: null
      	at org.sonatype.nexus.bootstrap.jetty.DockerSubdomainRepositoryMapping.get(DockerSubdomainRepositoryMapping.java:27)
      	at org.sonatype.nexus.bootstrap.jetty.DockerSubdomainRequestCustomizer.customize(DockerSubdomainRequestCustomizer.java:35)
      	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:384)
      	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
      	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
      	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
      	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
      	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:386)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
      	at java.lang.Thread.run(Thread.java:750)
      

      The issue https://community.sonatype.com/t/nexus-3-41-0-npe-error-when-using-docker-proxy-without-supplying-host-header/9199 has been created on the comunity forum. 

       

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              rdevries Richard de Vries
              Last Updated By:
              Daolong Qiu Daolong Qiu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title