we are getting the below error while running on the Gitlab CICD pipeline.
Task :sonarqube
Task :sonarqube FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ‘:sonarqube’.
Unable to load component class org.sonar.scanner.report.ActiveRulesPublisher
we are using the SonarQube community edition running on AWS ECS.
i’ve gone through multiple articles and removed the es folder under the Data folder and upgraded the sonarqube and the database. Still the issue is persist.
which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
And, I would suggest turning on deeper logging gradle --info and/or gradle --debug) so you can get a better idea of what’s going on. A broken Elasticsearch index is one cause of ActiveRulesPublisher failing, but might not be the only one.
Task :sonarqube FAILED
:sonarqube (Thread[Execution worker for ‘:’,5,main]) completed. Took 8 mins 50.618 secs.
Execution failed for task ‘:sonarqube’.
Unable to load component class org.sonar.scanner.report.ActiveRulesPublisher
Also, i’ve tried the below steps too. didn’t find the solution.
Update the timeout value for sonar.ws.timeout and sonar.qualitygate.timeout.
deleted the ES folder in /opt/sonar/data folder
updated the sonar version from 8.6 to 8.9 and migrated the postgresql DB also.
I’ve verified the Sonar logs in ECS container(/opt/sonar/logs/), didnt find any error/exception. also the ActiveRulesPublisher issue is not consistent, sometimes the build is succeed.