Upgrade to SQ Version 7.9.1 times out during publish results task

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    SQ 7.9.1LTS
  • what are you trying to achieve
    Did the Upgrade from SQ 7.5 to 7.9.1
    And hence all builds are having a timeout issue.
  • what have you tried so far to achieve this
    We set up a build variable: SonarQubeAnalysisTimeoutInSeconds that was set to 300 then 600 secs. Even then the build timed out.

Logs of the error report:

  1. 2019-08-05T19:28:24.0704393Z Waiting on the SonarQube server to finish processing in order to determine the quality gate status.

  2. 2019-08-05T19:28:24.1173166Z SonarQubeAnalysisTimeoutInSeconds is set to 600 and will be used to poll for the SonarQube task completion.

13. 2019-08-05T19:38:24.8439768Z ##[error]The analysis did not complete in the allotted time of 600 seconds. Consider setting the build variable SonarQubeAnalysisTimeoutInSeconds to a higher value.

Can someone please help resolve this issue, as non on the builds across projects are able to publish the reports. What is it, that we are missing for 7.9.1??

Hi,

Does your Jenkins server log show the receipt of the webhook notification from SonarQube?

 
Ann

Hi , Not sure if i have webhooks setup, but this is the log that we see::

  1. 28:23.6641847Z INFO: EXECUTION SUCCESS

  2. 2019-08-05T19:28:23.6641847Z INFO: ------------------------------------------------------------------------

  3. 2019-08-05T19:28:23.6641847Z INFO: Total time: 21.594s

  4. 2019-08-05T19:28:23.7735643Z INFO: Final Memory: 31M/439M

  5. 2019-08-05T19:28:23.7735643Z INFO: ------------------------------------------------------------------------

  6. 2019-08-05T19:28:23.8829510Z The SonarQube Scanner has finished

  7. 2019-08-05T19:28:23.8829510Z 15:28:23.804 Creating a summary markdown file…

  8. 2019-08-05T19:28:23.8829510Z 15:28:23.804 Analysis results: http://10.205.91.23:9000/dashboard/index/Dialer.Site

  9. 2019-08-05T19:28:23.8829510Z 15:28:23.804 Post-processing succeeded.

  10. 2019-08-05T19:28:23.9141888Z ##[debug]Calling InvokeGetRestMethod “/api/server/version”

  11. 2019-08-05T19:28:23.9298146Z ##[debug]Variable read: MSBuild.SonarQube.HostUrl = http://10.205.91.23:9000/

  12. 2019-08-05T19:28:23.9454401Z ##[debug]Variable read: MSBuild.SonarQube.ServerUsername = ********

  13. 2019-08-05T19:28:23.9454401Z ##[debug]Variable read: MSBuild.SonarQube.ServerPassword =

  14. 2019-08-05T19:28:23.9610645Z ##[debug]GET http://10.205.91.23:9000/api/server/version with 0-byte payload

  15. 2019-08-05T19:28:24.0079453Z ##[debug]received 11-byte response of content type text/plain

  16. 2019-08-05T19:28:24.0704393Z Waiting on the SonarQube server to finish processing in order to determine the quality gate status.

  17. 2019-08-05T19:28:24.1173166Z SonarQubeAnalysisTimeoutInSeconds is set to 600 and will be used to poll for the SonarQube task completion.

  18. 2019-08-05T19:38:24.8439768Z ##[error]The analysis did not complete in the allotted time of 600 seconds. Consider setting the build variable SonarQubeAnalysisTimeoutInSeconds to a higher value.

Hi,

This looks like the Jenkins log for the individual run/job. I was asking about the Jenkins server log.

If you’re not sure you have webhooks set up, then that’s probably the problem. Theoretically, the Jenkins pipeline submits the analysis report to SonarQube, suspends and waits to be asynchronously notified by SonarQube of the Quality Gate results. That notification comes via webhook.

In that context, this log line from your OP is a little odd (emphasis added):

Since my math says 600 seconds == 10 minutes that means that either no polling is taking place or that the background task processing queue on the SonarQube side is way longer than I would expect.

So…

First you should check out webhooks. If those are actually in place, then take a look at your Jenkins server log to see if you can find evidence that the webhooks are being received, and if they are, then post your pipeline code here (code-formatted, please with ``` on the line before and the line after).

 
Ann

Just to clarify - we are not using Jenkins, our build is from VSTS pipelines.

So we finally figured it out with this error:

“# Error message: Due to an upgrade, you need first to re-analyze the target branch ‘master’ before analyzing this short-lived branch

And re ran the analysis with “master” branch. And now the BUILD runs successfully.

Hi,

I’m glad you worked through this. Thanks for reporting back!

 
Ann