SonarUpgrade Progress check

Hi All,

We are upgrading our sonarqube from 5.6.7 to 6.7.7 . But the upgrade is still going on nearly 4 days now. Is there a way to check the progress of the upgrade? How can we boost this upgrade since it taking too long?web.log (30.1 KB) I have attached the logs please also review it.

Hi @Nagaarjun_Nagarajan.

As you’re upgrading to an old version of SonarQube, it will be hard to be able to help…

I can recommend you to either :

  • Wait for more time for the SQL query to be completed
  • Remove some no more used projects, this will reduce the time of the migration
  • Start from scratch on a new SonarQube 7.9.3 as it’s the latest LTS.

Regards

Thanks for the reply,

is it possible to upgrade sonarqube from 5.6.6 to 7.9.3 directly?

Hi,

Sorry, but you have to go through 6.7.7. You don’t mention your DB flavor, but there’s some database hygiene in the Upgrade Guide that might help.

 
Ann

Now got this error: 2020.06.11 01:26:37 INFO web[o.s.s.p.d.m.s.MassUpdate] 0 measures processed (0 items/sec)
2020.06.11 01:27:37 INFO web[o.s.s.p.d.m.s.MassUpdate] 0 measures processed (0 items/sec)
2020.06.11 01:28:37 INFO web[o.s.s.p.d.m.s.MassUpdate] 0 measures processed (0 items/sec)
2020.06.11 01:29:37 INFO web[o.s.s.p.d.m.s.MassUpdate] 249 measures processed (4 items/sec)
2020.06.11 01:29:43 ERROR web[DbMigrations] #1267 ‘Populate column PROJECT_MEASURES.ANALYSIS_UUID’: failure | time=122049753ms
2020.06.11 01:29:43 ERROR web[DbMigrations] Executed DB migrations: failure | time=122049754ms
2020.06.11 01:29:43 ERROR web[o.s.s.p.d.m.DatabaseMigrationImpl] DB migration failed | time=122049802ms
2020.06.11 01:29:43 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 #1267 ‘Populate column PROJECT_MEASURES.ANALYSIS_UUID’ 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:657)
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: [sid=635925,rootsid=635363]
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.v60.PopulateAnalysisUuidOnMeasures.execute(PopulateAnalysisUuidOnMeasures.java:51)
at org.sonar.server.platform.db.migration.step.DataChange.execute(DataChange.java:39)
at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:75)
… 11 common frames omitted
Caused by: com.mysql.cj.jdbc.exceptions.CommunicationsException: The last packet successfully received from the server was 122,035,456 milliseconds ago. The last packet sent successfully to the server was 122,035,457 milliseconds ago. is longer than the server configured value of ‘wait_timeout’. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property ‘autoReconnect=true’ to avoid this problem.
at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)
at com.mysql.cj.jdbc.ConnectionImpl.isReadOnly(ConnectionImpl.java:1414)
at com.mysql.cj.jdbc.ConnectionImpl.isReadOnly(ConnectionImpl.java:1399)
at com.mysql.cj.jdbc.ClientPreparedStatement.executeBatchInternal(ClientPreparedStatement.java:403)
at com.mysql.cj.jdbc.StatementImpl.executeBatch(StatementImpl.java:796)
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
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: The last packet successfully received from the server was 122,035,456 milliseconds ago. The last packet sent successfully to the server was 122,035,457 milliseconds ago. is longer than the server configured value of ‘wait_timeout’. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property ‘autoReconnect=true’ to avoid this problem.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151)
at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167)
at com.mysql.cj.protocol.a.NativeProtocol.send(NativeProtocol.java:570)
at com.mysql.cj.protocol.a.NativeProtocol.sendCommand(NativeProtocol.java:625)
at com.mysql.cj.protocol.a.NativeProtocol.sendCommand(NativeProtocol.java:128)
at com.mysql.cj.NativeSession.sendCommand(NativeSession.java:311)
at com.mysql.cj.NativeSession.queryServerVariable(NativeSession.java:1008)
at com.mysql.cj.jdbc.ConnectionImpl.isReadOnly(ConnectionImpl.java:1406)
… 24 common frames omitted
Caused by: java.net.SocketException: Connection timed out (Write failed)
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111)
at java.net.SocketOutputStream.write(SocketOutputStream.java:155)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at com.mysql.cj.protocol.a.SimplePacketSender.send(SimplePacketSender.java:55)
at com.mysql.cj.protocol.a.TimeTrackingPacketSender.send(TimeTrackingPacketSender.java:50)
at com.mysql.cj.protocol.a.NativeProtocol.send(NativeProtocol.java:561)
… 29 common frames omitted

Hi, your error is right here:

Looks like a connectivity issue between SonarQube and your MySQL database.