SonarQube does not save project (historical) data - sonarqube

Both SonarQube 5.4 and 6.1 fail to save project (historical) data for the same 12 of my 64 projects. At first I thought it was related to a version and database upgrade (search SO for “SonarQube 6.1 not calculating lines of code after upgrade and database migration”), but I have both wiped the database, reinstalled SQ, and deleted and recreated the projects from within SQ multiple times to no effect.
As you can see in this screenshot:
SQ does recognize and analyze the files, but doesn't save anything to the database. I ran a project with SQ with logging set to TRACE and the results are here.
For anyone who looks at the log and wonders why I am running SQ 5.4, it is because that is apparently the newest version that supports analyzing C# files on non-Windows systems.
Thanks in advance for any help you can provide.

Related

Upgrade from SonarQube 5.6 to 5.6.6 database migration fails to show summary numbers correctly

SonarQube Community,
I upgraded from SonarQube 5.6 to 5.6.6 and the DB migration appeared to complete successfully.
Afterwards some of the projects summary data when drilling into the project does not show correctly while other projects do.
I have provide a link to the 3 items, two pngs showing visually what I am trying to communicate and the third with the log output from the upgrade and data migration.
I have rolled back to the old DB data as well as 5.6 and done this upgrade twice with the same outcome so it can be reproduced.
Is there something I need to know in doing this upgrade that I may have missed?
I have done several upgrades over the years and this is the first time I have seen this problem.
Thanks for any help you may be able to provide.
Doug
This is a case of a corrupted ElasticSearch index. It can be fixed by deleting _$SONARQUBE_HOME/data/es_.
From your comments, it looks like you carried over the ES index from your previous version. Instead, you should have
turned off your old version
exploded the zip for the new version
pointed the new version at your database
(re)installed your plugins
started the new version and allowed the ES indices to automatically (re)generate as part of the upgrade process

SonarQube upgrade to 6.4: cannot display tests results on the dahsboard

I upgraded my SonarQube from 5.4 to 5.6 LTS then to 6.3.1 then 6.4
On the version 6.4, when I click on the dashboard, I only see the projects' names but no results are displayed.
In addition I have a rotating frame of the project as if it loads.
Plus, When I click on the project, I have 0 bugs, 0 vulnerabilities .... which is wrong because when I click on issues, I can see that the project do have issues and I can display them.
It's the case with the projects analyzed with the previous versions only. I tried analyzing a project with 6.4 and the results related to Reliability, Security, Maintainability... are there.
Is there a way to fix this, ie to display on the dashboard of SonarQube 6.4 the results of projects analyzed by older versions?
Thanks in advance.
The fix is planned for SonarQube 6.5 (see the ticket).
This sounds like a corrupted ElasticSearch index. Try the following:
stop the server
delete _$SONARQUBE_HOME/data/es_
restart the server*
*The time for you server to come back up will vary based on how large the instance is
I see, thank you for your help. Just to let you know, even when I click on the project , I cannot see the results, they are only available when I click on Issues

Sonar Issue - Version update

Sonar is an open platform to manage code quality. I have the admin access to perform the updates. Recently I tried performing a version update from 3.7.3 to 4.1.1.Unfortunately 4.1.1 is only compatible with IE9 or above. Hence I back out the changes as in our organization IE8 is the internet browser. Now 3.7.3 is not working as it is showing as database is pointing to a latest version.MySQL is used to hold the sonar data. I am completely stuck with the issue. Sonar is a very important tool for us as this can only take a code coverage metrics for the source code.
May I request you to look in to this issue and provide some help. I cannot move forward without your help.
Anticipating your help and support.
The only way to get back to a normal state is to start over from a 3.7.3 database backup.

upgrade sonar and import all existing project matrix

we would like to upgrade from Sonar 3.0 to 3.5. we have many project profiles/matrix in the current sonar and if possible to import existing project matrix, build data and time machine data into the new sonar. How do i export current data and make them visible in Sonar 3.5?
Tried to upgrade in my testing machine and turned out Sonar page is empty. I followed all the Sonar upgrade guide including backup. It is important for us to keep existing project build and trending matrix(time machien).
btw, i'm using mysql.
When using Sonar with DBs like Oracle, MySql, Postgres or MSSQL, the migration process keeps everything already in place and you should end up with the same state as it was before the migration. If this is not the case, this means that the migration went wrong and you should be able to see it in the logs.

Upgrate to Sonarqube 3.6 takes over 2 hours! Is it correct?

I'm just upgrading our Sonar installation, from v3.5.1 to 3.6, and the process has been running for over two hours. Last log file entry was "Convert 508818 violations to issues" as the process was starting.
Now, the sonar site /setup is still showing "Sonar database is currently upgrading".
Is it correct that the upgrade of 500.000 violations to issues takes so much time?
Why does the log file is not being updated?
Thanks in advance.
Andreas
The upgrade from 3.5.1 to 3.6 can indeed last very long - but it will complete. You're facing this limitation: https://jira.codehaus.org/browse/SONAR-4470
This is mainly linked to performance issues on JRuby side (DB migration scripts are usually written on Rails side). As you can read in the ticket, we decided to rewrite this migration script in full Java and to provide a SonarQube 3.6.1 fix version.

Resources