Maven job cancelled

I want to scan a particularly large code base and when I run the job it always fails with status “cancelled”

I’ve tried to add -Dsonar.qualitygate.timeout=3600 and -Dsonar.qualitygate.timeout=3600 to maven

I’ve also tried setting SONAR_CE_TASK_TIMEOUTSECONDS = 3600 in the deployment of sonar application

the final message is in sonar is:

2023.04.25 09:33:05 INFO  ce[xxx][o.s.c.t.CeWorkerImpl] Executed task | project=xxxx | type=REPORT | id=xxx| submitter=pullRequest | status=SUCCESS | time=181875ms

before that there is an error:

java.lang.IllegalStateException: Task does not exist anymore: CeTask{type=REPORT...

So it looks like it’s completing the scan and I’m not seeing any errors indicating why or what is cancelling it

The maven job seems to timeout at around 20 to 30 seconds

[INFO] 11:33:58.295 ------------- Check Quality Gate status
[INFO] 11:33:58.295 Waiting for the analysis report to be processed (max 3600s)
[DEBUG] 11:33:58.363 GET 200 https://myinstance/api/ce/task?id=myid| time=68ms
... updates around every 5 seconds ....
[DEBUG] 11:35:29.240 GET 200 https://myinstance/api/ce/task?id=myid| time=36ms
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for xxx 1.0.0-SNAPSHOT:
[INFO]
[INFO] xxx ................................... FAILURE [12:02 min]

I’m using Sonar 10.0 self hosted

Hey there.

This can happen if you have two SonarQube instances started against the same database – is that a possibility here?

I have split out the application and search into two separate deployments

They have SONAR_CLUSTER_NODE_TYPE application and search respectively they both have connections to the same DB and schema.

There is nothing else connected and just one of each.

Hey there.

This is not supported. Only a very specific cluster configuration is supported with Data Center Edition.

You should make sure you only have a single instance of SonarQube connected to your database.

Thanks Colin, pity we can’t seperate out the two parts in CE for deployment it gives so much more insight into load/memory requirements and tuning.
We do have a commercial license but sadly that’s on the wrong network for our use.

switched to a single node and timeouts work correctly

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.