Checking status of SonarQube task 'AYqKZ2MSH3ys1y9jsG9F' on server 'SonarQube'

Getting error logs on jenkins pipeline as below.

Checking status of SonarQube task ‘AYqKZ2MSH3ys1y9jsG9F’ on server ‘SonarQube’

The results of sonarqube are visiblie on sonarqube dashboard but the quality gate is not getting applied on the jenkins pipeline I have checked the webook url as per the documentation. I have checked the jenkins pipeline credentials and configs.

I am running Java Spring boot code for testing.

On Sonarqube Webhook I am seeing “X” sigh and the below message

{
  "serverUrl": "http://devops001.eastus.cloudapp.azure.com:9000",
  "taskId": "AYqKZ2MSH3ys1y9jsG9F",
  "status": "SUCCESS",
  "analysedAt": "2023-09-12T17:18:59+0000",
  "revision": "d752cce7473fbbdd654bca48bfab1968cb3a288b",
  "changedAt": "2023-09-12T17:18:59+0000",
  "project": {
    "key": "numeric-application",
    "name": "numeric-application",
    "url": "http://devops001.eastus.cloudapp.azure.com:9000/dashboard?id=numeric-application"
  },
  "branch": {
    "name": "main",
    "type": "BRANCH",
    "isMain": true,
    "url": "http://devops001.eastus.cloudapp.azure.com:9000/dashboard?id=numeric-application"
  },
  "qualityGate": {
    "name": "custom-quality-gate",
    "status": "OK",
    "conditions": [
      {
        "metric": "new_reliability_rating",
        "operator": "GREATER_THAN",
        "value": "1",
        "status": "OK",
        "errorThreshold": "1"
      },
      {
        "metric": "new_security_rating",
        "operator": "GREATER_THAN",
        "value": "1",
        "status": "OK",
        "errorThreshold": "1"
      },
      {
        "metric": "new_maintainability_rating",
        "operator": "GREATER_THAN",
        "value": "1",
        "status": "OK",
        "errorThreshold": "1"
      },
      {
        "metric": "new_coverage",
        "operator": "LESS_THAN",
        "status": "NO_VALUE",
        "errorThreshold": "80"
      },
      {
        "metric": "new_duplicated_lines_density",
        "operator": "GREATER_THAN",
        "status": "NO_VALUE",
        "errorThreshold": "3"
      },
      {
        "metric": "code_smells",
        "operator": "GREATER_THAN",
        "value": "7",
        "status": "OK",
        "errorThreshold": "12"
      },
      {
        "metric": "new_security_hotspots_reviewed",
        "operator": "LESS_THAN",
        "status": "NO_VALUE",
        "errorThreshold": "100"
      }
    ]
  },
  "properties": {
    "sonar.analysis.detectedscm": "git",
    "sonar.analysis.detectedci": "Jenkins"
  }
}

I have used the below stage code for sonarqube as below

stage ('Sonarqube - SAST'){
steps{
withSonarQubeEnv ('SonarQube'){
sh "mvn clean verify sonar:sonar -Dsonar.projectKey=numeric-application -Dsonar.projectName='numeric-application' -Dsonar.host.url=http://devops001.eastus.cloudapp.azure.com:9000 -Dsonar.token=sqp_xxxxxx"
}
timeout (time: 5, unit: 'MINUTES') {
script {
waitForQualityGate abortPipeline: true
}
}
}
}

need help on this ASAP.

Sounds like the Webhook delivery failed. What is the Webhook response (at the top of the delivery modal)?

It is showing the same


not sure why the webhook is failing!!

Your Jenkins system logs might help you understand why a 500 is being returned.

Have you also made sure you’re using the latest version of the SonarQube extension for Jenkins?

thanks I got the issue resolved. Jenkins the sonarqube url had “/” which was causing the error.

really appreciate all your help.