ERROR: Error during SonarQube Scanner execution java.lang.IllegalStateException: Report processing did not complete successfully: CANCELED

Hello Team ,
Can someone help us with the solution for below exceptions.

  1. The jenkins job fails with error as below and the respective ce task id which is generated for report processing shows below exception in the ce.log
    Error -
05:00:18.846 ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: Report processing did not complete successfully: CANCELED
	at org.sonar.plugins.buildbreaker.QualityGateBreaker.getAnalysisId(QualityGateBreaker.java:186)
	at org.sonar.plugins.buildbreaker.QualityGateBreaker.execute(QualityGateBreaker.java:247)
	at org.sonar.scanner.postjob.PostJobWrapper.execute(PostJobWrapper.java:49)
	at org.sonar.scanner.postjob.PostJobsExecutor.execute(PostJobsExecutor.java:48)
	at org.sonar.scanner.postjob.PostJobsExecutor.execute(PostJobsExecutor.java:39)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:327)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:128)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73)
	at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:99)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:62)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
	at com.sun.proxy.$Proxy0.execute(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233)
	at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
	at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:110)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:74)
	at org.sonarsource.scanner.cli.Main.main(Main.java:61)
05:00:18.848 ERROR: 
05:00:18.848 ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.

Picked up _JAVA_OPTIONS: -Xmx9216m
Exception
Failed to finalize task with uuid ‘AX12K1V3hILq2kQ_DLK7’ and persist its state to db java.lang.IllegalStateException: Task does not exist anymore.

  1. The jenkins build fails at quality gate and shows major issues but when actual report is checked , there are no major issues found. Either the information is misleading or is not getting stored in sonarqube ? When the build is rerun , it succeeds without any issues.

  2. We are also seeing below exceptions in our web.log

ERROR web[][o.s.s.e.RecoveryIndexer] Elasticsearch recovery - fail to recover documents
java.lang.IllegalStateException: Fail to select authorizations
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The incoming request has too many parameters. The server supports a maximum of 2100 parameters. Reduce the number of parameters and resend the request.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:258)
        at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1535)
        at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:467)
        at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:409)
        at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7151)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2478)
        at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:219)
        at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:199)
        at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:331)
        at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:122)
        at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:122)
        at org.sonar.server.permission.index.PermissionIndexerDao.doSelectByProjects(PermissionIndexerDao.java:137)
        ... 17 common frames omitted

Version - We are using Sonarqube Community Edition Version 7.7.0.23042
What has been done so far -We are checking with the database team about memory usage of the db.
Please suggest us what should be checked more to solve this issue

Hi,

Welcome to the community!

First, your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

7.7 → 7.9.6 → 8.9.3 → 9.2.1 (last step optional)

You may find the Upgrade Guide and the LTS-to-LTS Upgrade Notes helpful. If you have questions about upgrading, feel free to open a new thread for that here.

If your error persists after upgrade, please come back to us.

 
HTH,
Ann