Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-10502

Server fails to start with error "Unrecoverable indexation failures"

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.7
    • Fix Version/s: 6.7.3, 7.1
    • Component/s: ElasticSearch
    • Labels:
      None

      Description

      Server may fail at startup when populating the indices that have many documents (usually issues). Error does not provide much context:

      2018.02.28 04:20:34 INFO  web[][o.s.s.e.IndexerStartupTask] Indexing of type [issues/issue] ...
      2018.02.28 04:21:34 INFO  web[][o.s.s.es.BulkIndexer] 633504 requests processed (10558 items/sec)
      ....
      2018.02.28 05:48:34 INFO  web[][o.s.s.es.BulkIndexer] 82713275 requests processed (0 items/sec)
      2018.02.28 05:48:56 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
      java.lang.IllegalStateException: Unrecoverable indexation failures
      	at org.sonar.server.es.IndexingListener$1.onFinish(IndexingListener.java:39)
      	at org.sonar.server.es.BulkIndexer.stop(BulkIndexer.java:117)
      	at org.sonar.server.issue.index.IssueIndexer.doIndex(IssueIndexer.java:247)
      	at org.sonar.server.issue.index.IssueIndexer.indexOnStartup(IssueIndexer.java:95)
      	at org.sonar.server.es.IndexerStartupTask.indexUninitializedTypes(IndexerStartupTask.java:68)
      	at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
      	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
      	at org.sonar.server.es.IndexerStartupTask.execute(IndexerStartupTask.java:55)
      	at java.util.Optional.ifPresent(Optional.java:159)
      	at org.sonar.server.platform.platformlevel.PlatformLevelStartup$1.doPrivileged(PlatformLevelStartup.java:84)
      	at org.sonar.server.user.DoPrivileged.execute(DoPrivileged.java:45)
      	at org.sonar.server.platform.platformlevel.PlatformLevelStartup.start(PlatformLevelStartup.java:80)
      	at org.sonar.server.platform.Platform.executeStartupTasks(Platform.java:196)
      	at org.sonar.server.platform.Platform.access$400(Platform.java:46)
      	at org.sonar.server.platform.Platform$1.lambda$doRun$1(Platform.java:121)
      	at org.sonar.server.platform.Platform$AutoStarterRunnable.runIfNotAborted(Platform.java:371)
      	at org.sonar.server.platform.Platform$1.doRun(Platform.java:121)
      	at org.sonar.server.platform.Platform$AutoStarterRunnable.run(Platform.java:355)
      	at java.lang.Thread.run(Thread.java:745)
      2018.02.28 05:48:56 DEBUG web[][o.s.s.p.Platform] Background initialization of SonarQube done
      2018.02.28 05:48:56 INFO  web[][o.s.p.StopWatcher] Stopping process
      

      Probability of getting the error increases with the number of CPU cores. A bug of concurrency corrupts the counter of successfully indexed documents. As a consequence the indexing is considered as incomplete and fails when the final counters are compared (indexed docs versus docs to be indexed).

        Attachments

          Activity

            People

            • Assignee:
              simon.brandhof Simon Brandhof
              Reporter:
              simon.brandhof Simon Brandhof
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: