Unrecoverable indexation failures

Hi guys,
We have a local SorQube. recently I get the following error in Background tasks:
Error message: Unrecoverable indexation failures: 1 errors among 1 requests
It alwarys happens when i scanner code

Please find the attachment screenshot.

Thanks,
Levin

2020.01.02 10:28:59 ERROR ce[AW9kEkCqbBjjpNp9FD97][o.s.c.t.CeWorkerImpl] Failed to execute task AW9kEkCqbBjjpNp9FD97
org.sonar.ce.task.projectanalysis.component.VisitException: Visit of Component {key=ATE,uuid=AW9bTv1MXYJ8thtDVZYr,type=PROJECT} failed
at org.sonar.ce.task.projectanalysis.component.VisitException.rethrowOrWrap(VisitException.java:44)
at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visit(DepthTraversalTypeAwareCrawler.java:41)
at org.sonar.ce.task.projectanalysis.purge.PurgeDatastoresStep.execute(PurgeDatastoresStep.java:70)
at org.sonar.ce.task.step.ComputationStepExecutor.executeStep(ComputationStepExecutor.java:81)
at org.sonar.ce.task.step.ComputationStepExecutor.executeSteps(ComputationStepExecutor.java:72)
at org.sonar.ce.task.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:59)
at org.sonar.ce.task.projectanalysis.taskprocessor.ReportTaskProcessor.process(ReportTaskProcessor.java:81)
at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.executeTask(CeWorkerImpl.java:207)
at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.run(CeWorkerImpl.java:189)
at org.sonar.ce.taskprocessor.CeWorkerImpl.findAndProcessTask(CeWorkerImpl.java:156)
at org.sonar.ce.taskprocessor.CeWorkerImpl$TrackRunningState.get(CeWorkerImpl.java:131)
at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:83)
at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:51)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.IllegalStateException: Unrecoverable indexation failures: 107 errors among 107 requests
at org.sonar.server.es.IndexingListener$1.onFinish(IndexingListener.java:39)
at org.sonar.server.es.BulkIndexer.stop(BulkIndexer.java:122)
at org.sonar.server.component.index.ComponentIndexer.delete(ComponentIndexer.java:165)
at org.sonar.ce.task.projectanalysis.purge.IndexPurgeListener.onComponentsDisabling(IndexPurgeListener.java:41)
at org.sonar.db.purge.PurgeDao.purgeDisabledComponents(PurgeDao.java:107)
at org.sonar.db.purge.PurgeDao.purge(PurgeDao.java:71)
at org.sonar.ce.task.projectanalysis.purge.ProjectCleaner.purge(ProjectCleaner.java:63)
at org.sonar.ce.task.projectanalysis.purge.PurgeDatastoresStep.execute(PurgeDatastoresStep.java:76)
at org.sonar.ce.task.projectanalysis.purge.PurgeDatastoresStep.access$000(PurgeDatastoresStep.java:38)
at org.sonar.ce.task.projectanalysis.purge.PurgeDatastoresStep$1.visitProject(PurgeDatastoresStep.java:63)
at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visitNode(DepthTraversalTypeAwareCrawler.java:70)
at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visitImpl(DepthTraversalTypeAwareCrawler.java:51)
at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visit(DepthTraversalTypeAwareCrawler.java:39)
… 18 common frames omitted

access.txt (23.2 KB) ce.txt (42.3 KB) es.txt (62.9 KB) sonar.txt (1.6 KB) web.txt (9.0 KB)

Welcome to the community forum!

It appear that the elasticsearch index is somehow corrupted. Did you upgraded SonarQube recently ? It looks like an upgrade was not complete properly. The lucene index carry the codec information (= the lucene version format), and yours is with the wrong version. Typical SonarQube update in such case will drop the index, and recreate it.

In your case, the fix will be to trigger a full reindex. Make sure to have plenty of free disk space before triggering the full reindex.

Hi Pierre

 Thanks for your reply!
 First, my SonarQube version is sonarqube-7.8 community edition. and it can work normally.
 Second, there are 100GB free space in disk 
 So, do we need to update to latest version?

thanks

You need to trigger a full reindex (see my previous link). No need to upgrade.

Hi Pierre

  I updated sonarQube to latest version, the issue still arises
  Sofeware information as below:
     sonarqube-8.1.0.31237
     postgresql-10.11-3-windows-x64.exe 
     sonar-scanner-cli-4.2.0.1873-windows.zip
  
  I have did below action when the issue happend:
     1. Stop your server
     2. Remove the contents of the $SQ_HOME/data/es6 directory
     3. Start your server

 Thanks

Can you please post your 8.1 logs ?

Hi Pierre

 I am pleasure for received your reply
 latest log as below:

access - 副本.txt (43.6 KB) ce - 副本.txt (297.4 KB) es - 副本.txt (61.0 KB) sonar - 副本.txt (1.6 KB) web - 副本.txt (12.9 KB)

  detail configuration as below:
  1. The file "sonar.properties" in sonarQube
       sonar.jdbc.username=sonar
       sonar.jdbc.password=sonar
       sonar.jdbc.url=jdbc:postgresql://localhost/sonar
       sonar.sourceEncoding=UTF-8

  2. The file "sonar-scanner.properties" in sonarScanner:
       sonar.jdbc.url=jdbc:postgresql://localhost/sonar
       sonar.jdbc.username=sonar
       sonar.jdbc.password=sonar

   3. The file "sonar-scanner.properties" in souce code:
        sonar.projectKey=ATE
        sonar.projectName=ATE
        sonar.version=0.0.1-SNAPSHOT
        sonar.sources=MiniATE_Code_Framework
        sonar.cfamily.build-wrapper-output=F:/code/MiniATE_Code_Framework/data

  4.  sonarScanner information as below:
      INFO: Scanner configuration file: E:\sonar-scanner-4.2.0.1873-windows\bin\..\conf\sonar-scanner.properties
      INFO: Project root configuration file: F:\Mini-ATE-GUI\sonar-project.properties
      INFO: SonarQube Scanner 4.2.0.1873
      INFO: Java 11.0.3 AdoptOpenJDK (64-bit) 
      INFO: Windows 7 6.1 amd64