Upgrade from 6.7.6 to 7.0 fails with Oracle error

sonarqube

(Serdar) #1

Hi everyone !

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    My Sonarqube version is 6.7.6 (Community version).
    Bellow plugins versions :
  • checkstyle-sonar-plugin-4.11.jar
  • qualinsight-sonarqube-smell-plugin-4.0.0.jar
  • sonar-findbugs-plugin-3.9.0.jar
  • sonar-java-plugin-5.9.1.16423.jar
  • sonar-ldap-plugin-2.2.0.608.jar
  • sonar-motion-chart-plugin-1.7.jar
  • sonar-php-plugin-2.15.0.4060.jar
  • sonar-pmd-plugin-3.0.1.jar
  • sonar-scm-git-plugin-1.2.jar
  • sonar-scm-svn-plugin-1.5.0.715.jar

Bellow extension oracle version :

  • ojdbc8-12.2.0.1.jar
  • what are you trying to achieve
    Upgrade successfully to 7.3v.

  • what have you tried so far to achieve this
    In the step : update BDD (sonarqubeIP:9000/setup), when I start update, after several hours I have an error:

2018.11.29 17:36:28 INFO  web[][DbMigrations] Executing DB migrations...
2018.11.29 17:36:28 INFO  web[][DbMigrations] #1908 'Delete person and file measures'...
2018.11.29 17:37:28 INFO  web[][o.s.s.p.d.m.s.MassUpdate] 249 snapshots processed (4 items/sec)
2018.11.29 17:38:28 INFO  web[][o.s.s.p.d.m.s.MassUpdate] 249 snapshots processed (0 items/sec)
2018.11.29 17:39:28 INFO  web[][o.s.s.p.d.m.s.MassUpdate] 249 snapshots processed (0 items/sec)
2018.11.29 17:40:28 INFO  web[][o.s.s.p.d.m.s.MassUpdate] 249 snapshots processed (0 items/sec)
2018.11.29 17:41:28 INFO  web[][o.s.s.p.d.m.s.MassUpdate] 249 snapshots processed (0 items/sec)
2018.11.29 17:42:28 INFO  web[][o.s.s.p.d.m.s.MassUpdate] 249 snapshots processed (0 items/sec)
....
2018.11.29 21:01:28 INFO  web[][o.s.s.p.d.m.s.MassUpdate] 499 snapshots processed (0 items/sec)
2018.11.29 21:02:28 INFO  web[][o.s.s.p.d.m.s.MassUpdate] 499 snapshots processed (0 items/sec)
2018.11.29 21:03:28 INFO  web[][o.s.s.p.d.m.s.MassUpdate] 499 snapshots processed (0 items/sec)
2018.11.29 21:04:28 INFO  web[][o.s.s.p.d.m.s.MassUpdate] 499 snapshots processed (0 items/sec)
2018.11.29 21:05:28 INFO  web[][o.s.s.p.d.m.s.MassUpdate] 499 snapshots processed (0 items/sec)
...
2018.11.29 21:06:28 INFO  web[][o.s.s.p.d.m.s.MassUpdate] 749 snapshots processed (4 items/sec)
2018.11.29 21:07:28 INFO  web[][o.s.s.p.d.m.s.MassUpdate] 749 snapshots processed (0 items/sec)
2018.11.29 21:08:28 INFO  web[][o.s.s.p.d.m.s.MassUpdate] 749 snapshots processed (0 items/sec)
2018.11.29 21:09:28 INFO  web[][o.s.s.p.d.m.s.MassUpdate] 749 snapshots processed (0 items/sec)
2018.11.29 21:10:28 INFO  web[][o.s.s.p.d.m.s.MassUpdate] 749 snapshots processed (0 items/sec)
2018.11.29 22:00:27 ERROR web[][DbMigrations] #1908 'Delete person and file measures': failure | time=15838460ms
2018.11.29 22:00:27 ERROR web[][DbMigrations] Executed DB migrations: failure | time=15838461ms
2018.11.29 22:00:27 ERROR web[][o.s.s.p.d.m.DatabaseMigrationImpl] DB migration failed | time=15838541ms
2018.11.29 22:00:27 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 #1908 'Delete person and file measures' 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.util.Iterator.forEachRemaining(Iterator.java:116)
        at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
        at java.util.stream.ReferencePipeline$Head.forEachOrdered(ReferencePipeline.java:590)
        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:50)
        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.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: Error during processing of row: [uuid=AVvOzSskNwjc42IGJknk]
        at org.sonar.server.platform.db.migration.step.SelectImpl.newExceptionWithRowDetails(SelectImpl.java:89)
        at org.sonar.server.platform.db.migration.step.SelectImpl.scroll(SelectImpl.java:81)
        at org.sonar.server.platform.db.migration.step.MassUpdate.execute(MassUpdate.java:91)
        at org.sonar.server.platform.db.migration.version.v70.DeletePersonAndFileMeasures.execute(DeletePersonAndFileMeasures.java:54)
        at org.sonar.server.platform.db.migration.step.DataChange.execute(DataChange.java:44)
        at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:75)
        ... 11 common frames omitted
