Facing Irregular ERROR: Error during SonarScanner execution Quality Gate check timeout exceeded

Hi ,

One of our project is facing Irregular ERROR: Error during SonarScanner execution Quality Gate check timeout exceeded.
Sometimes they get it sometimes no Issues, we want to know the exact cause behind it.
I have attached the debug log as well.
error-logs.txt (2.5 MB)

SonarQube Version : 9.9.6 Community
SonarQUbe Application Deployment: k8s
SonarQube Scanner : .Net core 7.0

Please let me know if more details are need from my end.

Regards,
Sheetal

Hi Sheetal,

In your log, I see the API being polled for the task status. How is that polling configured in your pipeline? Also, what do you get if you manually call that URL that’s being polled: https://stage.sonarqube.mobility..com/api/ce/task?id=AZDfnVhcROQC83ULaR31

 
Ann

Hi Ann,

After manual call it provide output like this I have updated some of the sensitive content here FYI.

{“task”:{“id”:“AZDfnVhcROQC83ULaR31”,“type”:“REPORT”,“componentId”:“cid”,“componentKey”:“org.mo.mm.railxplore_tsr.srapi”,“componentName”:“RailXploreTSR/SRAPI”,“componentQualifier”:“TRK”,“analysisId”:“AZDsoS498wsXz8h04VwD”,“status”:“SUCCESS”,“submittedAt”:“2024-07-25T13:22:34+0000”,“submitterLogin”:“loginuserdetails”,“startedAt”:“2024-07-26T01:21:44+0000”,“executedAt”:“2024-07-26T01:21:48+0000”,“executionTimeMs”:4441,“hasScannerContext”:true,“branch”:“branchname”,“branchType”:“BRANCH”,“warningCount”:0,“warnings”:}}

Just a thought can it be related to Quality Gate bug they are using qualitygate check true sonar.qualitygate.wait=true

refering doc here Analysis parameters Forces the analysis step to poll the server instance and wait for the Quality Gate status. If there are no other options, you can use this to fail a pipeline build when the Quality Gate is failing.

Regards,
Sheetal

Hi Sheetal,

Thanks for checking the URL manually.

From that result:

      "status":"SUCCESS",
      "submittedAt":"“2024-07-25T13":"22":34+0000”,
      "submitterLogin":"loginuserdetails",
      "startedAt":"“2024-07-26T01":"21":44+0000”,
      "executedAt":"“2024-07-26T01":"21":48+0000”,
      "executionTimeMs":4441,

We see a submittedAt timestamp of 1:22 p.m. on the 25th,
And a startedAt time of 1:21 a.m. on the 26th?!

It’s no wonder your analysis job timed out waiting for the results!

You need to figure out what’s going on with report processing on your server.

 
Ann