Sonarqube is getting failed in Jenkins

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    v5.6.6
  • what are you trying to achieve

Jenkins is trying to verify the code quality and upload the report to sonarqube application

ERROR: Build step failed with exception org.quality.gates.sonar.api.MaxExecutionTimeException: Status => Max time to wait sonar job! at org.quality.gates.sonar.api.QualityGatesProvider.getAPIResultsForQualityGates(QualityGatesProvider.java:82) at org.quality.gates.jenkins.plugin.BuildDecision.getStatus(BuildDecision.java:24) at org.quality.gates.jenkins.plugin.QGPublisher.perform(QGPublisher.java:85) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690) at hudson.model.Build$BuildExecution.post2(Build.java:186) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635) at hudson.model.Run.execute(Run.java:1749) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) Build step ‘Quality Gates Sonarqube Plugin’ marked build as failure &sa=D&source=hangouts&ust=1573890423231000&usg=AFQjCNFrmUln1G6I4muoR0uoSS7qioRpjQ)" Notified Bitbucket for commit with id 47c2bac174fa31e749ba4e34c3de9452b4dea8ff Collecting metadata… Metadata collection done. Finished: FAILURE

  • what have you tried so far to achieve this
    We have modified the current value from
    Time to wait next check (milliseconds ) - 100000
    Maximum waiting time (milliseconds) - 300000
    to
    Time to wait next check (milliseconds ) - 100000000
    Maximum waiting time (milliseconds) - 300000000
    under Jenkins setting but still issue remains the same and also noticed Analysis is not getting generated in sonarqube application

I encountered a similar scenario, and we ended up increasing the memory on Web Server and Compute Engine and that seemed to solve the issues for our instance. We are curernty running 7.4.

Hi,

AFAIK, webhooks were only introduced in Sonarqube 6.2
If you’re using the build breaker community plugin, you won’t get support for it here and it’s not needed anymore in Jenkins Pipelines since webhooks are available.
You should upgrade to the latest Sonarqube LTS 7.9.1 and the most recent versions of
Jenkins plugin and Sonarqube Scanner to make it work.

Gilbert

1 Like