Error upgrading from SonarQube 7.3 to 7.9.6 (prerequisite upgrade for 8.9.7 LTS)

Current system:

  • SonarQube v7.3 Community
  • MS SQL 2016
  • JDK 8.0
  • Running on Windows Server 2016 VM, with IIS reverse proxy for SSL

Attempting to upgrade to 8.9.7 LTS, but requires intermediary upgrade to previous 7.9.6 LTS. Preparation steps:

  • Install JDK 11.0.13
  • Update
  • Update wrapper.conf (points to JDK 11)

Prior to installing and running NT service, I performed startsonar to test the initialization. This step fails always. sonar.log reports failed initialization of elastic search.

sonar.log says:

--> Wrapper Started as Console
Launching a JVM...
Wrapper (Version 3.2.3)
  Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved. Permission denied: connect
2022.04.02 16:10:22 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\sonarqube\v7.9.6\temp
2022.04.02 16:10:22 INFO  app[][] Elasticsearch listening on /
2022.04.02 16:10:22 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [C:\sonarqube\v7.9.6\elasticsearch]: C:\SDK\Java\jdk11.0.13.8\bin\java -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -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 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true\sonarqube\v7.9.6\temp -XX:ErrorFile=../logs/es_hs_err_pid%p.log -Des.enforce.bootstrap.checks=true -Xms512m -Xmx512m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=C:\sonarqube\v7.9.6\elasticsearch -Des.path.conf=C:\sonarqube\v7.9.6\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch
2022.04.02 16:10:22 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
2022.04.02 16:10:23 INFO  app[][o.e.p.PluginsService] no modules loaded
2022.04.02 16:10:23 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
Exception in thread "elasticsearch[_client_][generic][T#1]" java.lang.NullPointerException
	at org.elasticsearch.transport.netty4.Netty4Transport.lambda$stopInternal$2(
	at org.elasticsearch.transport.netty4.Netty4Transport.stopInternal(
	at org.elasticsearch.transport.TcpTransport.lambda$doStop$11(
	at org.elasticsearch.common.util.concurrent.ThreadContext$
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(
	at java.base/java.util.concurrent.ThreadPoolExecutor$
	at java.base/
2022.04.02 16:10:26 ERROR app[][o.s.a.p.EsManagedProcess] Failed to check status
java.lang.IllegalStateException: failed to create a child event loop
	at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(
	at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(
	at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(
	at org.elasticsearch.transport.netty4.Netty4Transport.doStart(
	at org.elasticsearch.common.component.AbstractLifecycleComponent.start(
	at org.elasticsearch.transport.TransportService.doStart(
	at org.elasticsearch.common.component.AbstractLifecycleComponent.start(
	at org.elasticsearch.client.transport.TransportClient.buildTemplate(
	at org.elasticsearch.client.transport.TransportClient.<init>(
	at org.sonar.application.process.EsManagedProcess.checkStatus(
	at org.sonar.application.process.EsManagedProcess.checkOperational(
	at org.sonar.application.process.EsManagedProcess.isOperational(
	at org.sonar.application.process.ManagedProcessHandler.refreshState(
	at org.sonar.application.process.ManagedProcessHandler$
Caused by: failed to open a new selector
	at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(
	... 21 common frames omitted
Caused by: Unable to establish loopback connection
	at java.base/$
	at java.base/$
	at java.base/ Method)
	at java.base/<init>(
	at java.base/
	at java.base/
	at java.base/<init>(
	at java.base/
	... 25 common frames omitted
Caused by: Permission denied: listen
	at java.base/ Method)
	at java.base/
	at java.base/
	at java.base/
	at java.base/$Initializer$
	at java.base/$
	... 33 common frames omitted
2022.04.02 16:10:27 INFO  app[][o.e.p.PluginsService] no modules loaded
2022.04.02 16:10:27 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2022.04.02 16:11:03 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
2022.04.02 16:11:03 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [C:\sonarqube\v7.9.6]: C:\SDK\Java\jdk11.0.13.8\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8\sonarqube\v7.9.6\temp --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/ --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED -server -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/common/*;C:\sonarqube\v7.9.6\lib\jdbc\mssql\mssql-jdbc-7.2.2.jre11.jar C:\sonarqube\v7.9.6\temp\sq-process12458333604459337062properties
2022.04.02 16:11:05 INFO  app[][o.s.a.SchedulerImpl] Process[web] is stopped
2022.04.02 16:11:05 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
2022.04.02 16:11:05 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
<-- Wrapper Stopped

es.log says:

2022.04.02 16:10:27 INFO  es[][o.e.e.NodeEnvironment] using [1] data paths, mounts [[(C:)]], net usable_space [57gb], net total_space [126.9gb], types [NTFS]
2022.04.02 16:10:27 INFO  es[][o.e.e.NodeEnvironment] heap size [495.3mb], compressed ordinary object pointers [true]
2022.04.02 16:10:27 INFO  es[][o.e.n.Node] node name [sonarqube], node ID [2GSZZTI8TqqRtssdJ_qcfw]
2022.04.02 16:10:27 INFO  es[][o.e.n.Node] version[6.8.0], pid[2984], build[unknown/unknown/65b6179/2019-05-15T20:06:13.172855Z], OS[Windows Server 2016/10.0/amd64], JVM[ojdkbuild/OpenJDK 64-Bit Server VM/11.0.13/11.0.13+8-LTS]
2022.04.02 16:10:27 INFO  es[][o.e.n.Node] JVM arguments [-XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -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, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true,\sonarqube\v7.9.6\temp, -XX:ErrorFile=../logs/es_hs_err_pid%p.log, -Des.enforce.bootstrap.checks=true, -Xms512m, -Xmx512m, -XX:+HeapDumpOnOutOfMemoryError, -Delasticsearch, -Des.path.home=C:\sonarqube\v7.9.6\elasticsearch, -Des.path.conf=C:\sonarqube\v7.9.6\temp\conf\es]
2022.04.02 16:10:28 INFO  es[][o.e.p.PluginsService] loaded module [analysis-common]
2022.04.02 16:10:28 INFO  es[][o.e.p.PluginsService] loaded module [lang-painless]
2022.04.02 16:10:28 INFO  es[][o.e.p.PluginsService] loaded module [mapper-extras]
2022.04.02 16:10:28 INFO  es[][o.e.p.PluginsService] loaded module [parent-join]
2022.04.02 16:10:28 INFO  es[][o.e.p.PluginsService] loaded module [percolator]
2022.04.02 16:10:28 INFO  es[][o.e.p.PluginsService] loaded module [reindex]
2022.04.02 16:10:28 INFO  es[][o.e.p.PluginsService] loaded module [repository-url]
2022.04.02 16:10:28 INFO  es[][o.e.p.PluginsService] loaded module [transport-netty4]
2022.04.02 16:10:28 INFO  es[][o.e.p.PluginsService] no plugins loaded
2022.04.02 16:10:30 WARN  es[][o.e.d.c.s.Settings] [http.enabled] setting was deprecated in Elasticsearch and will be removed in a future release! See the breaking changes documentation for the next major version.
2022.04.02 16:10:32 INFO  es[][o.e.d.DiscoveryModule] using discovery type [zen] and host providers [settings]
2022.04.02 16:10:32 INFO  es[][o.e.n.Node] initialized
2022.04.02 16:10:32 INFO  es[][o.e.n.Node] starting ...
2022.04.02 16:10:33 INFO  es[][o.e.t.TransportService] publish_address {}, bound_addresses {}
2022.04.02 16:10:33 INFO  es[][o.e.b.BootstrapChecks] explicitly enforcing bootstrap checks
2022.04.02 16:10:37 INFO  es[][o.e.c.s.MasterService] zen-disco-elected-as-master ([0] nodes joined), reason: new_master {sonarqube}{2GSZZTI8TqqRtssdJ_qcfw}{lq_vcVWuSeG9lRPy1Yt4bQ}{}{}{rack_id=sonarqube}
2022.04.02 16:10:37 INFO  es[][o.e.c.s.ClusterApplierService] new_master {sonarqube}{2GSZZTI8TqqRtssdJ_qcfw}{lq_vcVWuSeG9lRPy1Yt4bQ}{}{}{rack_id=sonarqube}, reason: apply cluster state (from master [master {sonarqube}{2GSZZTI8TqqRtssdJ_qcfw}{lq_vcVWuSeG9lRPy1Yt4bQ}{}{}{rack_id=sonarqube} committed version [1] source [zen-disco-elected-as-master ([0] nodes joined)]])
2022.04.02 16:10:37 INFO  es[][o.e.n.Node] started
2022.04.02 16:10:37 INFO  es[][o.e.g.GatewayService] recovered [0] indices into cluster_state

Seems elasticsearch is unable to complete port binding. Sometimes, the webserver initialization starts, but it fails for a similar exception. I cannot find any specific posts on resolving this issue. An upgrade from v6.9 to v7.3 was completed a long time ago on the same machine without issues. My suspicions are:

  1. Firewall - However, there are no special rules defined for the existing v7.3 (and older) instances. Those work fine, and only localhost binding is used as a reverse proxy is configured to route external connections.
  2. JDK 11 (?) - Could all connection attempts via JDK 11 be blocked for some reason? What can be done?

I can safely revert to v7.3 again on the same system; verified this several times by attempting to initialize v7.9.6 and then back to v7.3. There are no parameter differences in the properties of both instances (excluding comments and any additional parameters introduced in v7.9.6).

I do not know how to resolve this issue. Please help.


Did some additional investigations. The problem does seem to stem from the JDK11 package. I tried from several sources (OpenJDK Adopt, Microsoft) of v11.0.13 OR v11.0.14. None of them work.

However, v11.0.4 of the JDK works with the installation perfectly. This confirms that the JDK is causing the issue, although why is still unknown. Unfortunately, v11.0.4 is rather old and I would prefer to get it working with the newest GA releases of the JDK.

Anyone else encountering this situation?

1 Like


You’ve narrowed this down to the JDK and you’re only hitting 7.9.6 on the way to 8.9.8 (just released a new version today!). So I’d just use what you know works to get 7.9.6 up & running, and then move on to 8.9.8. From there you should be able to use the newest GA releases of the JDK.


That’s the problem! What I know ‘works’ doesn’t actually work in different environments. I forgot to mention that the test on JDK 11.0.4 only worked in a mirrored dev server, but the same does not work on a production server.

All i have confirmed is the problem is rooted around the JDK, but not exactly why and how to work around it given that I cannot get any valid JDK 11 installation working on this setup.

Just to be clear again:

  • Dev server, JDK 11.0.4 works. Newer versions do not.
  • Prod server, JDK 11.0.4 and newer ALL do not work.

Although I am doing only a transitionary upgrade, SQ8 also requires JDK11, so it is imperative for me to get this working anyway :frowning:


Okay, going back to the 7.9 docs, it looks like Java 11 isn’t supported at all for SonarQube 7.9. So you’ll need to point your 7.9 at Java 8 to get it up and running. Then you should be fine with Java 11 when you get to SQ 8.9.


You referenced the wrong version (7.6) of the upgrade document. Version 7.9 explicitly states the requirement for JDK11, and I have got this working in the DEV environment. I just can’t get it to work, for some reason, in the PROD environment. It keeps throwing a SocketException, indicating failure to bind to the sockets.

Again, I can reproduce the behavior in DEV using newer versions of JDK11, but the vresion that works in DEV still fails in PROD.