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

HI Ann,
Thanks for your response, I have attached the es.log file
es.log (74.0 KB)

Regards,
Vish M

Hi Vish,

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.

 
Ann

Hi @ganncamp

Thanks for noticing java version, what is campatable version for the SonarQube 8.9? Is it Java 11?

Regards,
Vish M

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)

Hi,

As I said earlier, I don’t remember what Java version 8.9 used.

And I can’t help you with 8.9. At all. Upgrade, and we’ll go from there.

 
Ann

@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.

2025.05.06 01:30:35 DEBUG es[][o.e.j.JarHell] examining jar: /opt/tomcat/sonarqube/sonarqube-8.9.10.61524/elasticsearch/lib/lucene-queryparser-8.10.1.jar

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.

Regards,
Vish M

Hi Vish,

I thought you were upgrading from 8.9, not that 8.9 was part of your upgrade path.

Were you able to run SonarQube’s schema upgrade once you got to 8.9? Or is the Elasticsearch problem preventing that?

 
Ann