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

Intermittent MissingBlobExceptions for Concurrent Requests

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.34.0, 3.34.1, 3.35.0
    • Fix Version/s: 3.37.0
    • Component/s: Datastore, S3
    • Labels:
    • Notability:
      2

      Description

      With Nexus running with an external DB (Postgres) and S3 blob stores, concurrent requests for a given component can result in intermittent MissingBlobExceptions e.g.

      2021-10-19 14:10:44,781+0100 WARN  [qtp106385792-731]  admin org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Failure servicing: GET /repository/npm-group/jquery/-/jquery-3.0.0-alpha1.tgz
      org.sonatype.nexus.repository.MissingBlobException: Blob nxrm3_s3_1@7497B034-38F12563-E5468EBD-64EE63E9-44019354:f8d22ab0-326d-4de0-8cf4-a90dc7d3b708 exists in metadata, but is missing from the blobstore
      at org.sonatype.nexus.repository.content.fluent.internal.FluentAssetImpl.download(FluentAssetImpl.java:171)
      at java.util.Optional.map(Optional.java:215)
      at com.sonatype.nexus.repository.content.npm.internal.NpmContentProxyFacet.getTarball(NpmContentProxyFacet.java:348)
      at com.sonatype.nexus.repository.content.npm.internal.NpmContentProxyFacet.getCachedContent(NpmContentProxyFacet.java:141)
      at org.sonatype.nexus.repository.proxy.ProxyFacetSupport.maybeGetCachedContent(ProxyFacetSupport.java:383)
       at org.sonatype.nexus.repository.proxy.ProxyFacetSupport.get(ProxyFacetSupport.java:235)
       at org.sonatype.nexus.repository.proxy.ProxyHandler.handle(ProxyHandler.java:52)
       at org.sonatype.nexus.repository.view.Context.proceed(Context.java:88)
      

      To reproduce:

      1. Configure a Nexus instance with Postgres and S3 blob stores.

      2. Create an npm group repo consisting of an npm proxy to npmjs.org.

      3. Whilst tailing the request and nexus logs, make continuous parallel request for packages at the same time via the group repo e.g. 

      seq 100 | parallel --max-args 0 "curl -u admin:admin123 -O http://localhost:8081/repository/npm-group/jquery/-/jquery-3.0.0-alpha1.tgz"
      seq 100 | parallel --max-args 0 "curl -u admin:admin123 -O http://localhost:8081/repository/npm-group/jquery/-/jquery-3.6.0.tgz"
      

      (These commands may need to be issued multiple times).

      4. Observe that the request log will show that the requests for the same component will return 500 and 200 responses e.g.

      127.0.0.1 - admin [19/Oct/2021:14:10:42 +0100] "GET /repository/npm-group/jquery/-/jquery-3.0.0-alpha1.tgz HTTP/1.1" 200 - 229200 358 "curl/7.64.1" [qtp106385792-716]
      ...
      127.0.0.1 - admin [19/Oct/2021:14:10:44 +0100] "GET /repository/npm-group/jquery/-/jquery-3.0.0-alpha1.tgz HTTP/1.1" 500 - 1805 468 "curl/7.64.1" [qtp106385792-682]
      ...
      127.0.0.1 - admin [19/Oct/2021:14:10:45 +0100] "GET /repository/npm-group/jquery/-/jquery-3.0.0-alpha1.tgz HTTP/1.1" 200 - 229200 787 "curl/7.64.1" [qtp106385792-664]
      

      Expected:

      Nexus should handle concurrent requests for a component without throwing a MissingBlobException.

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dbradicich Damian Bradicich
              Reporter:
              hardeepn Hardeep Nagra
              Last Updated By:
              Joe Tom Joe Tom
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title