facing issue with Sonarqube Upgradation - sonarqube

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.

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.

Related

migrating specific project in sonarqube 7.3

We are planning to migrate from Sonarqube 5.6 version to Sonarqube 7.3 developer edition.
Because of huge lines of code we are planning to migrate specific project to Developer edition to regulate cost Hence Is there any way in to migrate only specific project not all the projects from current instance to Developer edition?
There is no out of the box way to do migrate a specific project: on startup of SonarQube the whole database is migrated in place. The commercial Sonar DB Copy Tool is copying table by table and also not based on a project. That is why it is so very important to make a database backup before you start migrating for the case something goes wrong (no rollback mechanism available). To prevent the migration of some large projects you can remove them before you upgrade and start the migration. See also the migration path documentation. The migration path you have to follow is: 5.x => 5.6.7 LTS => 6.7.x LTS => 7.x. Starting with an empty database can also be a consideration.

Upgrade SonarQube from version 5.6.4 to 6.7.2

I want to upgrade SonarQube and I haven't done this before so I have few question. Please could you help me with them?
How can I find which edition is installed on my server?
How can I find if the installed version is licensed or not?
How can I upgrade from 5.6.4 to 6.7 LTS? Do you have upgrade guide for the same?
You can always find which version is installed by logging into the SonarQube web app and looking at the footer of the page or by going to Administration / System / System Info. If you for some reason can't log in to the web app, and installation folder name does not contain the version number as it does by default, look in the "lib" folder for a file that looks like "sonar-application-6.3.1.jar". That will tell you the version number as well.
Here are the general steps for upgrading, from the Upgrade the Server docs:
Download and unzip the SonarQube distribution of your edition in a
fresh directory, let's say $NEW_SONARQUBE_HOME
Manually install the
non-default plugins that are compatible with your version of
SonarQube. Use the Compatibility Matrix to ensure that the versions
you install are compatible with your server version. Note that the
most recent versions of all SonarSource code analyzers available in
your edition are installed by default. Simply copying plugins from
the old server to the new is not recommended; incompatible or
duplicate plugins could cause startup errors.
Update the contents of
sonar.properties and wrapper.conf files (in
$NEW_SONARQUBE_HOME/conf) with the settings of the related files in
the $OLD_SONARQUBE_HOME/conf directory (web server URL, database,
ldap settings, etc.). Do not copy-paste the old files. If you are
using the Oracle DB, copy its JDBC driver into
$NEW_SONARQUBE_HOME/extensions/jdbc-driver/oracle
Stop your old
SonarQube Server
Start your new SonarQube Server
Browse to
http://yourSonarQubeServerURL/setup and follow the setup
instructions
Analyze your projects (and compute your
Views|Portofolios|Application if you own the Enterprise Edition
product) to get fresh data
Before embarking on this, you will want to check out the intermediate upgrade notes for each version in order: 6.0, 6.1, 6.2, 6.3, 6.4, 6.5, 6.6, and 6.7.
Note that upgrade notes for versions after 6.7 are hosted at the new documentation site.

Upgrade 5.6.3 to 6.7.1

We are trying to upgrade our current SonarQube from 5.6.3. to 6.7.1
We have upgrade our SQL Server to 2014 and 5.6.3 has been tested and it has been working fine when I try to start the 6.7.1 server. It shows the Warning database needs an upgrade but the process seems to be running.
Is the issue because of the plugins which we are supporting or the version of database. I am attaching all the logs that got generated.
Database version : Microsoft SQL Server2014(MSSM studio 12.0.5207.0)
Plugin version :
SonarJava : sonar-java-plugin-4.6.0.8784
C# : sonar-csharp-plugin-5.10.1.1411
Does plugin version has to play any role ( I doubt as it is highly unlikely)
Let me know in case any further details are required.
Please advice.
Thanks in Advance!
It sounds like you're missing the step where you have SonarQube upgrade it's own database schema. Specifically, navigate to [your SonarQube URL]/setup and click the button on that screen. That triggers SonarQube to make the database changes required to support your new version.

Data lost Sonarqube migration 6.6 to 6.7.1

I am trying to upgrade sonarqube from version 6.6 to LTS version 6.7.1.
I noticed post migration all the projects configured are lost.
Wondering if anyone has encountered this before or there is any solution to it.

Which version of SonarQube contains the fix for SLVS-1122

I am getting permissions related errors in my analysis because the process is requesting write access. Before the analysis task starts, if I uncheck the read-only box for the source folder the error does not happen. That is why I'm looking for this fix -
https://jira.sonarsource.com/browse/SLVS-1122
According to the commends on that link, SonarAnalyzer for .Net 1.21 wasn't released until at least Jan 30th. Will this fix be in SonarQube 5.6.6, or will I have to wait until 5.7?
edit: currently running version 5.6.4 through TFS 2015 onprem
You're mixing apples and oranges. The fix you want is in the most recently released version of SonarC#. You can upgrade it in your SonarQube server (mostly) independently of your SonarQube server version.

Resources