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

Cleanup service task failing with NPE

    XMLWordPrintable

    Details

    • Story Points:
      0
    • Notability:
      3

      Description

      Cleanup service task fails consistently on our nexus repository. I have tried deleting it and restarting the service to recreate it. It always end up in the same state

       

      Log from the general log

      2019-05-08 10:40:45,108+0200 INFO  [qtp9548576-163]  jsp org.sonatype.nexus.quartz.internal.task.QuartzTaskInfo - Task 'Cleanup service' [repository.cleanup] runNow
      2019-05-08 10:40:45,109+0200 INFO  [qtp9548576-163]  jsp org.sonatype.nexus.quartz.internal.task.QuartzTaskInfo - Task 'Cleanup service' [repository.cleanup] state change WAITING -> RUNNING
      2019-05-08 10:40:45,161+0200 INFO  [quartz-3-thread-2]  *SYSTEM org.sonatype.nexus.cleanup.internal.task.CleanupTask - Task log: /nexus-data/log/tasks/repository.cleanup-20190508104045152.log
      2019-05-08 10:40:45,162+0200 INFO  [quartz-3-thread-2]  *SYSTEM org.sonatype.nexus.cleanup.internal.task.CleanupTask - Starting cleanup
      2019-05-08 10:40:45,169+0200 WARN  [quartz-3-thread-2]  *SYSTEM org.sonatype.nexus.quartz.internal.task.QuartzTaskJob - Task 605b2ab3-008a-4d3a-9168-aadb3ef7976b : 'Cleanup service' [repository.cleanup] execution failure
      java.lang.NullPointerException: null
          at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:882)
          at org.sonatype.nexus.cleanup.internal.storage.orient.OrientCleanupPolicyEntityAdapter.get(OrientCleanupPolicyEntityAdapter.java:133)
          at org.sonatype.nexus.cleanup.internal.storage.orient.OrientCleanupPolicyStorage.lambda$3(OrientCleanupPolicyStorage.java:95)
          at org.sonatype.nexus.orient.transaction.OrientOperations.lambda$1(OrientOperations.java:56)
          at org.sonatype.nexus.transaction.OperationPoint.proceed(OperationPoint.java:64)
          at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:56)
          at org.sonatype.nexus.transaction.Operations.transactional(Operations.java:200)
          at org.sonatype.nexus.transaction.Operations.call(Operations.java:146)
          at org.sonatype.nexus.orient.transaction.OrientOperations.call(OrientOperations.java:56)
          at org.sonatype.nexus.cleanup.internal.storage.orient.OrientCleanupPolicyStorage.get(OrientCleanupPolicyStorage.java:95)
          at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
          at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:272)
          at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:53)
          at org.sonatype.nexus.cleanup.internal.service.CleanupServiceImpl.findPolicy(CleanupServiceImpl.java:128)
          at org.sonatype.nexus.cleanup.internal.service.CleanupServiceImpl.cleanup(CleanupServiceImpl.java:93)
          at org.sonatype.nexus.cleanup.internal.service.CleanupServiceImpl.lambda$0(CleanupServiceImpl.java:83)
          at com.google.common.collect.ImmutableList.forEach(ImmutableList.java:407)
          at org.sonatype.nexus.cleanup.internal.service.CleanupServiceImpl.cleanup(CleanupServiceImpl.java:81)
          at org.sonatype.nexus.cleanup.internal.task.CleanupTask.execute(CleanupTask.java:43)
          at org.sonatype.nexus.scheduling.TaskSupport.call(TaskSupport.java:93)
          at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.doExecute(QuartzTaskJob.java:145)
          at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.execute(QuartzTaskJob.java:108)
          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)
      2019-05-08 10:40:45,171+0200 INFO  [quartz-3-thread-2]  *SYSTEM org.sonatype.nexus.quartz.internal.task.QuartzTaskInfo - Task 'Cleanup service' [repository.cleanup] state change RUNNING -> WAITING (FAILED)
      

      Log from the specific task execution log file

      2019-05-08 10:40:45,155+0200 INFO  [quartz-3-thread-2]  *SYSTEM org.sonatype.nexus.cleanup.internal.task.CleanupTask - Task information:
      2019-05-08 10:40:45,158+0200 INFO  [quartz-3-thread-2]  *SYSTEM org.sonatype.nexus.cleanup.internal.task.CleanupTask -  ID: 605b2ab3-008a-4d3a-9168-aadb3ef7976b
      2019-05-08 10:40:45,158+0200 INFO  [quartz-3-thread-2]  *SYSTEM org.sonatype.nexus.cleanup.internal.task.CleanupTask -  Type: repository.cleanup
      2019-05-08 10:40:45,158+0200 INFO  [quartz-3-thread-2]  *SYSTEM org.sonatype.nexus.cleanup.internal.task.CleanupTask -  Name: Cleanup service
      2019-05-08 10:40:45,158+0200 INFO  [quartz-3-thread-2]  *SYSTEM org.sonatype.nexus.cleanup.internal.task.CleanupTask -  Description: Run repository cleanup
      2019-05-08 10:40:45,162+0200 INFO  [quartz-3-thread-2]  *SYSTEM org.sonatype.nexus.cleanup.internal.task.CleanupTask - Starting cleanup
      2019-05-08 10:40:45,168+0200 ERROR [quartz-3-thread-2]  *SYSTEM org.sonatype.nexus.cleanup.internal.task.CleanupTask - Failed to run task 'Run repository cleanup'
      java.lang.NullPointerException: null
          at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:882)
          at org.sonatype.nexus.cleanup.internal.storage.orient.OrientCleanupPolicyEntityAdapter.get(OrientCleanupPolicyEntityAdapter.java:133)
          at org.sonatype.nexus.cleanup.internal.storage.orient.OrientCleanupPolicyStorage.lambda$3(OrientCleanupPolicyStorage.java:95)
          at org.sonatype.nexus.orient.transaction.OrientOperations.lambda$1(OrientOperations.java:56)
          at org.sonatype.nexus.transaction.OperationPoint.proceed(OperationPoint.java:64)
          at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:56)
          at org.sonatype.nexus.transaction.Operations.transactional(Operations.java:200)
          at org.sonatype.nexus.transaction.Operations.call(Operations.java:146)
          at org.sonatype.nexus.orient.transaction.OrientOperations.call(OrientOperations.java:56)
          at org.sonatype.nexus.cleanup.internal.storage.orient.OrientCleanupPolicyStorage.get(OrientCleanupPolicyStorage.java:95)
          at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
          at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:272)
          at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:53)
          at org.sonatype.nexus.cleanup.internal.service.CleanupServiceImpl.findPolicy(CleanupServiceImpl.java:128)
          at org.sonatype.nexus.cleanup.internal.service.CleanupServiceImpl.cleanup(CleanupServiceImpl.java:93)
          at org.sonatype.nexus.cleanup.internal.service.CleanupServiceImpl.lambda$0(CleanupServiceImpl.java:83)
          at com.google.common.collect.ImmutableList.forEach(ImmutableList.java:407)
          at org.sonatype.nexus.cleanup.internal.service.CleanupServiceImpl.cleanup(CleanupServiceImpl.java:81)
          at org.sonatype.nexus.cleanup.internal.task.CleanupTask.execute(CleanupTask.java:43)
          at org.sonatype.nexus.scheduling.TaskSupport.call(TaskSupport.java:93)
          at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.doExecute(QuartzTaskJob.java:145)
          at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.execute(QuartzTaskJob.java:108)
          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)
      2019-05-08 10:40:45,168+0200 INFO  [quartz-3-thread-2]  *SYSTEM org.sonatype.nexus.cleanup.internal.task.CleanupTask - Task complete
      

      I realize this is not a support channel, but I hope this is something that can help getting the bug we are seeing fixed.

        Attachments

          Activity

            People

            Assignee:
            mpiggott Matthew Piggott
            Reporter:
            jsp@patientsky.com Jesper Pedersen
            Last Updated By:
            Wes Wannemacher
            Team:
            NXRM - Operations/Groot
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title