问题
After sonarqube 6.6 upgrade from 6.5 (with Debian package), sonar is unable to start. I did not update plugins before upgrade. I just let the standard Debian package upgrade. I am using an external database (Postgresql). I found the following errors in web.log :
2017.10.24 18:12:34 ERROR web[][o.s.s.es.BulkIndexer] index [components], type [component], id [AVgpp1_-x6lKXwnU0BYQ], message [java.lang.IllegalArgumentException: can't specify parent if no parent field has been configured]
2017.10.24 18:12:34 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.component.index.ComponentIndexer.doIndexByProjectUuid(ComponentIndexer.java:149)
at org.sonar.server.component.index.ComponentIndexer.indexOnStartup(ComponentIndexer.java:71)
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:91)
at org.sonar.server.user.DoPrivileged.execute(DoPrivileged.java:45)
at org.sonar.server.platform.platformlevel.PlatformLevelStartup.start(PlatformLevelStartup.java:87)
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:748)
Any clue or workaround ?
回答1:
I managed to overcome this error by attempting another upgrade (after restoring sonar 6.5) and :
- upgrading plugins BEFORE upgrade
- removing the data/es5 folder after encountering the same error and restarting sonar.
来源:https://stackoverflow.com/questions/46915947/sonarqube-6-6-upgrade-unrecoverable-indexation-failures