Build step 'Quality Gates' marked build as failure - SonarQube 7.7

Hello Team,

I am using SonarQube 7.7 and have integrated it with Jenkins 2.177. Quality Gates and SonarQube Scanner plugins are installed in Jenkins. SonarQube Server has also been configured correctly. But, when a job is executed, it is failing with the below error. Although the analysis is getting uploaded on SonarQube server.

06:14:30.253 DEBUG: Post-jobs :
06:14:30.474 INFO: Analysis total time: 1:40.813 s
06:14:30.477 INFO: ------------------------------------------------------------------------
06:14:30.477 INFO: ------------------------------------------------------------------------
06:14:30.478 INFO: Total time: 1:46.702s
06:14:30.612 INFO: Final Memory: 24M/706M
06:14:30.612 INFO: ------------------------------------------------------------------------
quality.gates.jenkins.plugin.QGException: Expected status 200, got: 404. Response: {“errors”:[{“msg”:“Unknown url : /api/events”}]}
at quality.gates.sonar.api.SonarHttpRequester.executeGetRequest(
at quality.gates.sonar.api.SonarHttpRequester.getAPIInfo(
at quality.gates.sonar.api.QualityGatesProvider.getRequesterResult(
at quality.gates.sonar.api.QualityGatesProvider.getAPIResultsForQualityGates(
at quality.gates.jenkins.plugin.BuildDecision.getStatus(
at 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 hudson.model.ResourceController.execute(
Build step ‘Quality Gates’ marked build as failure
Finished: FAILURE

Any help would really be appreciated.

Thanks in advance !!!


I’m not familiar with the Quality Gates build step. This sounds like a 3rd-party Jenkins plugin(?). If so, you should double-check its configuration. Note that the SonarScanner for Jenkins natively supports QG status in pipelines.