Upgrade 5.6.3 to 6.7.1 - sonarqube

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.

Related

facing issue with Sonarqube Upgradation

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.

SonarQube 6.7.2 doesn't start because of PLSQL

We upgraded from SonarQube 5.6 to 6.7.2 and also manually upgraded the plugins, including SonarPLSQL from 2.8 to 3.2.0
We are using the community version but have a valid (paid) licence for the plugin. When trying to start we get the error:
org.sonar.updatecenter.common.exception.PluginNotFoundException: The plugin 'license' required by 'plsql' is missing.
When removing the plugin from the plugins-folder SonarQube starts without problems.
Can you please help us?
The way licenses work have changed in the latest LTS. This is why you've got this error.
As you have a valid license of the PLSQL plugin, this means that you are a SonarSource customer so you should get in touch the SonarSource Sales representative you are in contact with to sort this out.

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.

PL/SQL plugin not working in SonarQube

I want to use SonarQube for PL/SQL. I downloaded the plugin from the SonarQube Site and placed it into $SONARQUBE_HOME/extensions/plugins. Then I restarted the SonarQube Server but it didn't start up. When I removed the plugin it was working.
How can I resolve this issue?
The PL/SQL language is supported as part of the SonarSource Developer Edition, which is a commercial package for which you need a license.
This is why if you install it manually, this will not work.

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