Project analysis failed, but can't find the causes

sonarqube

(PeterSun) #1
  • The versions are using
    SonarQube: 6.7.3 (build 38370)
    Scanner: 2.8
    OS: CentOS 7.4
  • what are you trying to achieve
    When I used scanner to analyse the project, sometimes the analysis task failed. We can see the error details on web. As the below part shows:
Error Details

java.lang.IllegalStateException: Fail to extract report AWcViY25dSEPMwUCJeaW from database
	at org.sonar.server.computation.task.projectanalysis.step.ExtractReportStep.execute(ExtractReportStep.java:66)
	at org.sonar.server.computation.task.step.ComputationStepExecutor.executeSteps(ComputationStepExecutor.java:64)
	at org.sonar.server.computation.task.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:52)
	at org.sonar.server.computation.task.projectanalysis.taskprocessor.ReportTaskProcessor.process(ReportTaskProcessor.java:73)
	at org.sonar.ce.taskprocessor.CeWorkerImpl.executeTask(CeWorkerImpl.java:134)
	at org.sonar.ce.taskprocessor.CeWorkerImpl.findAndProcessTask(CeWorkerImpl.java:97)
	at org.sonar.ce.taskprocessor.CeWorkerImpl.withCustomizedThreadName(CeWorkerImpl.java:81)
	at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:73)
	at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:43)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: No space left on device
	at java.io.FileOutputStream.writeBytes(Native Method)
	at java.io.FileOutputStream.write(FileOutputStream.java:326)
	at org.sonar.api.internal.apachecommons.io.IOUtils.copyLarge(IOUtils.java:1793)
	at org.sonar.api.internal.apachecommons.io.IOUtils.copyLarge(IOUtils.java:1769)
	at org.sonar.api.internal.apachecommons.io.IOUtils.copy(IOUtils.java:1744)
	at org.sonar.api.utils.ZipUtils.copy(ZipUtils.java:169)
	at org.sonar.api.utils.ZipUtils.unzipEntry(ZipUtils.java:109)
	at org.sonar.api.utils.ZipUtils.unzip(ZipUtils.java:92)
	at org.sonar.api.utils.ZipUtils.unzip(ZipUtils.java:61)
	at org.sonar.server.computation.task.projectanalysis.step.ExtractReportStep.execute(ExtractReportStep.java:64)
	... 16 more

I try to find the problem in the logs, but I only found some messages on ce.log. As the below part shows:

2018.11.15 10:37:24 DEBUG ce[][o.s.c.c.CeCleaningSchedulerImpl] Deleting any worn out task
2018.11.15 10:37:24 DEBUG ce[][o.s.c.c.CeCleaningSchedulerImpl] Resetting state of tasks with unknown worker UUIDs

It seems that if the project analysis fails, ce.log won’t message the causes of errors. But only report it to the web server.

  • what have you tried so far to achieve this
    I tried to improve the CE performance. As the below part shows:
sonar.ce.javaOpts=-Xmx4G -Xms256m -XX:+HeapDumpOnOutOfMemoryError

I also alter the vm.max_map_count and fs.file-max. As the below part shows:
1


(G Ann Campbell) #2

Hi,

The error you included from the background task log(?) is pretty specific:

No space left on device

You’re running out of file space on the box that hosts SonarQube.

 
Ann