I just start the 9.9.0 docker image with the same db connection of 8.9.9, and trigger the link “https://sonar-ip/setup” to do the db upgrade. but fail.
more error message:
2023.03.22 12:55:24 INFO web[][DbMigrations] #6016 'Create unique index for 'portfolio_projects''...
2023.03.22 12:55:24 INFO web[][DbMigrations] #6016 'Create unique index for 'portfolio_projects'': success | time=20ms
2023.03.22 12:55:24 INFO web[][DbMigrations] #6017 'Migrate portfolios to new tables'...
2023.03.22 12:55:24 INFO web[][o.s.s.p.d.m.s.MassUpdate] 1 rows processed (0 items/sec)
2023.03.22 12:55:24 INFO web[][DbMigrations] #6017 'Migrate portfolios to new tables': success | time=388ms
2023.03.22 12:55:24 INFO web[][DbMigrations] #6018 'Create index for 'issue_changes' on 'issue_key' and 'change_type''...
2023.03.22 12:55:40 INFO app[][o.s.a.SchedulerImpl] Stopping SonarQube
2023.03.22 12:55:40 INFO app[][o.s.a.SchedulerImpl] Sonarqube has been requested to stop
2023.03.22 12:55:40 INFO app[][o.s.a.SchedulerImpl] Stopping [Compute Engine] process...
2023.03.22 12:55:40 INFO app[][o.s.a.SchedulerImpl] Stopping [Web Server] process...
2023.03.22 12:55:40 INFO web[][o.s.p.ProcessEntryPoint] Gracefully stopping process
2023.03.22 12:55:41 INFO web[][DbMigrations] #6018 'Create index for 'issue_changes' on 'issue_key' and 'change_type'': success | time=16669ms
2023.03.22 12:55:41 ERROR web[][DbMigrations] Executed DB migrations: failure | time=50788ms
2023.03.22 12:55:41 ERROR web[][o.s.s.p.d.m.DatabaseMigrationImpl] Container restart failed | time=50822ms
2023.03.22 12:55:41 ERROR web[][o.s.s.p.d.m.DatabaseMigrationImpl] Container restart failed
java.lang.IllegalStateException: Unable to load component class org.sonar.server.platform.db.migration.version.v91.RemoveSVNPropertiesData
at org.sonar.core.platform.SpringComponentContainer.getComponentByType(SpringComponentContainer.java:139)
at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:64)
at com.google.common.collect.ImmutableList.forEach(ImmutableList.java:422)
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:66)
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:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.IllegalStateException: org.springframework.context.annotation.AnnotationConfigApplicationContext@382fdcb9 has been closed already
at org.springframework.context.support.AbstractApplicationContext.assertBeanFactoryActive(AbstractApplicationContext.java:1138)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1171)
at org.sonar.core.platform.SpringComponentContainer.getComponentByType(SpringComponentContainer.java:137)
... 9 common frames omitted
2023.03.22 12:55:41 INFO web[][c.z.h.HikariDataSource] HikariPool-1 - Shutdown initiated...
2023.03.22 12:55:41 INFO web[][c.z.h.HikariDataSource] HikariPool-1 - Shutdown completed.
2023.03.22 12:55:41 INFO web[][o.s.s.app.WebServer] Web Server stopped
2023.03.22 12:55:42 INFO app[][o.s.a.SchedulerImpl] Process[Web Server] is stopped
2023.03.22 12:55:42 INFO app[][o.s.a.SchedulerImpl] Stopping [ElasticSearch] process...
2023.03.22 12:55:42 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 143
2023.03.22 12:55:42 INFO app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2023.03.22 12:55:42 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
I’ve noticed those lines in the logs. Is it possible that k8s is stopping the pod because it is not ready? How do you check the liveness/readiness of the pod?
I am using the standard helm chart.
I think it has enough time to finish all the upgrade steps, and once we can visit “https://sonar-it/setup”, that mean the sonarqube is up.