I am using sonarqube community version and trying to upgrade from 8.9 to 9.9. and upgrading using zip
when I start the database upgrade post configuration, gettig following error.
Any idea what could be the issue. I see the database connection is woking fine
*2025.04.09 07:14:28 INFO web[][o.s.s.p.d.m.DatabaseMigrationImpl] Starting DB Migration and container restart*
*2025.04.09 07:14:28 INFO web[][DbMigrations] Executing DB migrations...*
*2025.04.09 07:14:28 INFO web[][DbMigrations] #6608 'Remove branch information from 'kee' in 'components''...*
*2025.04.09 07:14:28 INFO web[][o.s.s.p.d.m.s.MassUpdate] 0 rows processed (0 items/sec)*
*2025.04.09 07:14:28 ERROR web[][DbMigrations] #6608 'Remove branch information from 'kee' in 'components'': failure | time=180ms*
*2025.04.09 07:14:28 ERROR web[][DbMigrations] Executed DB migrations: failure | time=184ms*
*2025.04.09 07:14:28 ERROR web[][o.s.s.p.d.m.DatabaseMigrationImpl] DB migration failed | time=253ms*
*2025.04.09 07:14:28 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 #6608 'Remove branch information from 'kee' in 'components'' 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 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*
* at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:2118)*
* at org.elasticsearch.client.IndicesClient.get(IndicesClient.java:1067)*
* at org.sonar.server.es.EsClient.lambda$getIndex$19(EsClient.java:183)*
* at org.sonar.server.es.EsClient.execute(EsClient.java:311)*
* ... 15 common frames omitted*
*Caused by: java.util.concurrent.ExecutionException: java.net.ConnectException: Connection refused*
* at org.elasticsearch.common.util.concurrent.BaseFuture$Sync.getValue(BaseFuture.java:257)*
* at org.elasticsearch.common.util.concurrent.BaseFuture$Sync.get(BaseFuture.java:244)*
* at org.elasticsearch.common.util.concurrent.BaseFuture.get(BaseFuture.java:75)*
* at org.elasticsearch.client.RestHighLevelClient.performClientRequest(RestHighLevelClient.java:2692)*
* ... 21 common frames omitted*
*Caused by: java.net.ConnectException: Connection refused*
* at java.base/sun.nio.ch.Net.pollConnect(Native Method)*
* at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672)*
* at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:946)*
* at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvent(DefaultConnectingIOReactor.java:174)*
* at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:148)*
* at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:351)*
* at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:221)*
* at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64)*
* ... 1 common frames omitted*
Please tell me you’re trying to hit 9.9 on the way to the current version, 25.4.
For Community Build, nothing but the latest version is supported, and 9.9 is already >2years old.
That said, the version you’re getting this error on is already more than 2 years old, so I’m not sure to what degree we’re going to be able to help you with it.
Your stacktrace points to an ElasticSearch problem, and the last Caused by is
What do your other server logs, in particular es.log say?
I see an error in the log, but it doesn’t mean much to me. I see that you’re using Java 17. I have no memory of whether SonarQube 8.9 was compatible with J17, but I’m skeptical.
I’d advise you to move on up to a current version of SonarQube, and then we’ll be able to help you.
Hi Ann,
I tried to downgrade the java on system. still facing connection refuse error. Attached are the log if you can help here plese. web.log (70.4 KB) sonar.20250507.log (194.5 KB) es.log (74.0 KB) access.log (1.6 KB)
@Vish Originally you were facing issues upgrading from 8.9 to 9.9, but now the logs you’ve shared show you starting up SonarQube 8.9.
What I think @ganncamp is suggesting is that you return to trying to upgrade your instance (and include your es.log from that attempt) rather than start 8.9 back up.
Hi Colin,
I was trying earlier, the current path of upgrade is as follows
I am on SonarQube 8.3 and will be upgrading to SonarQube 8.9LTA → 9.9LAT → 24.12.0 → 25.4.0
I have shared the log while upgrading from SonarQube 8.3 to 8.9
This is more likely a elasticsearch issue, I can see some error in web.log saying connection refused, but at the same time in es.log I see the elasticsearch is up and running, I have downgraded the java to 11 as per the compatibility of SonarQube 8.9.