Sonar cloud: Unable to load component class org.sonar.scanner.report.ActiveRulesPublisher

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.

Any idea to resolve this issue?

Hey there.

As noted in the template post, could you please share this information? :smiley:

Must-share information (formatted with Markdown):

  • 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.

Hi Colin,
Thanks for the reply, Please find the below details.

Version- Community Edition - Version 8.9.10 (build 61524)
Hosted in the AWS ECS(Fargate) and using ALB.

Logs::
Load quality profiles
Load quality profiles (done) | time=115058ms
Load active rules

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.

  1. Update the timeout value for sonar.ws.timeout and sonar.qualitygate.timeout.
  2. deleted the ES folder in /opt/sonar/data folder
  3. 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.

please help me find the resolution.

Regards
Boopathi J.

Thanks for the further details. There doesn’t appear to be a smoking gun yet.

For the exact same project?

Finally found the solution, after increased the RDS-postgresql DB size from DB.t2.micro to DB.t2.medium in AWS.

the issue has been resolved, now able to run the sonar scan without any issues.

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