6608 'Remove branch information from 'kee' in 'components'': failure

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*

I point this error here but not sure what to do with this…

Hi,

Welcome to the community!

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?

 
Ann