Caused by: java.sql.BatchUpdateException: ORA-01089: immediate shutdown in progress - no operations are permitted
        at oracle.jdbc.driver.OraclePreparedStatement.executeLargeBatch(OraclePreparedStatement.java:10032)
        at oracle.jdbc.driver.T4CPreparedStatement.executeLargeBatch(T4CPreparedStatement.java:1364)
        at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:9839)
        at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:234)
        at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
        at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
        at org.sonar.server.platform.db.migration.step.UpsertImpl.addBatch(UpsertImpl.java:42)
        at org.sonar.server.platform.db.migration.step.MassUpdate.callSingleHandler(MassUpdate.java:118)
        at org.sonar.server.platform.db.migration.step.MassUpdate.lambda$execute$0(MassUpdate.java:91)
        at org.sonar.server.platform.db.migration.step.SelectImpl.scroll(SelectImpl.java:78)
        ... 15 common frames omitted
2018.11.29 22:00:28 ERROR web[][o.s.s.w.WebServiceEngine] Fail to process request http://s-sonar-qua-02:9000/api/system/db_migration_status
java.lang.IllegalStateException: Failed to read content of table schema_migrations
        at org.sonar.server.platform.db.migration.history.MigrationHistoryImpl.getLastMigrationNumber(MigrationHistoryImpl.java:72)
        at org.sonar.server.platform.db.migration.version.DatabaseVersion.getVersion(DatabaseVersion.java:51)
        at org.sonar.server.platform.ws.DbMigrationStatusAction.handle(DbMigrationStatusAction.java:68)
        at org.sonar.server.ws.WebServiceEngine.execute(WebServiceEngine.java:104)
        at org.sonar.server.ws.WebServiceFilter.doFilter(WebServiceFilter.java:84)
        at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:126)
        at org.sonar.server.platform.web.MasterServletFilter.doFilter(MasterServletFilter.java:95)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:87)
        at org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:71)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.sonar.server.platform.web.SecurityServletFilter.doHttpFilter(SecurityServletFilter.java:72)
        at org.sonar.server.platform.web.SecurityServletFilter.doFilter(SecurityServletFilter.java:48)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.sonar.server.platform.web.RedirectFilter.doFilter(RedirectFilter.java:61)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.sonar.server.platform.web.requestid.RequestIdFilter.doFilter(RequestIdFilter.java:58)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.sonar.server.platform.web.RootFilter.doFilter(RootFilter.java:62)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
        at ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:256)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.sql.SQLException: Listener refused the connection with the following error:
ORA-12528, TNS:listener: all appropriate instances are blocking new connections

Thank you for your help.
Regards,
Serdar


(G Ann Campbell) #2

Hi Serdar,

From what I can tell

ORA-01089: immediate shutdown in progress - no operations are permitted
...
Listener refused the connection with the following error: 
ORA-12528, TNS:listener: all appropriate instances are blocking new connections

Someone restarted your database while your migration was in progress. Can you try just restarting the process (hit the button again)?

 
Ann


(Serdar) #3

Hi Ann,

Thank you for your answer.
First time, I started update but after 4 hours, I stop it.
Then, I hit the button again at 17:30 then after several hours, i got the shutdown because Oracle was on maintenance.

Is it normal that update is not completed after 4 hours?

2018.11.29 17:36:28 INFO  web[][DbMigrations] Executing DB migrations...
2018.11.29 17:36:28 INFO  web[][DbMigrations] #1908 'Delete person and file measures'...
2018.11.29 17:37:28 INFO  web[][o.s.s.p.d.m.s.MassUpdate] 249 snapshots processed (4 items/sec)

Regards,
Serdar


(Serdar) #4

Hi,
Can you close this post please.

Regards,
Serdar