Sonarqube Upgrade - 6.7.4 (build 38452) - [LGPL v3] to 8.5.1

Currently we are using (SonarQube - Version 6.7.4 (build 38452) - [LGPL v3] , We are planning to upgrade to latest community version , which is 8.5.1. Can some one guide me how to do this Upgrade.

Hi @rmaryada! Welcome to the SonarSource Community!

In your case, your upgrade path is like so: 6.7.4 LTS -> 7.9 LTS -> 8.5.1

This means you will need to upgrade to 7.9 LTS then you will be able to upgrade to 8.5.1.

  1. Please first read our instructions on Upgrade the Server and the Release Upgrade Notes. The latter will be very important when you upgrade between versions, so please familiarize yourself and read these notes to avoid any surprise regressions, deprecation notices, and more.
  2. Read through the Upgrade Guide and follow the instructions. You will need to backup your database, any custom plugins (8.5.1 now includes the core plugins already, see here for more), and the file, just in case.

If you have any more questions, create a new thread and we can help you there.


Thanks Joe …

I see we have a process running with PostgressSQL does that mean , we are using Postgress Database.

  1. How do we copy the data from database from current version to latest version

Hi @rmaryada,

You do not need to copy data from your database, you can keep the same one. The version of SonarQube changes, not your database. Since you are using PostgreSQL, make sure to execute vacuum full:

Additional Database Maintenance

Refreshing your database’s statistics and rebuilding your database’s indices are recommended once the technical upgrade is done (just before the very last step).

For PostgreSQL, that means executing VACUUM FULL . According to the PostgreSQL documentation:

In normal PostgreSQL operation, tuples that are deleted or obsoleted by an update are not physically removed from their table; they remain present until a VACUUM is done.

Source here: Additional Information

Please review the links I’ve sent you as they have a lot of information that will help make your upgrade a smooth process. There are many things to check so review carefully.


Thanks Joe …

Postgres Version : 9.6
SQ Version : 7.9.4

After Upgrading from 6.7.4 to 7.9.4 , when trying to set up in the browser ( http://yourSonarQubeServerURL/setup ) , I got below error , I am not sure where to look and proceed on this , I am relatively very new to sonarqube tool

2020.11.09 09:56:04 ERROR web[][DbMigrations] #1942 'Add live_measures.metric_id index': failure | time=23ms
2020.11.09 09:56:04 ERROR web[][DbMigrations] Executed DB migrations: failure | time=1447ms
2020.11.09 09:56:04 ERROR web[][o.s.s.p.d.m.DatabaseMigrationImpl] DB migration failed | time=1506ms
2020.11.09 09:56:04 ERROR web[][o.s.s.p.d.m.DatabaseMigrationImpl] DB migration ended with an exception
org.sonar.server.platform.db.migration.step.MigrationStepExecutionException: Execution of migration step #1942 'Add live_measures.metric_id index' failed
        at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(
        at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(
        at java.base/java.lang.Iterable.forEach(
        at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(
        at org.sonar.server.platform.db.migration.engine.MigrationEngineImpl.execute(
        at org.sonar.server.platform.db.migration.DatabaseMigrationImpl.doUpgradeDb(
        at org.sonar.server.platform.db.migration.DatabaseMigrationImpl.doDatabaseMigration(
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(
        at java.base/java.util.concurrent.ThreadPoolExecutor$
        at java.base/
Caused by: java.lang.IllegalStateException: Fail to execute CREATE UNIQUE INDEX live_measures_component ON live_measures (component_uuid, metric_id)
        at org.sonar.server.platform.db.migration.step.DdlChange$Context.execute(
        at org.sonar.server.platform.db.migration.step.DdlChange$Context.execute(
        at org.sonar.server.platform.db.migration.step.DdlChange$Context.execute(
        at org.sonar.server.platform.db.migration.version.v70.AddLiveMeasuresMetricIndex.execute(
        at org.sonar.server.platform.db.migration.step.DdlChange.execute(
        at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(
        ... 9 common frames omitted
Caused by: org.postgresql.util.PSQLException: ERROR: could not create unique index "live_measures_component"
  Detail: Key (component_uuid, metric_id)=(6174d71b-09c9-415e-bf4e-a19edcc1a094, 145) is duplicated.
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(
        at org.postgresql.core.v3.QueryExecutorImpl.execute(
        at org.postgresql.jdbc.PgStatement.executeInternal(
        at org.postgresql.jdbc.PgStatement.execute(
        at org.postgresql.jdbc.PgStatement.executeWithFlags(
        at org.postgresql.jdbc.PgStatement.executeCachedSql(
        at org.postgresql.jdbc.PgStatement.executeWithFlags(
        at org.postgresql.jdbc.PgStatement.execute(
        at org.apache.commons.dbcp2.DelegatingStatement.execute(
        at org.apache.commons.dbcp2.DelegatingStatement.execute(
        at org.sonar.server.platform.db.migration.step.DdlChange$Context.execute(
        ... 14 common frames omitted

Joe , Can you please help , This is a show stopper for us.

Hi @rmaryada,

Apologies for the delay. What is your current status now?

  1. Please post your logs including the error.
  2. If you ran SQL queries, please show what you ran and the results of the query.
  3. What have you tried so far?
  4. What was the result of SONAR-12282 SQL query? Did you remove the projects?