Hello community!
old version: 6.7.6 (build 38781) CE
new version: 7.9.1.27448 CE
environment: docker container with external MSSQL database
I called the /setup page and got following failure message from startup logs:
2019.07.11 14:40:48 INFO web[DbMigrations] #1951 ‘Drop unique index on QUALITY_GATES.NAME’…
2019.07.11 14:40:48 ERROR web[DbMigrations] #1951 ‘Drop unique index on QUALITY_GATES.NAME’: failure | time=10ms
2019.07.11 14:40:49 ERROR web[DbMigrations] Executed DB migrations: failure | time=11ms
2019.07.11 14:40:49 ERROR web[o.s.s.p.d.m.DatabaseMigrationImpl] DB migration failed | time=142ms
2019.07.11 14:40:49 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 #1951 ‘Drop unique index on QUALITY_GATES.NAME’ failed
at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:79)
at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:67)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:52)
at org.sonar.server.platform.db.migration.engine.MigrationEngineImpl.execute(MigrationEngineImpl.java:68)
at org.sonar.server.platform.db.migration.DatabaseMigrationImpl.doUpgradeDb(DatabaseMigrationImpl.java:105)
at org.sonar.server.platform.db.migration.DatabaseMigrationImpl.doDatabaseMigration(DatabaseMigrationImpl.java:80)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.IllegalStateException: Fail to execute DROP INDEX uniq_quality_gates ON quality_gates
at org.sonar.server.platform.db.migration.step.DdlChange$Context.execute(DdlChange.java:97)
at org.sonar.server.platform.db.migration.step.DdlChange$Context.execute(DdlChange.java:77)
at org.sonar.server.platform.db.migration.step.DdlChange$Context.execute(DdlChange.java:117)
at org.sonar.server.platform.db.migration.version.v70.DropUniqueIndexOnQualityGatesName.execute(DropUniqueIndexOnQualityGatesName.java:35)
at org.sonar.server.platform.db.migration.step.DdlChange.execute(DdlChange.java:45)
at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:75)
… 9 common frames omitted
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Cannot drop the index ‘quality_gates.uniq_quality_gates’, because it does not exist or you do not have permission.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:262)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1621)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:868)
at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:768)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7194)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2935)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:248)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:223)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(SQLServerStatement.java:744)
at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:175)
at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:175)
at org.sonar.server.platform.db.migration.step.DdlChange$Context.execute(DdlChange.java:82)
… 14 common frames omitted
Adjustment to docker container: only added a custom root CA certificate (private PKI) and additional plugins (from official website):
sonar-csharp-plugin-7.10.0.7896.jar
sonar-java-plugin-5.9.2.16552.jar
sonar-ldap-plugin-2.2.0.608.jar
sonar-findbugs-plugin-3.6.0.jar
sonar-javascript-plugin-5.0.0.6962.jar
sonar-scm-svn-plugin-1.3.jar
For the update I deleted the plugin folder because I saw the most are already included now.
DB admin already confirmed that deletion is allowed from permission side. I also found an index called quality_gates$uniq_quality_gates and renamed it but no success…
An idea came into my mind that I maybe just re-create the INDEX manually but I don’t have much experience with the command for that.
Any suggestions?