SonarQube 8.2 Failed Background

I emptied my complete database and completely setup SonarQube from scratch. Now let’s see if this helped.

I am just facing some annoying issues that SonarQube shows each user twice or show projects that are not there. Seem to be some artefacts in the SonarQube installation rather than in the database.
@dmeneses, do you know how to get rid of this?

Hi Daniel,
I didn’t get what is the problem you have?

Also if you see background tasks failing again, it would be great if you could send the contents of the scanner report so that we can debug it.

To reduce the number of files, you can send me only the the files named “component-*.pb”. I won’t be able to replay the P/R background task but I can see if there is anything wrong with the file paths and names.

After cleaning the database (drop of all tables) and setting up everything again (incl. new licence key for SonarQube Dev), some pull requests keep failing. Can’t tell you why.

Therefore, I am going to delete everything, including SonarQube installation folder etc., and start either with 8.1 or lower from scratch.

I was finally able to figure out the problem based on the files that Tom sent to me.
The problem happens in P/Rs when a top level directory, which contains modified files in the hierarchy, has the same name as the project (not to be confused with the key of the project).

This will be fixed in the next release.
Meanwhile, my suggestion as a workaround is to change the project’s name so that it doesn’t match the name of any top level directory. This can be done by defining sonar.projectName.

Ticket: https://jira.sonarsource.com/browse/SONAR-13262

4 Likes

Hi @dmeneses,

Glad to here my information helped you.

Unfortunately your suggested work around hasn’t worked for me, I have updated the sonar.projectname property that the scanner uses in the Azure Devops build task. However my background analysis still fail with the same error, do i need to update the project name on the server somewhere too ?

Did it change in SonarQube? It’s the name displayed in the project’s dashboard. No need to update it in in the server. In fact it’s not even possible to do it in the server. The name is set with the scanner.

No the name has stayed the same in the web view, as I guess it’s crashed before it’s changed - I will try doing a scan of master first to change then name then a PR scan.

Update - Running the scan on the master branch first to change the name before scanning the PR worked! Thank you for your help on this!

1 Like

Hi @dmeneses and @tjnashq,

I am glad I read your post before I started any of my planned total clean-up actions. After I renamed the project and a ran an analysis of the master branch, the last failed pull request was suddenly successful. I will keep an eye on the next pull requests.

Thanks a lot.