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

NPM metadata request fails with "Missing blob and no handler set to recover"

    Details

    • Type: Bug
    • Status: New
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.37.3
    • Fix Version/s: None
    • Component/s: NPM
    • Labels:
    • Story Points:
      5
    • Notability:
      3

      Description

      Under a high load of requests to an NPM Group sometimes Nexus will fail to serve a npm component metadata with below error.

      "error": "Failed to stream response due to: Missing blob and no handler set to recover."

      This seems to be caused by a PUT npm hosted repo and GET npm group at the same time, so this is some race condition.

      1.2.3.4 - userA [24/Jan/2022:15:05:49 +0100] "PUT /nexus/repository/deploy.releases.npm/@test%2fff4200.olap.api HTTP/1.1" 200 860069 16 1127 "npm/7.9.0 node/v15.14.0 linux x64" [qtp19194263-435228]
      
      1.2.3.5 - - [24/Jan/2022:15:05:49 +0100] "GET /nexus/repository/build.releases.npm/@test%2fff4200.olap.api HTTP/1.1" 200 - 247 722 "npm/6.14.11 node/v12.21.0 linux x64" [qtp19194263-416333]
      

      Even though there is getting the npm metadata, a 200 response is given.

      The nexus.log shows:

      2022-01-24 15:05:49,509+0100 WARN  [qtp19194263-416333]  *UNKNOWN org.sonatype.nexus.blobstore.file.FileBlobStore - Attempt to access soft-deleted blob 3ffeede2-2cc7-4dc7-a46f-ebc081c38268 attributes: /home/nexus3/releases/content/vol-03/chap-09/3ffeede2-2cc7-4dc7-a46f-ebc081c38268.properties {deletedDateTime=1643033149450, deleted=true, @BlobStore.created-by=staging.deploy.releases.npm, creationTime=1643028834381, @BlobStore.created-by-ip=10.47.228.53, @BlobStore.content-type=application/json, sha1=bcf5954fe651c08a76ca574d520df153cdaa9898, @BlobStore.blob-name=@test/ff4200.olap.api, deletedReason=Updating asset AttachedEntityId{asset->#11:619850}, @Bucket.repo-name=deploy.releases.npm, size=10840710}
      
      2022-01-24 15:05:49,510+0100 WARN  [qtp19194263-416333]  *UNKNOWN com.sonatype.nexus.repository.npm.internal.orient.NpmStreamPayload - Missing blob for asset Asset{metadata=AttachedEntityMetadata{schema=asset, document=#11:619850{attributes:[5],last_downloaded:Mon Jan 24 09:05:52 CET 2022,bucket:#9:37,format:npm,last_updated:Mon Jan 24 13:53:54 CET 2022,component:null,name:@test/ff4200.olap.api,size:10840710,content_type:application/json,created_by:staging.deploy.releases.npm,created_by_ip:10.47.228.53,blob_ref:releases@74AEB255-C073D2EA-12616B6A-E621DB33-93D2D966:3ffeede2-2cc7-4dc7-a46f-ebc081c38268,blob_created:Thu Aug 15 11:15:58 CEST 2019,blob_updated:Mon Jan 24 13:53:54 CET 2022} v7044}, name=@test/ff4200.olap.api} and no handler set to recover, for package '@test/ff4200.olap.api' and rev 'unknown'
      

      Workaround:
      The only way to resolve the issue to rebuild the npm metadata on the npm hosted repo, but the same issue will occur again on another package.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              msurani Mahendra Surani
              Last Updated By:
              Grace Lee Grace Lee
              Team:
              NXRM - Mad Max
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Date of First Response:

                  tigCommentSecurity.panel-title