Need assistance with SonarQube upgrade from 5.6.4 to 6.7.7

After upgrading SonarQube from 5.6.4 to 6.7.7, seeing the following exceptions in the sonar.log:

019.05.31 18:04:24 DEBUG app[][o.e.c.t.TransportClientNodesService] failed to connect to node [{#transport#-1}{2aB9ssL0S6-yWeK3fE4Ilg}{127.0.0.1}{127.0.0.1:9001}], ignoring...
org.elasticsearch.transport.ConnectTransportException: [][127.0.0.1:9001] connect_timeout[30s]
	at org.elasticsearch.transport.netty4.Netty4Transport.connectToChannels(Netty4Transport.java:362)
	at org.elasticsearch.transport.TcpTransport.openConnection(TcpTransport.java:570)
	at org.elasticsearch.transport.TcpTransport.openConnection(TcpTransport.java:117)
	at org.elasticsearch.transport.TransportService.openConnection(TransportService.java:351)
	at org.elasticsearch.client.transport.TransportClientNodesService$SimpleNodeSampler.doSample(TransportClientNodesService.java:407)
	at org.elasticsearch.client.transport.TransportClientNodesService$NodeSampler.sample(TransportClientNodesService.java:357)
	at org.elasticsearch.client.transport.TransportClientNodesService.addTransportAddresses(TransportClientNodesService.java:198)
	at org.elasticsearch.client.transport.TransportClient.addTransportAddress(TransportClient.java:319)
	at org.sonar.application.process.EsProcessMonitor.addHostToClient(EsProcessMonitor.java:186)
	at org.sonar.application.process.EsProcessMonitor.buildTransportClient(EsProcessMonitor.java:177)
	at org.sonar.application.process.EsProcessMonitor.getTransportClient(EsProcessMonitor.java:160)
	at org.sonar.application.process.EsProcessMonitor.checkStatus(EsProcessMonitor.java:134)
	at org.sonar.application.process.EsProcessMonitor.checkOperational(EsProcessMonitor.java:93)
	at org.sonar.application.process.EsProcessMonitor.isOperational(EsProcessMonitor.java:78)
	at org.sonar.application.process.SQProcess.refreshState(SQProcess.java:161)
	at org.sonar.application.process.SQProcess$EventWatcher.run(SQProcess.java:220)
Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: /127.0.0.1:9001
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
	at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:352)
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:340)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:632)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:579)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:496)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.ConnectException: Connection refused: no further information
	... 10 common frames omitted
2019.05.31 18:04:24 DEBUG app[][o.s.a.p.EsProcessMonitor] Connected to Elasticsearch node: [127.0.0.1:9001]
2019.05.31 18:04:28 DEBUG app[][o.e.c.t.TransportClientNodesService] failed to connect to node [{#transport#-1}{2aB9ssL0S6-yWeK3fE4Ilg}{127.0.0.1}{127.0.0.1:9001}], ignoring...
org.elasticsearch.transport.ConnectTransportException: [][127.0.0.1:9001] connect_timeout[30s]
	at org.elasticsearch.transport.netty4.Netty4Transport.connectToChannels(Netty4Transport.java:362)
	at org.elasticsearch.transport.TcpTransport.openConnection(TcpTransport.java:570)
	at org.elasticsearch.transport.TcpTransport.openConnection(TcpTransport.java:117)
	at org.elasticsearch.transport.TransportService.openConnection(TransportService.java:351)
	at org.elasticsearch.client.transport.TransportClientNodesService$SimpleNodeSampler.doSample(TransportClientNodesService.java:407)
	at org.elasticsearch.client.transport.TransportClientNodesService$NodeSampler.sample(TransportClientNodesService.java:357)
	at org.elasticsearch.client.transport.TransportClientNodesService$ScheduledNodeSampler.run(TransportClientNodesService.java:390)
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:569)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: /127.0.0.1:9001
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
	at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:352)
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:340)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:632)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:579)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:496)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
	... 1 common frames omitted
Caused by: java.net.ConnectException: Connection refused: no further information
	... 10 common frames omitted

Hi,

Here’s your problem:

Do you have some other process using that port?

 
Ann

Hi Ann,

no other process is using that port.

Thanks

Hi,

Okay, well something’s preventing access to the port. You can either clear that up, or update the configuration (sonar.search.port in $SONARQUBE_HOME/config/sonar.properties) to use a port that’s available.

 
Ann

Hi Ann,

Thanks for creating great product.

I am also getting this same error. I have even change the port to 9005 but still got the same error.

