facing issue with Sonarqube Upgradation

148 Views Asked by At

We are facing issue in SonarQube upgradation, Current Version of SonarQube running in production is : 5.6.5 (OSS- Community Edition) and expected version is 7.2.

Migration Path tried: (As suggested in Sonarqube upgrade guide)

         Current Version | Higher Version
Trial1 : 5.6.5           => 6.7 => 7.2
Trial2 : 5.6.5           => 6.2 => 6.7
Trial3 : 5.6.5           => 6.0 => 6.2
Trial4 : 5.6.5           => 5.6.7 
Trail5 : 5.6.5           => 5.6.6

Database in use: Postgres SQL Server OS where Sonarqube hosted is RHEL 7 (For upgradation we tried with both windows and RHEL)

Highlights :

  • In all above mentioned paths we are facing issue that after upgradation its only showing 5 projects out of 107 projects available in the database whereas in the current production instance which is Sonarqube 5.6.5 its shows all 107 projects.
  • Database dump and restore from production instance to test server has no error reported in logs.
  • Plugins are upgraded as per compatibility matrix shared by SonarSource
  • Projects Analyzed language : Java, C#, JavaScript and XML.
  • No errors reported in Sonarqube Logs
  • After migration new analysis is also working fine issue that it’s not showing all previous analyzed projects
  • And for 5 projects which are visible after migration its showing history as well

We have tried restarting Sonarqube after deleting es directory after upgrade.

1

There are 1 best solutions below

0
G. Ann - SonarSource Team On

First, there's no need to upgrade to intermediate, non-LTS versions.

Now regarding your missing projects post-upgrade, it's likely that you have corrupt Elasticsearch indices. Try:

  • stop server
  • delete $SONARQUBE_HOME/data/es (or /es5 depending on the version)
  • restart the server

It will take a little while for your indices to rebuild, but then you should be good.