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

Repository blob store set incorrectly after error in "admin - change repository blob store" task

    XMLWordPrintable

    Details

    • Notability:
      3

      Description

      1. Start Nexus Repo 3.28.1, upload some content to a repository
      2. Create a new blob store
      3. Promote that blob store to a group
      4. Create an "admin - change repository blob store" task.  For the destination blob store choose the promoted blob store.
      5. Run the task

      This will fail with errors.  Note: The task should not allow saving if a promoted blob store is chosen, but it does.

      Observe that the repository still functions normally, content can be downloaded.

      1. Create a new blob store
      2. Change the destination repository in the "admin - change repository blob store" task to be the new blob store
      3. Run the task.

      The task appears to work, but the attempts to download any files from the repository fail with error. The logs show the blob files cannot be found.

      Examination of the task log shows warnings, and NPE's logged at INFO level:

       

      2020-11-16 13:59:53,073-0600 WARN [change-blobstore-moves-3-thread-5] *SYSTEM org.sonatype.nexus.blobstore.file.FileBlobStore - Attempt to access non-existent blob 2abfc011-2827-4105-8f43-75292d704e50 (/Users/rseddon/temp/sonatype-work/nexus3/blobs/abc/content/vol-31/chap-19/2abfc011-2827-4105-8f43-75292d704e50.properties)
      2020-11-16 13:59:53,075-0600 INFO [change-blobstore-moves-3-thread-9] *SYSTEM com.sonatype.nexus.repository.move.internal.MoveBlobService - Failed to move blob with id: af3ab30f-48a9-40e5-a8e4-e88967365c64
      java.lang.NullPointerException: null
      at org.sonatype.nexus.repository.internal.blobstore.BlobStoreManagerImpl.moveBlob(BlobStoreManagerImpl.java:407)
      at com.sonatype.nexus.repository.move.internal.MoveBlobService.lambda$1(MoveBlobService.java:72)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at org.sonatype.nexus.thread.internal.MDCAwareRunnable.run(MDCAwareRunnable.java:40)
      at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120)
      at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)

       

      Mitigation: Use an "admin - change repository blob store" task to move the repository back to the original blob store. This will restore consistency. 

       
       
       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mallen Mick Allen
              Reporter:
              rseddon Rich Seddon
              Last Updated By:
              Andrew Ivasenko Andrew Ivasenko
              Team:
              NXRM - Operations/Groot
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title