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

MissingBlobException accessing blob in group repo member prevents the same path from being served from any other group repo member and stops group request processing

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Not A Bug
    • Affects Version/s: 3.40.1
    • Fix Version/s: None
    • Labels:
      None

      Description

      Summary

      Group repo full processing may fail if there is a problem processing one member of the group.

      This was reproduced with 3.40.1 and PostgreSQL.

      Reproduce

      1. Create a nested group repo structure like this:

      ├ ⧈ maven-public (maven2-group)
      │   ├ ▶ maven-central (maven2-proxy) ≻ https://repo1.maven.org/maven2/
      

      2. Download a file through the group "maven-public" - this returns 200 status as expected

      curl -v -u admin:admin123 -k http://localhost:8081/repository/maven-public/abbot/abbot/0.13.0/abbot-0.13.0.pom -o /dev/null
      

      3. Create another central proxy repo:

      other-maven-central (maven2-proxy) ≻ https://repo1.maven.org/maven2/
      

      4. Download the same file through it:

      curl -v -u admin:admin123 -k http://localhost:8081/repository/other-maven-central/abbot/abbot/0.13.0/abbot-0.13.0.pom -o /dev/null
      

      5. Now remove the on-disk blob properties file for the abbot-0.13.0.pom cached by the "other-maven-central" repo - this is to simulate a problem accessing that file in the blobstore.
      6. Now alter the maven-public group structure like this:

      ├ ⧈ maven-public (maven2-group)
      │   ├ ▶ other-maven-central (maven2-proxy) ≻ https://repo1.maven.org/maven2/
      │   ├ ▶ maven-central (maven2-proxy) ≻ https://repo1.maven.org/maven2/
      

      Notice the other-maven-central proxy is ordered BEFORE the maven-central proxy
      7. Now try to download the same file, through the maven-public group:

      curl -v -u admin:admin123 -k http://localhost:8081/repository/maven-public/abbot/abbot/0.13.0/abbot-0.13.0.pom -o /dev/null
      

      This fails unexpected with a 500 status code. The nexus.log contains a stack trace that starts with:

      2022-08-12 10:12:54,306-0300 WARN  [qtp1953992751-124] admin org.sonatype.nexus.blobstore.file.FileBlobStore - Attempt to access non-existent blob attributes file /nexus/sonatype-work/nexus3/blobs/default/content/vol-39/chap-01/8689c111-1ace-4b5a-8e4a-16df2a9d025e.properties for blob 8689c111-1ace-4b5a-8e4a-16df2a9d025e
      2022-08-12 10:12:54,307-0300 WARN  [qtp1953992751-124] admin org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Failure servicing: GET /repository/maven-public/abbot/abbot/0.13.0/abbot-0.13.0.pom
      org.sonatype.nexus.repository.MissingBlobException: Blob default@caf19543-f97d3720-a6f8509b-ca6319c5-8a4e252e:8689c111-1ace-4b5a-8e4a-16df2a9d025e exists in metadata, but is missing from the blobstore
      	at org.sonatype.nexus.repository.content.fluent.internal.FluentAssetImpl.download(FluentAssetImpl.java:173)
      	at java.util.Optional.map(Optional.java:215)
      	at org.sonatype.nexus.content.maven.internal.recipe.MavenContentFacetImpl.get(MavenContentFacetImpl.java:209)
      	at org.sonatype.nexus.content.maven.internal.recipe.MavenProxyFacet.getCachedContent(MavenProxyFacet.java:88)
      	at org.sonatype.nexus.repository.proxy.ProxyFacetSupport.maybeGetCachedContent(ProxyFacetSupport.java:413)
      	at org.sonatype.nexus.repository.proxy.ProxyFacetSupport.get(ProxyFacetSupport.java:271)
      	at org.sonatype.nexus.repository.proxy.ProxyHandler.handle(ProxyHandler.java:53)
      	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:88)
      	at org.sonatype.nexus.repository.content.handlers.LastDownloadedHandler.handle(LastDownloadedHandler.java:58)
      

      Group repository processing is intended to look for the requested path in a group repo member list, in defined member order and serve the first found item, or in the case of metadata request, merge all metadata from all members that do not have any failure. Group request processing must not stop just because one group member has a problem.

      Expected

      A single error of ANY KIND in a lookup for an asset/component in a group repo member request should not prevent the lookup continuing to try and locate (and then serve or merge the same item if found) an item in other group repo members.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            plynch Peter Lynch
            Last Updated By:
            Michael Prescott Michael Prescott
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title