Quality Profiles not found after upgrade to 9.9 LTS

Hi,
we are using SonarQube 9.9 LTS (9.9.1.69595) on-prem Developer Edition in our organization.
Since the upgrade from version 9.5 to 9.9 LTS, there is an error message displayed when navigating to the built-in VB.NET Quality Profile (Sonar way) saying:
“The specified qualityProfile ‘AWkFGLVgDFFS_xMFPrG4’ does not exist”.

On the SonarQube UI, it looks like the Quality Profile cannot be found.
This is causing issues on our SonarQube projects relying on C#/VB.NET.

On the API:

  • GET api/qualityprofiles/search?qualityProfile=Sonar way lists the VB.NET Quality Profile with key ‘AWkFGLVgDFFS_xMFPrG4’.
  • But e.g. GET api/rules/search?qprofile=AWkFGLVgDFFS_xMFPrG4 returns a 404 Not Found with message: “The specified qualityProfile ‘AWkFGLVgDFFS_xMFPrG4’ does not exist”.

In addition, there are a lot of errors when running SonarQube analyses similar to this:

ERROR: Error during SonarScanner execution org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@5ace1ed4-org.sonar.scanner.report.ReportPublisher': Unsatisfied dependency expressed through constructor parameter 7; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@5ace1ed4-org.sonar.scanner.report.ActiveRulesPublisher': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ActiveRules' defined in org.sonar.scanner.rule.ActiveRulesProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.api.batch.rule.internal.DefaultActiveRules]: Factory method 'provide' threw exception; nested exception is org.sonarqube.ws.client.HttpException: Error 404 on https://<MySonarQubeServer>/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AWkFGLVgDFFS_xMFPrG4&ps=500&p=1 : {"errors":[{"msg":"The specified qualityProfile \u0027AWkFGLVgDFFS_xMFPrG4\u0027 does not exist"}]}

So far I haven’t found a community entry for this.
Is this already a known bug?
Is there a way to workaround this issue?

That’s pretty bizarre.

Can you try trashing your elasticsearch index and restarting the SonarQube service?

1. Stop SonarQube
2. Delete the `data/es7` directory
3. Restart SonarQube

Thanks Colin.

We were able to fix it by doing the following:

  • Revert upgrade back to previous version 9.5
  • Upgrade again to version 9.9 LTS without OS or DB upgrade
  • OS and DB upgrade to Ubuntu 20.04
  • Re-index the DB
  • OS and DB upgrade to Ubuntu 22.04

Now we’re running SonarQube 9.9 LTS without issues on the Quality Profiles or elsewhere, hence this thread can be closed. Thanks.

@mathj for understanding have you tried re-indexing before revert back?

Hi Sebastian,

No, we did not re-index the DB before going back to the previous version.

We reverted directly and after the upgrade to Ubuntu 20.04, we tested SonarScanner exection and got this error:

That pointed out the problem. We did not have the same error before when we had issues with Quality Profiles on 9.9 LTS.

HTH

1 Like

I got the same issue when search rules through API on version 9.9 LTS, Does anyone help to resolve it?