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

Null Pointer Exception when cleanup runs on empty repository

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Bug
    • Affects Version/s: 3.30.0
    • Fix Version/s: None
    • Component/s: Cleanup
    • Labels:
      None

      Description

      I've created an empty docker repository with a cleanup policy.  The below error appears over and over filling the disk up very fast when cleanup runs.

       

      2021-04-07 17:00:41,725+0000 INFO  [quartz-9-thread-4]  *SYSTEM org.sonatype.nexus.cleanup.internal.task.CleanupTask - Task information:
      2021-04-07 17:00:41,726+0000 INFO  [quartz-9-thread-4]  *SYSTEM org.sonatype.nexus.cleanup.internal.task.CleanupTask -  ID: 0971e6c3-67dd-47db-9ecb-7c1e2e0e5598
      2021-04-07 17:00:41,726+0000 INFO  [quartz-9-thread-4]  *SYSTEM org.sonatype.nexus.cleanup.internal.task.CleanupTask -  Type: repository.cleanup
      2021-04-07 17:00:41,726+0000 INFO  [quartz-9-thread-4]  *SYSTEM org.sonatype.nexus.cleanup.internal.task.CleanupTask -  Name: Cleanup service
      2021-04-07 17:00:41,726+0000 INFO  [quartz-9-thread-4]  *SYSTEM org.sonatype.nexus.cleanup.internal.task.CleanupTask -  Description: Run repository cleanup
      2021-04-07 17:00:41,727+0000 INFO  [quartz-9-thread-4]  *SYSTEM org.sonatype.nexus.cleanup.internal.task.CleanupTask - Starting cleanup
      2021-04-07 17:00:41,732+0000 INFO  [quartz-9-thread-4]  *SYSTEM org.sonatype.nexus.cleanup.internal.orient.service.OrientCleanupServiceImpl - Deleting components in repository docker-hosted using policy DefaultCleanup       
      2021-04-07 17:00:41,744+0000 ERROR [quartz-9-thread-4]  *SYSTEM org.sonatype.nexus.cleanup.internal.orient.service.OrientCleanupServiceImpl - Failed to delete components.
      java.lang.NullPointerException: null
              at org.apache.lucene.util.automaton.RegExp.<init>(RegExp.java:403)
              at org.apache.lucene.util.automaton.RegExp.<init>(RegExp.java:387)
              at org.sonatype.nexus.cleanup.storage.config.RegexCriteriaValidator.validate(RegexCriteriaValidator.java:35)
              at org.sonatype.nexus.cleanup.internal.search.elasticsearch.RegexCriteriaAppender.append(RegexCriteriaAppender.java:41)
              at org.sonatype.nexus.cleanup.internal.search.elasticsearch.AbstractSearchCleanupComponentBrowse.addCriteria(AbstractSearchCleanupComponentBrowse.java:173)
              at org.sonatype.nexus.cleanup.internal.search.elasticsearch.AbstractSearchCleanupComponentBrowse.convertPolicyToQuery(AbstractSearchCleanupComponentBrowse.java:162)
              at org.sonatype.nexus.cleanup.internal.search.elasticsearch.AbstractSearchCleanupComponentBrowse.browse(AbstractSearchCleanupComponentBrowse.java:83)
              at org.sonatype.nexus.cleanup.internal.orient.service.OrientCleanupServiceImpl.deleteByPolicy(OrientCleanupServiceImpl.java:128)
              at org.sonatype.nexus.cleanup.internal.orient.service.OrientCleanupServiceImpl.lambda$1(OrientCleanupServiceImpl.java:107)
              at java.util.ArrayList.forEach(ArrayList.java:1259)
              at org.sonatype.nexus.cleanup.internal.orient.service.OrientCleanupServiceImpl.cleanup(OrientCleanupServiceImpl.java:106)
              at org.sonatype.nexus.cleanup.internal.orient.service.OrientCleanupServiceImpl.lambda$0(OrientCleanupServiceImpl.java:96)
              at com.google.common.collect.ImmutableList.forEach(ImmutableList.java:405)
              at org.sonatype.nexus.cleanup.internal.orient.service.OrientCleanupServiceImpl.cleanup(OrientCleanupServiceImpl.java:94)
              at org.sonatype.nexus.cleanup.internal.task.CleanupTask.execute(CleanupTask.java:46)
              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:145)
              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)
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            eengberg@openlending.com Eric Engberg
            Last Updated By:
            Joe Tom Joe Tom
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title