Skip to main content

Common problems with SonarQube

When you add the integration​

What you seeWhat to do
sonar.example.com refused the credentials (401). Check the token, and that it has not expired.Create a new User Token: see Create a SonarQube token.
No server answers to the name sonar.example.com. Check its spelling against the address you open in your browser. If it is right, Astrolabe cannot see this server: tell your company's Astrolabe administrator.Copy the address from your browser into SonarQube base URL.

On the component page​

What you seeWhat to do
No SonarQube tab, no Code Quality cardAdd the sonarqube.org/project-key annotation to the component, and turn on Enable SonarQube in Administration › Plugins.
SonarQube is not set up yet. Add a SonarQube integration in Administration › Company connections › SonarQube, then switch the SonarQube plugin on in Administration › Plugins.Do what the message says: add the integration.
The default SonarQube has no project with the key "acme-shop-api". Check the sonarqube.org/project-key annotation of this component.Copy the Project Key from SonarQube, Project Information, into the annotation.
The default SonarQube refused the token of its integration. Replace the token in Administration › Company connections › SonarQube.The token has expired or was revoked: create a new one and paste it in the integration.
The SonarQube "prod" refuses to show the project "acme-shop-api" to the token of its integration. In SonarQube, give the user of this token the Browse permission on the project.In SonarQube, give the Browse permission on the project to the token's user.
No SonarQube integration has the instance key "prod" that this component's sonarqube.org/project-key annotation starts with. Use the instance key of one of your SonarQube integrations (Administration › Company connections › SonarQube), or remove "prod/" to read from the default SonarQube.Write in the annotation the SonarQube instance key of one of your integrations, or remove prod/.
The default SonarQube has no analysis of the project "acme-shop-api" yet. Run an analysis, then reload this page.Run an analysis of the project in your CI, then reload the page.
The default SonarQube could not be read (no answer). Check the SonarQube base URL in Administration › Company connections › SonarQube.Check SonarQube base URL in the integration, then Test connection.
Still stuck?

Write to support@forgeit.fr with the name of the component and the message you see.