Sonarqube analysis blocked by error on background task

Version: Sonarqube 8.5.1.38104, Sonar-scanner 4.2.0.1873

We have an error on our sonarqube server for a specific project. The last background task that was upload shows the following error:

#### Error Details
Validation of project failed: o Date of analysis cannot be older than the date of the last known analysis on this project. Value: "2021-07-08T13:58:48+0200". Latest analysis: "2021-07-08T13:58:48+0200". It's only possible to rebuild the past in a chronological order.

The user can’t upload more sonarqube analysis to the project since this error. He is getting the following error when he tries:

|build|08-Jul-2021 13:59:27|________________________________________________________|
|---|---|---|
|build|08-Jul-2021 13:59:27|===  devops-scanner-java.jar RESULT: ===|
|build|08-Jul-2021 13:59:27|________________________________________________________|
|build|08-Jul-2021 13:59:27|===  sonar-scanner RESULT: ===|
|build|08-Jul-2021 13:59:27|ERROR: Sonar-scan failed! Look into logfiles for Details|

We thought about deleting the background task entry, but we are not sure if this is something recommended to do, since it is not possible to do on the web interface, only through database entries.

Any ideas of what could be happening on the sonarqube server?

Kind regards.

Hi,

Welcome to the community!

Are you passing the sonar.projectDate parameter in your analysis? That’s the obvious cause of this error.

Also, what date does your SonarQube homepage show for the date of the last analysis? A server/client mismatch in system dates is another cause.

 
Ann