SonarQube randomly looses pending analysis task - Failed to get CE Task status

We are using SonarQube pull request analysis with a quality gate on each MR in a GitLab project.
When several GitLab pipelines are running in parallel, quite often one of the sonar jobs fails with the
message “Caused by: Failed to get CE Task status - No activity found for task”.

The offending task id is not shown on the list of Failed or Pending Jobs in the SonarQube UI.
In the SonarQube access.log, one can see polling requests for the task ID switching from a 200-Response to a 404-Response.
Otherwise, there is no entry in the log files.

This seems to be similar to this problem with SonarCloud.

I assume this is a bug in SonarQube. Is this fixed alreay in 9.7.1 or 9.8. ?

Many thanks

My setup:

  • SonarQube Version 9.7 (build 61563) Developer Edition
  • Gradle Plugin org.sonarqube 3.3
  • GitLab on premise 14.2
1 Like


Are you polling manually or using an SQ-provided method to get the Quality Gate status?


We think we are seeing the same problem. Using SonarScanner, we get the log output:

INFO: ANALYSIS SUCCESSFUL, you can find the results at: <link to project for pull request>
INFO: More about the report processing at <link to task>

But the task is never seen in the background_tasks list in any status.
The returns

{"errors":[{"msg":"No activity found for task \u0027<task id>\u0027"}]}

We have seen no pattern of when this problem happens. In nearly every case a new analysis of the same pull request state is successful.

SonarQube DE

Hi @ThomasMinney,

Can you upgrade to 9.9 and see if this is replicable?


We have not seen any examples of this since upgrading to 9.9 two weeks ago.

1 Like

Hi @ThomasMinney,

Thanks for checking and for coming back to us!