Sonarqube is getting failed in Jenkins

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
  • 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( at org.quality.gates.jenkins.plugin.BuildDecision.getStatus( at org.quality.gates.jenkins.plugin.QGPublisher.perform( at hudson.tasks.BuildStepMonitor$1.perform( at hudson.model.AbstractBuild$AbstractBuildExecution.perform( at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps( at hudson.model.Build$BuildExecution.post2( at hudson.model.AbstractBuild$ at hudson.model.Run.execute( at at hudson.model.ResourceController.execute( at 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
    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.


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.


1 Like