5

I am trying to upload reports generated by Istanbul to Sonar dashboard using a gulp task and it fails with the below error. Looks like the Build Breaker plugin in SonarQube is timing out before it can upload the report to Sonar. Any way that i can tweak this plugin?

I am using Sonar 5.3.

15:42:43.411 INFO: Analysis report generated in /workspace/{project}/.sonar/report
15:42:43.430 INFO: ------------------------------------------------------------------------
15:42:43.430 INFO: EXECUTION FAILURE
15:42:43.430 INFO: ------------------------------------------------------------------------
15:42:43.430 INFO: Total time: 5:06.287s
15:42:43.609 INFO: Final Memory: 57M/2603M
15:42:43.609 INFO: ------------------------------------------------------------------------
15:42:43.609 ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: Report processing did not complete successfully: FAILED
      at org.sonar.plugins.buildbreaker.QualityGateBreaker.getAnalysisId(QualityGateBreaker.java:152)
      at org.sonar.plugins.buildbreaker.QualityGateBreaker.execute(QualityGateBreaker.java:108)
      at org.sonar.plugins.buildbreaker.QualityGateBreaker.executeOn(QualityGateBreaker.java:95)
      at org.sonar.batch.phases.PostJobsExecutor.execute(PostJobsExecutor.java:65)
      at org.sonar.batch.phases.PostJobsExecutor.execute(PostJobsExecutor.java:55)
agabrys
  • 8,728
  • 3
  • 35
  • 73
joy779
  • 61
  • 1
  • 2

2 Answers2

4

This is a known invalid issue: #14 (he problem occurs on the server side, not in Build Breaker mechanism/logic).

Matthew DeTullio's comment:

This is because the server side background task for your project is failing. You need to check the logs there and fix that problem first. The report processing step is when SQ computes the quality gate status. This plugin simply checks the status computed there, so if processing fails this plugin will mark the analysis a failure.

In my company we found on the server side:

java.lang.OutOfMemoryError: GC overhead limit exceeded
agabrys
  • 8,728
  • 3
  • 35
  • 73
  • I am getting a similar error. Does not seem to be an issue with Java OOM. – Upen Sep 20 '18 at 04:37
  • 1
    Please create a new question and add logs. Maybe I can help you, but comments are not a good place for that. – agabrys Sep 20 '18 at 07:24
  • 2
    For me the issue was due to multi module maven project. Individual modules under the multi module project had reports available on Sonar. So when the multi module project was trying to publish the reports had a conflict. I removed all the individual module reports and it went fine. – Upen Dec 04 '18 at 22:26
0

The reason could be any error in the SonarQube processing of background task.

And the error is very generic like below

ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: Report processing did not complete successfully: FAILED

In my case, the server on which SonarQube is installed, ran out of disk space hence it was not able to write the logs.

So, the idea is to check sonar.log to understand whats wrong and rectify it, restart SonarQube service.

less <SONAR_INSTALL_DIR>/logs/sonar.log

2021-03-28 01:13:25,124 elasticsearch[sonarqube][management][T#3] ERROR An exception occurred processing Appender file_es org.apache.logging.log4j.core.appender.AppenderLoggingException: Error writing to stream /apps/sonarqube-8.3.0.34182/logs/es.log

Reboot the Sonar service

cd <SONAR_INSTALL_DIR>/bin

./sonar.sh stop

./sonar.sh start

Sanjay Bharwani
  • 3,317
  • 34
  • 31