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

"Admin - Remove a member from a blob store group" aborts execution if a file can't be found

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: New
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.20.1
    • Fix Version/s: None
    • Component/s: S3, Scheduled Tasks
    • Labels:
    • Notability:
      3

      Description

      When running the ""Admin - Remove a member from a blob store group" " against a blob store, if a blob properties file can't be found, or an I/O exception occurs when reading it an NPE will occur. This NPE will cause the entire task to abort execution. Note that this NPE was observed against an S3 blob store. But the expected behavior described below applies to both file and s3 blob stores.

      Expected:  The NPE should be guarded.  If a properties file can't be found, or an I/O error occurs the problem should be logged, and the task should keep going and log the failure.  For a file that can't be found or read for any reason we need to log the path that couldn't be accessed. Log a WARN for can't be found, ERROR for I/O error.  If either of those conditions occurs the task should fail at the end, and not delete the source blob store, so the user has a chance to examine the failures and determine if the task should be re-run.

      The above assumes the task works by scanning blob storage.  If the task works by scanning the component database we will have to reconsider.  We wouldn't want millions of log messages created if the task was run when a network blob store was not connected. 

      java.util.concurrent.ExecutionException: java.lang.NullPointerException
      at java.util.concurrent.ForkJoinTask.get(ForkJoinTask.java:1006)
      at com.sonatype.nexus.blobstore.group.internal.tasks.BlobStoreGroupMemberRemovalTask.execute(BlobStoreGroupMemberRemovalTask.java:124)
      at org.sonatype.nexus.scheduling.TaskSupport.call(TaskSupport.java:100)
      at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.doExecute(QuartzTaskJob.java:143)
      at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.execute(QuartzTaskJob.java:106)
      at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
      at org.sonatype.nexus.quartz.internal.QuartzThreadPool.lambda$0(QuartzThreadPool.java:143)
      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.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      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)
      Caused by: java.lang.NullPointerException: null
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:598)
      at java.util.concurrent.ForkJoinTask.get(ForkJoinTask.java:1005)
      ... 14 common frames omitted
      Caused by: java.lang.NullPointerException: null
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:598)
      at java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:677)
      at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:735)
      at java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:159)
      at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:173)
      at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
      at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
      at com.sonatype.nexus.blobstore.group.internal.tasks.BlobStoreGroupMemberRemovalTask.lambda$2(BlobStoreGroupMemberRemovalTask.java:124)
      at java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1386)
      at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
      at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
      at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
      at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
      Caused by: java.lang.NullPointerException: null
      at com.sonatype.nexus.blobstore.group.internal.tasks.BlobStoreGroupMemberRemovalTask.moveBlob(BlobStoreGroupMemberRemovalTask.java:180)
      at com.sonatype.nexus.blobstore.group.internal.tasks.BlobStoreGroupMemberRemovalTask.lambda$1(BlobStoreGroupMemberRemovalTask.java:119)
      at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
      at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
      at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
      at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
      at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
      at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:290)
      at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
      ... 4 common frames omitted

       

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              rseddon Rich Seddon
              Last Updated By:
              Peter Lynch
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Date of First Response:

                  tigCommentSecurity.panel-title