SonarCube v9 does not start

Hi, after upgrading to v9.1, sonarQube shuts down to an exception (below).

  • sonarQube version: 8.6, upgrading to latest (9.1)
  • Upgrade from v8.6 to v9.1
  • what have you tried so far to achieve this: ensured port 9000 is available and not blocked by firewall

Followed upgrade guide (Upgrade Guide | SonarQube Docs) but the new instance does not run.

All other logs except ‘sonar.20211104.log’ are empty or have no errors. (full logs attached)logs.zip (4.8 KB)

Exception:

--> Wrapper Started as Service
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
  Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.

2021.11.04 10:51:18 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory E:\SonarQube\temp
2021.11.04 10:51:18 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9000, TCP: 127.0.0.1:17438]
2021.11.04 10:51:18 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [E:\SonarQube\elasticsearch]: C:\Program Files\Java\jdk-11.0.10\bin\java -XX:+UseG1GC -Djava.io.tmpdir=E:\SonarQube\temp -XX:ErrorFile=../logs/es_hs_err_pid%p.log -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dio.netty.allocator.numDirectArenas=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Djava.locale.providers=COMPAT -Des.enforce.bootstrap.checks=true -Xmx512m -Xms512m -XX:MaxDirectMemorySize=256m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=E:\SonarQube\elasticsearch -Des.path.conf=E:\SonarQube\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch
2021.11.04 10:51:18 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2021.11.04 10:51:19 ERROR app[][o.s.a.p.EsManagedProcess] Failed to check status
org.elasticsearch.ElasticsearchException: java.util.concurrent.ExecutionException: java.net.ConnectException: Timeout connecting to [/127.0.0.1:9000]
	at org.elasticsearch.client.RestHighLevelClient.performClientRequest(RestHighLevelClient.java:2078)
	at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1732)
	at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1702)
	at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1672)
	at org.elasticsearch.client.ClusterClient.health(ClusterClient.java:119)
	at org.sonar.application.es.EsConnectorImpl.getClusterHealthStatus(EsConnectorImpl.java:64)
	at org.sonar.application.process.EsManagedProcess.checkStatus(EsManagedProcess.java:90)
	at org.sonar.application.process.EsManagedProcess.checkOperational(EsManagedProcess.java:75)
	at org.sonar.application.process.EsManagedProcess.isOperational(EsManagedProcess.java:60)
	at org.sonar.application.process.ManagedProcessHandler.refreshState(ManagedProcessHandler.java:220)
	at org.sonar.application.process.ManagedProcessHandler$EventWatcher.run(ManagedProcessHandler.java:285)
Caused by: java.util.concurrent.ExecutionException: java.net.ConnectException: Timeout connecting to [/127.0.0.1:9000]
	at org.elasticsearch.common.util.concurrent.BaseFuture$Sync.getValue(BaseFuture.java:262)
	at org.elasticsearch.common.util.concurrent.BaseFuture$Sync.get(BaseFuture.java:249)
	at org.elasticsearch.common.util.concurrent.BaseFuture.get(BaseFuture.java:76)
	at org.elasticsearch.client.RestHighLevelClient.performClientRequest(RestHighLevelClient.java:2075)
	... 10 common frames omitted
Caused by: java.net.ConnectException: Timeout connecting to [/127.0.0.1:9000]
	at org.apache.http.nio.pool.RouteSpecificPool.timeout(RouteSpecificPool.java:169)
	at org.apache.http.nio.pool.AbstractNIOConnPool.requestTimeout(AbstractNIOConnPool.java:628)
	at org.apache.http.nio.pool.AbstractNIOConnPool$InternalSessionRequestCallback.timeout(AbstractNIOConnPool.java:894)
	at org.apache.http.impl.nio.reactor.SessionRequestImpl.timeout(SessionRequestImpl.java:184)
	at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processTimeouts(DefaultConnectingIOReactor.java:214)
	at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:158)
	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)
	at java.base/java.lang.Thread.run(Thread.java:834)

Initially it was trying to use port 9001, which was also available, so we added the following config to use port 9000, that is was our current sq instance uses. (sonar.search.port=9000)

Found the same error reported here Issue when installing Sonarqube - Get help / SonarQube - SonarSource Community but was not able to get help.

@samovermars the issue in my case was the database…
The connectivity to database and also the collation which failed my Sonarqube service to start… I found this information on one of the logs…

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.