Analysis error : Compute Engine task entity key is null

Hello,

Some projets on our SonarQube server are failing the analysis with an error from the CE :

Compute Engine task entity key is null.
Project with UUID AWWzL9nw6rv87s9oUMVz must have been deleted since report was uploaded. Can not proceed.

When looking at the Sonar project I can see it was empty so I tried to delete it and started a new analysis but it ended with the same error.

I tried to change the projectKey and retry the analysis, this time it created a brand new project and the analysis was successful.

Those projects were created before 2021 and this looks a lot like the database corruption mentioned in Getting Error message: Compute Engine task main component key is null. I believe the issue is the same and was simply never fixed on our server since then. I’d like to apply the same patch to our DB if it is still available.

System information:

Server version: SonarQube Server Enterprise v10.8.1 (101195)
Deployment: Docker version 26.1.0, build 9714adc
Plugins:
    checkstyle-sonar-plugin-10.12.3.jar
    sonar-dependency-check-plugin-4.0.0.jar

Some additional details:

Debug logs from the CE scan execution

2025.03.04 13:14:10 INFO  ce[][o.s.c.t.CeWorkerImpl] Execute task | type=REPORT | branch=develop | branchType=BRANCH | id=8a33efe3-8a3a-40c8-8bf2-b888f561ee6c | submitter=vploquien
2025.03.04 13:14:10 INFO  ce[8a33efe3-8a3a-40c8-8bf2-b888f561ee6c][o.s.s.e.EsClientProvider] Connected to local Elasticsearch: [http://localhost:9001]
2025.03.04 13:14:11 INFO  ce[8a33efe3-8a3a-40c8-8bf2-b888f561ee6c][o.s.c.t.s.ComputationStepExecutor] Extract report | status=SUCCESS | time=143ms
2025.03.04 13:14:11 INFO  ce[8a33efe3-8a3a-40c8-8bf2-b888f561ee6c][o.s.c.t.s.ComputationStepExecutor] Persist scanner context | status=SUCCESS | time=19ms
2025.03.04 13:14:11 INFO  ce[8a33efe3-8a3a-40c8-8bf2-b888f561ee6c][o.s.c.t.s.ComputationStepExecutor] Propagate analysis warnings from scanner report | status=SUCCESS | time=1ms
2025.03.04 13:14:11 INFO  ce[8a33efe3-8a3a-40c8-8bf2-b888f561ee6c][o.s.c.t.s.ComputationStepExecutor] Generate analysis UUID | status=SUCCESS | time=0ms
2025.03.04 13:14:11 INFO  ce[8a33efe3-8a3a-40c8-8bf2-b888f561ee6c][o.s.c.t.s.ComputationStepExecutor] Load analysis metadata | status=FAILED | time=132ms
2025.03.04 13:14:11 ERROR ce[8a33efe3-8a3a-40c8-8bf2-b888f561ee6c][o.s.c.t.s.ComputationStepExecutor] Execution of listener failed
java.lang.IllegalStateException: Missing project key
       at org.sonar.ce.task.projectanalysis.api.posttask.PostProjectAnalysisTasksExecutor.lambda$createProject$0(PostProjectAnalysisTasksExecutor.java:172)
       at java.base/java.util.Optional.orElseThrow(Unknown Source)
       at org.sonar.ce.task.projectanalysis.api.posttask.PostProjectAnalysisTasksExecutor.lambda$createProject$2(PostProjectAnalysisTasksExecutor.java:172)
       at java.base/java.util.Optional.map(Unknown Source)
       at org.sonar.ce.task.projectanalysis.api.posttask.PostProjectAnalysisTasksExecutor.createProject(PostProjectAnalysisTasksExecutor.java:170)
       at org.sonar.ce.task.projectanalysis.api.posttask.PostProjectAnalysisTasksExecutor.createProjectAnalysis(PostProjectAnalysisTasksExecutor.java:153)
       at org.sonar.ce.task.projectanalysis.api.posttask.PostProjectAnalysisTasksExecutor.finished(PostProjectAnalysisTasksExecutor.java:90)
       at org.sonar.ce.task.step.ComputationStepExecutor.executeListener(ComputationStepExecutor.java:89)
       at org.sonar.ce.task.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:61)
       at org.sonar.ce.task.projectanalysis.taskprocessor.ReportTaskProcessor.process(ReportTaskProcessor.java:75)
       at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.executeTask(CeWorkerImpl.java:212)
       at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.run(CeWorkerImpl.java:194)
       at org.sonar.ce.taskprocessor.CeWorkerImpl.findAndProcessTask(CeWorkerImpl.java:160)
       at org.sonar.ce.taskprocessor.CeWorkerImpl$TrackRunningState.get(CeWorkerImpl.java:135)
       at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:87)
       at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:53)
       at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131)
       at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:76)
       at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)
       at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
       at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
       at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
       at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
       at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
       at java.base/java.lang.Thread.run(Unknown Source)
2025.03.04 13:14:12 INFO  ce[8a33efe3-8a3a-40c8-8bf2-b888f561ee6c][o.s.c.t.CeWorkerImpl] Executed task | type=REPORT | branch=develop | branchType=BRANCH | id=8a33efe3-8a3a-40c8-8bf2-b888f561ee6c | submitter=vploquien | status=FAILED | time=1856ms
2025.03.04 13:14:12 ERROR ce[][o.s.c.t.CeWorkerImpl] Call to listener ReportAnalysisFailureNotificationExecutionListener failed.
java.lang.IllegalStateException: Could not find project uuid AXfTRxhuJvuuM6FLPmS9
       at org.sonar.ce.notification.ReportAnalysisFailureNotificationExecutionListener.lambda$onEnd$1(ReportAnalysisFailureNotificationExecutionListener.java:80)
       at java.base/java.util.Optional.orElseThrow(Unknown Source)
       at org.sonar.ce.notification.ReportAnalysisFailureNotificationExecutionListener.onEnd(ReportAnalysisFailureNotificationExecutionListener.java:80)
       at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.lambda$finalizeTask$1(CeWorkerImpl.java:255)
       at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.lambda$callListeners$2(CeWorkerImpl.java:262)
       at java.base/java.util.Arrays$ArrayList.forEach(Unknown Source)
       at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.callListeners(CeWorkerImpl.java:260)
       at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.finalizeTask(CeWorkerImpl.java:255)
       at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.afterExecute(CeWorkerImpl.java:239)
       at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.close(CeWorkerImpl.java:199)
       at org.sonar.ce.taskprocessor.CeWorkerImpl.findAndProcessTask(CeWorkerImpl.java:161)
       at org.sonar.ce.taskprocessor.CeWorkerImpl$TrackRunningState.get(CeWorkerImpl.java:135)
       at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:87)
       at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:53)
       at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131)
       at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:76)
       at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)
       at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
       at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
       at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
       at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
       at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
       at java.base/java.lang.Thread.run(Unknown Source)

Hi,

Thanks for the research you did. Given that your projects are from the same era as that thread, it’s likely highly relevant, even if it is for SonarQube Cloud.

I’m going to flag this for the team.

 
Ann

Hello @VPloquien,

As you mentioned above, changing the projectKey solves the issue and at the moment this is the way to go.
We recommend to upgrade your SonarQube Server instance to the latest version in case that the fix could be present on it. Please, let us know if you find the issue again after the upgrade.
On our side, I’m going to open a ticket to review if this is currently fixed in the latest version.

Regards,
Javier