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

Helm proxy repositories return 500 instead of 404. Log shows NPE

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 3.29.1
    • Fix Version/s: None
    • Component/s: helm

      Description

      The fix for NEXUS-25611 has introduced a regression. A helm proxy repository will now return a 500 error response when it should return 404.  

      To reproduce, upload a helm package to a hosted helm repository.  I've attached the one I used. 

      Create a helm proxy to that repository in a 3.29.1 instance.   Request the tgz with a different version through the proxy, e.g.:

       http://localhost:8083/repository/helm-proxy/mysql-6.14.9.tgz

      This will fail with a 500 response.

      Check the logs, they will show an NPE:

      2020-12-29 11:26:34,833-0600 WARN [qtp1054182676-212] admin org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Failure servicing: GET /repository/helm-proxy/mysql-6.14.9.tgz
      java.lang.NullPointerException: null
      at java.net.URI$Parser.parse(URI.java:3068)
      at java.net.URI.<init>(URI.java:588)
      at java.net.URI.create(URI.java:850)
      at java.net.URI.resolve(URI.java:1036)
      at org.sonatype.nexus.repository.proxy.ProxyFacetSupport.fetch(ProxyFacetSupport.java:419)
      at org.sonatype.nexus.repository.proxy.ProxyFacetSupport.fetch(ProxyFacetSupport.java:408)
      at org.sonatype.nexus.repository.proxy.ProxyFacetSupport.doGet(ProxyFacetSupport.java:275)
      at org.sonatype.nexus.repository.proxy.ProxyFacetSupport.lambda$1(ProxyFacetSupport.java:251)
      at org.sonatype.nexus.common.io.CooperatingFuture.performCall(CooperatingFuture.java:122)
      at org.sonatype.nexus.common.io.CooperatingFuture.call(CooperatingFuture.java:64)
      at org.sonatype.nexus.common.io.ScopedCooperationFactorySupport$ScopedCooperation.cooperate(ScopedCooperationFactorySupport.java:99)
      at org.sonatype.nexus.repository.proxy.ProxyFacetSupport.get(ProxyFacetSupport.java:242)
      at org.sonatype.nexus.repository.proxy.ProxyHandler.handle(ProxyHandler.java:52)
      at org.sonatype.nexus.repository.view.Context.proceed(Context.java:88)
      at org.sonatype.nexus.repository.storage.UnitOfWorkHandler.handle(UnitOfWorkHandler.java:39)
      at org.sonatype.nexus.repository.view.Context.proceed(Context.java:88)
      at org.sonatype.nexus.repository.view.handlers.ContentHeadersHandler.handle(ContentHeadersHandler.java:46)
      at org.sonatype.nexus.repository.view.Context.proceed(Context.java:88)
      at org.sonatype.nexus.repository.http.PartialFetchHandler.handle(PartialFetchHandler.java:59)
      at org.sonatype.nexus.repository.view.Context.proceed(Context.java:88)
      at org.sonatype.nexus.repository.cache.NegativeCacheHandler.handle(NegativeCacheHandler.java:56)
      at org.sonatype.nexus.repository.view.Context.proceed(Context.java:88)
      at com.sonatype.nexus.clm.internal.orient.FirewallContributedHandler.handle(FirewallContributedHandler.java:101)
      at org.sonatype.nexus.repository.view.Context.proceed(Context.java:88)
      at com.sonatype.nexus.usertoken.plugin.internal.UserTokenHandler.handle(UserTokenHandler.java:72)
      at org.sonatype.nexus.repository.view.Context.proceed(Context.java:88)
      at org.sonatype.nexus.repository.view.handlers.HandlerContributor.handle(HandlerContributor.java:67)
      at org.sonatype.nexus.repository.view.Context.proceed(Context.java:88)
      at org.sonatype.nexus.repository.view.handlers.ExceptionHandler.handle(ExceptionHandler.java:42)

       

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              rseddon Rich Seddon
              Last Updated By:
              Joe Tom Joe Tom
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  tigCommentSecurity.panel-title