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

UNAVAILABLE repository status creates confusing user experience


    • Notability:


      Create a maven 2 proxy repo to remote URL https://packages.atlassian.com/mvn/maven-external/. Make sure the setting Auto blocking enabled is NOT turned on ( checked ). Save.

      Send an inbound request for an artifact that does not exist at the remote site, but causes the remote site to return 401 response. A 401 response from a remote is intended to auto-block a repository ( if the Auto block feature is enabled ).


      Client requests this http://localhost:8081/repository/atlassian-maven/com/example/example/0.1.029/maven-metadata.xml
      NXRM sends to remote and gets 401, then sets the repo status to unavailable:

      2020-08-24 14:06:34,530-0300 DEBUG [qtp509580950-51] admin org.sonatype.nexus.httpclient.outbound - https://packages.atlassian.com/mvn/maven-external/com/example/example/0.1.029-SNAPSHOT/maven-metadata.xml > GET /mvn/maven-external/com/example/example/0.1.029/maven-metadata.xml HTTP/1.1
      2020-08-24 14:06:34,877-0300 DEBUG [qtp509580950-51] admin org.sonatype.nexus.httpclient.outbound - https://packages.atlassian.com/mvn/maven-external/com/example/example/0.1.029/maven-metadata.xml < HTTP/1.1 401 Unauthorized @ 345.5 ms
      2020-08-24 14:06:34,878-0300 INFO  [qtp509580950-51] admin org.sonatype.nexus.repository.httpclient.internal.HttpClientCustomConfigFacetImpl - Repository status for atlassian-maven changed from READY to UNAVAILABLE - reason Unauthorized for https://packages.atlassian.com
      2020-08-24 14:06:34,881-0300 WARN  [qtp509580950-51] admin org.sonatype.nexus.repository.maven.internal.orient.MavenProxyFacet - Exception org.sonatype.nexus.repository.proxy.ProxyServiceException: HTTP/1.1 401 Unauthorized checking remote for update, proxy repo atlassian-maven failed to fetch com/example/example/0.1.029/maven-metadata.xml with status line HTTP/1.1 401 Unauthorized, content not in cache.


      When the Auto blocking feature for a proxy repository is disabled, then the repository should never appear to become blocked automatically or have the repo status set to anything other than READY or AVAILABLE.

      Find some other way to surface sporadic 401 responses from the remote, when most requests work.

      Note: There is a manual set Blocked setting - that setting is independent and takes precedence if turned on.


      The UNAVAILABLE status doesn't indicate the repository is blocked, there is a distinct AUTO_BLOCKED_UNAVAILABLE for that. The intent of the UNAVAILABLE status was meant to surface a potential connection error.

      This UNAVAILABLE repo status was introduced by NEXUS-16539 as of 3.11.0

      The side effect is the entire repo status changes for a single failed 401 request, when many/all others may actually work fine:

      The value we might have thought this status added is lost - it actually causes more confusion because the repository is still available and ready despite what the UI and logs indicate.




            Unassigned Unassigned
            plynch Peter Lynch
            Last Updated By:
            Joe Tom Joe Tom
            NXRM - Neo
            0 Vote for this issue
            5 Start watching this issue


              Date of First Response: