java.io.IOException: Exception(s) happened during reindexAllRepositories()

Sonatype JIRA | Rich Seddon | 4 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Way too often customer log files contain entries like the one below, and it turns out the contained exceptions were logged at DEBUG. So there's a failure, and no way to know what happened. We should log at least some of the stack traces from the contained exceptions. Maybe up to a limit of 10 or something? {quote} 2013-10-14 14:28:40 WARN [pxpool-1-thread-18] n0158588 org.sonatype.nexus.tasks.OptimizeIndexTask - Scheduled task (Optimize _a_ repository) failed :: Optimizing repository Hosting index. (started 2013-10-14T14:24:51-04:00, runtime 0:03:49.174) java.io.IOException: Exception(s) happened during reindexAllRepositories() at org.sonatype.nexus.index.DefaultIndexerManager.optimizeIndex(DefaultIndexerManager.java:1792) ~[na:na] at org.sonatype.nexus.index.DefaultIndexerManager.optimizeRepositoryIndex(DefaultIndexerManager.java:1766) ~[na:na] at org.sonatype.nexus.tasks.OptimizeIndexTask.doRun(OptimizeIndexTask.java:56) ~[na:na] at org.sonatype.nexus.scheduling.AbstractNexusTask.call(AbstractNexusTask.java:177) ~[nexus-core-2.6.0-05.jar:2.6.0-05] at org.sonatype.scheduling.DefaultScheduledTask.call(DefaultScheduledTask.java:483) ~[nexus-scheduler-2.6.0-05.jar:2.6.0-05] at org.sonatype.nexus.threads.MDCAwareCallable.call(MDCAwareCallable.java:44) ~[nexus-core-2.6.0-05.jar:2.6.0-05] at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) ~[shiro-core-1.2.2.jar:1.2.2] at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) ~[shiro-core-1.2.2.jar:1.2.2] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) ~[na:1.7.0_25] at java.util.concurrent.FutureTask.run(FutureTask.java:166) ~[na:1.7.0_25] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) ~[na:1.7.0_25] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) ~[na:1.7.0_25] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_25] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ~[na:1.7.0_25] at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25] Caused by: org.sonatype.nexus.util.CompositeException: Multiple exceptions happened, please see prior log messages for details. ... 15 common frames omitted 2013-10-14 14:28:40 WARN [pxpool-1-thread-18] n0158588 org.sonatype.scheduling.DefaultScheduledTask - Exception in call method of scheduled task Optimize _a_ repository java.io.IOException: Exception(s) happened during reindexAllRepositories() at org.sonatype.nexus.index.DefaultIndexerManager.optimizeIndex(DefaultIndexerManager.java:1792) ~[na:na] at org.sonatype.nexus.index.DefaultIndexerManager.optimizeRepositoryIndex(DefaultIndexerManager.java:1766) ~[na:na] at org.sonatype.nexus.tasks.OptimizeIndexTask.doRun(OptimizeIndexTask.java:56) ~[na:na] at org.sonatype.nexus.scheduling.AbstractNexusTask.call(AbstractNexusTask.java:177) ~[nexus-core-2.6.0-05.jar:2.6.0-05] at org.sonatype.scheduling.DefaultScheduledTask.call(DefaultScheduledTask.java:483) ~[nexus-scheduler-2.6.0-05.jar:2.6.0-05] at org.sonatype.nexus.threads.MDCAwareCallable.call(MDCAwareCallable.java:44) ~[nexus-core-2.6.0-05.jar:2.6.0-05] at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) ~[shiro-core-1.2.2.jar:1.2.2] at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) ~[shiro-core-1.2.2.jar:1.2.2] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) ~[na:1.7.0_25] at java.util.concurrent.FutureTask.run(FutureTask.java:166) ~[na:1.7.0_25] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) ~[na:1.7.0_25] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) ~[na:1.7.0_25] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_25] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ~[na:1.7.0_25] at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25] Caused by: org.sonatype.nexus.util.CompositeException: Multiple exceptions happened, please see prior log messages for details. ... 15 common frames omitted {quote}

    Sonatype JIRA | 4 years ago | Rich Seddon
    java.io.IOException: Exception(s) happened during reindexAllRepositories()

    Root Cause Analysis

    1. org.sonatype.nexus.util.CompositeException

      Multiple exceptions happened, please see prior log messages for details.

      at org.sonatype.nexus.index.DefaultIndexerManager.optimizeIndex()
    2. Sonatype Nexus Indexer
      DefaultIndexerManager.optimizeRepositoryIndex
      1. org.sonatype.nexus.index.DefaultIndexerManager.optimizeIndex(DefaultIndexerManager.java:1792)[na:na]
      2. org.sonatype.nexus.index.DefaultIndexerManager.optimizeRepositoryIndex(DefaultIndexerManager.java:1766)[na:na]
      2 frames
    3. ${project.groupId}:${project.artifactId}
      AbstractNexusTask.call
      1. org.sonatype.nexus.tasks.OptimizeIndexTask.doRun(OptimizeIndexTask.java:56)[na:na]
      2. org.sonatype.nexus.scheduling.AbstractNexusTask.call(AbstractNexusTask.java:177)[nexus-core-2.6.0-05.jar:2.6.0-05]
      2 frames
    4. ${project.groupId}:${project.artifactId}
      DefaultScheduledTask.call
      1. org.sonatype.scheduling.DefaultScheduledTask.call(DefaultScheduledTask.java:483)[nexus-scheduler-2.6.0-05.jar:2.6.0-05]
      1 frame
    5. ${project.groupId}:${project.artifactId}
      MDCAwareCallable.call
      1. org.sonatype.nexus.threads.MDCAwareCallable.call(MDCAwareCallable.java:44)[nexus-core-2.6.0-05.jar:2.6.0-05]
      1 frame
    6. Shiro
      SubjectCallable.call
      1. org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)[shiro-core-1.2.2.jar:1.2.2]
      2. org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)[shiro-core-1.2.2.jar:1.2.2]
      2 frames
    7. Java RT
      Thread.run
      1. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[na:1.7.0_25]
      2. java.util.concurrent.FutureTask.run(FutureTask.java:166)[na:1.7.0_25]
      3. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[na:1.7.0_25]
      4. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[na:1.7.0_25]
      5. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[na:1.7.0_25]
      6. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[na:1.7.0_25]
      7. java.lang.Thread.run(Thread.java:724)[na:1.7.0_25]
      7 frames