ERROR
2023.02.13 15:38:12 DEBUG app[][i.n.b.ByteBufUtil] -Dio.netty.maxThreadLocalCharBufferSize: 16384
2023.02.13 15:38:13 DEBUG app[][o.e.c.t.TransportClientNodesService] failed to connect to node [{#transport#-1}{yo2R17pKQra-37_Wt_EnXA}{127.0.0.1}{127.0.0.1:9005}], ignoring...
org.elasticsearch.transport.ConnectTransportException: [][127.0.0.1:9005] connect_exception
        at org.elasticsearch.transport.TcpTransport$ChannelsConnectedListener.onFailure(TcpTransport.java:1309)
        at org.elasticsearch.action.ActionListener.lambda$toBiConsumer$2(ActionListener.java:100)
        at org.elasticsearch.common.concurrent.CompletableContext.lambda$addListener$0(CompletableContext.java:42)
        at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:859)
        at java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:837)
        at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
        at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2088)
        at org.elasticsearch.common.concurrent.CompletableContext.completeExceptionally(CompletableContext.java:57)
        at org.elasticsearch.transport.netty4.Netty4TcpChannel.lambda$new$1(Netty4TcpChannel.java:72)
        at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:511)
        at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:504)
        at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:483)
        at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:424)
        at io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:121)
        at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.fulfillConnectPromise(AbstractNioChannel.java:327)
        at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:343)
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:591)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:508)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:470)
        at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
        at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /127.0.0.1:9005
        at java.base/sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
        at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:777)
        at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:327)
        at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:340)
        ... 6 common frames omitted
Caused by: java.net.ConnectException: Connection refused
        ... 10 common frames omitted
2023.02.13 15:38:13 DEBUG app[][o.s.a.e.EsConnectorImpl] Connected to Elasticsearch node: [127.0.0.1:9005]
2023.02.13 15:38:17 DEBUG app[][i.n.b.AbstractByteBuf] -Dio.netty.buffer.checkAccessible: true
2023.02.13 15:38:17 DEBUG app[][i.n.b.AbstractByteBuf] -Dio.netty.buffer.checkBounds: true
2023.02.13 15:38:17 DEBUG app[][i.n.u.ResourceLeakDetectorFactory] Loaded default ResourceLeakDetector: io.netty.util.ResourceLeakDetector@16b12adf
2023.02.13 15:38:17 DEBUG app[][i.n.util.Recycler] -Dio.netty.recycler.maxCapacityPerThread: 4096
2023.02.13 15:38:17 DEBUG app[][i.n.util.Recycler] -Dio.netty.recycler.maxSharedCapacityFactor: 2
2023.02.13 15:38:17 DEBUG app[][i.n.util.Recycler] -Dio.netty.recycler.linkCapacity: 16
2023.02.13 15:38:17 DEBUG app[][i.n.util.Recycler] -Dio.netty.recycler.ratio: 8
2023.02.13 15:38:17 DEBUG app[][o.e.t.ConnectionManager] connected to node [{sonarqube}{O98y1L-vTUqj17Ii5gJLEA}{sO0eKHL7SIKyJ_vgJy9MqQ}{127.0.0.1}{127.0.0.1:9005}{rack_id=sonarqube}]
2023.02.13 15:38:22 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
2023.02.13 15:38:22 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [/opt/sonarqube-7.9.5]: /usr/lib/jvm/java-11-openjdk-amd64/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonarqube-7.9.5/temp --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/common/*:/opt/sonarqube-7.9.5/lib/jdbc/postgresql/postgresql-42.2.5.jar org.sonar.server.app.WebServer /opt/sonarqube-7.9.5/temp/sq-process14290330476380924967properties
2023.02.13 15:38:29 DEBUG app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [web]: 0
2023.02.13 15:38:29 INFO  app[][o.s.a.SchedulerImpl] Process[web] is stopped
2023.02.13 15:38:29 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 143
2023.02.13 15:38:29 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
2023.02.13 15:38:29 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
2023.02.13 15:38:29 DEBUG app[][o.s.a.SchedulerImpl] Stopping [ce]...
2023.02.13 15:38:29 DEBUG app[][o.s.a.SchedulerImpl] Stopping [web]...
2023.02.13 15:38:29 DEBUG app[][o.s.a.SchedulerImpl] Stopping [es]...
<-- Wrapper Stopped
sonar@sonarqubeserver-virtual-machine:/opt/sonarqube-7.9.5/logs$

I am using 7.9lts SonarQube community version.

all memory related varibales are updated according to docs.

sonar@sonarqubeserver-virtual-machine:/opt/sonarqube-7.9.5/logs$ sysctl vm.max_map_count
vm.max_map_count = 262144
sonar@sonarqubeserver-virtual-machine:/opt/sonarqube-7.9.5/logs$ sysctl fs.file-max
fs.file-max = 65536
sonar@sonarqubeserver-virtual-machine:/opt/sonarqube-7.9.5/logs$ ulimit -n
65536
sonar@sonarqubeserver-virtual-machine:/opt/sonarqube-7.9.5/logs$ ulimit -u
4096
sonar@sonarqubeserver-virtual-machine:/opt/sonarqube-7.9.5/logs$

It would be great if you suggests some solution.

Thanks

Hi @DENeo,

You’ve resurrected a 4-year-old thread with an error in a version that’s now 2 LTSs old. Please don’t resurrect old threads. Create new ones and reference the old ones if necessary.

Your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

7.9.x → 8.9.10 → 9.9

You may find the Upgrade Guide and the LTS-to-LTS Upgrade Notes for 7.9 to 8.9, as well as the LTS to LTS release upgrade notes for 8.9 to 9.9 helpful. If you have questions about upgrading, feel free to open a new thread for that here.

If your error persists after upgrade, please come back to us.

 
Ann

1 Like