Installation Problem - Stopping Before Hitting Database

Hi. I’m attempting to install SonarQube Developer Edition (from the .zip file) on an Amazon AWS using SQL Server Express 2022 and IIS. The full installation is on D: as well as the data logs since there is only There are probably several The problem is that when I run sonarservice start I get this error with no error log:

2025-09-09 16:00:06,549 INFO - Starting service ‘SonarQube (SonarQube)’…
2025-09-09 16:00:06,549 FATAL - Cannot start service SonarQube on computer ‘.’.

And when I run StartSonar it appears to run but I get the following error log:

Starting SonarQube…
2025.09.09 10:20:04 INFO  app[o.s.a.AppFileSystem] Cleaning or creating temp directory d:\SonarData\temp
2025.09.09 10:20:04 DEBUG app[o.s.a.NodeLifecycle] main tryToMoveTo from INIT to STARTING => true
2025.09.09 10:20:04 DEBUG app[o.s.a.p.ManagedProcessLifecycle] main tryToMoveTo ElasticSearch from INIT to STARTING => true
2025.09.09 10:20:04 INFO  app[o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:{}]
2025.09.09 10:20:05 INFO  app[o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [D:\sonarqube-2025.4.2.112048\elasticsearch]: C:\Program Files\Java\jdk-24\bin\java -Xms4m -Xmx64m -XX:+UseSerialGC -Dcli.name=server -Dcli.script=./bin/elasticsearch -Dcli.libs=lib/tools/server-cli -Des.path.home=D:\sonarqube-2025.4.2.112048\elasticsearch -Des.path.conf=d:\SonarData\temp\conf\es -Des.distribution.type=tar -cp D:\sonarqube-2025.4.2.112048\elasticsearch\lib*;D:\sonarqube-2025.4.2.112048\elasticsearch\lib\cli-launcher* org.elasticsearch.launcher.CliToolLauncher
2025.09.09 10:20:05 DEBUG app[j.l.ProcessBuilder] ProcessBuilder.start(): pid: 1320, dir: D:\sonarqube-2025.4.2.112048\elasticsearch, cmd: “C:\Program Files\Java\jdk-24\bin\java”java.lang.RuntimeException: ProcessBuilder.start() debugat java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1097)at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1044)at org.sonar.application.ProcessLauncherImpl$JavaLangProcessBuilder.start(ProcessLauncherImpl.java:371)at org.sonar.application.ProcessLauncherImpl.launchJava(ProcessLauncherImpl.java:227)at org.sonar.application.ProcessLauncherImpl.launch(ProcessLauncherImpl.java:96)at org.sonar.application.SchedulerImpl.lambda$tryToStartProcess$2(SchedulerImpl.java:209)at org.sonar.application.process.ManagedProcessHandler.start(ManagedProcessHandler.java:76)at org.sonar.application.SchedulerImpl.tryToStartProcess(SchedulerImpl.java:207)at org.sonar.application.SchedulerImpl.tryToStartEs(SchedulerImpl.java:142)at org.sonar.application.SchedulerImpl.tryToStartAll(SchedulerImpl.java:134)at org.sonar.application.SchedulerImpl.schedule(SchedulerImpl.java:113)at org.sonar.application.App.start(App.java:59)at org.sonar.application.App.main(App.java:81)
2025.09.09 10:20:05 DEBUG app[o.s.a.p.ManagedProcessLifecycle] main tryToMoveTo ElasticSearch from STARTING to STARTED => true
2025.09.09 10:20:05 INFO  app[o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2025.09.09 10:20:05 DEBUG app[o.s.a.e.EsConnectorImpl] Connected to Elasticsearch node: [127.0.0.1:9001]Standard Commons Logging discovery in action with spring-jcl: please remove commons-logging.jar from classpath in order to avoid potential conflicts
2025.09.09 10:20:06 DEBUG app[o.a.h.i.n.c.MainClientExec] [exchange: 1] start execution
2025.09.09 10:20:06 DEBUG app[o.a.h.c.p.RequestAddCookies] CookieSpec selected: default
2025.09.09 10:20:06 DEBUG app[o.a.h.c.p.RequestAuthCache] Re-using cached ‘basic’ auth scheme for http://127.0.0.1:9001
2025.09.09 10:20:06 DEBUG app[o.a.h.c.p.RequestAuthCache] No credentials for preemptive authentication
2025.09.09 10:20:06 DEBUG app[o.a.h.i.n.c.InternalHttpAsyncClient] [exchange: 1] Request connection for {}->http://127.0.0.1:9001
2025.09.09 10:20:06 DEBUG app[o.a.h.i.n.c.PoolingNHttpClientConnectionManager] Connection request: [route: {}->http://127.0.0.1:9001][total kept alive: 0; route allocated: 0 of 10; total allocated: 0 of 30]
2025.09.09 10:20:06 DEBUG app[o.a.h.i.n.c.PoolingNHttpClientConnectionManager] Connection request failedjava.net.ConnectException: Connection refused: getsockoptat java.base/sun.nio.ch.Net.pollConnect(Native Method)at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:628)at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:1046)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)at java.base/java.lang.Thread.run(Thread.java:1447)
2025.09.09 10:20:06 DEBUG app[o.a.h.i.n.c.InternalHttpAsyncClient] [exchange: 1] connection request failed
2025.09.09 10:20:06 DEBUG app[o.e.c.RestClient] request [GET http://127.0.0.1:9001/\] failedjava.net.ConnectException: Connection refused: getsockoptat java.base/sun.nio.ch.Net.pollConnect(Native Method)at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:628)at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:1046)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)at java.base/java.lang.Thread.run(Thread.java:1447)
2025.09.09 10:20:06 DEBUG app[o.e.c.RestClient] added [[host=http://127.0.0.1:9001]] to blacklist
2025.09.09 10:20:07 DEBUG app[o.a.h.i.n.c.MainClientExec] [exchange: 2] start execution
2025.09.09 10:20:07 DEBUG app[o.a.h.c.p.RequestAddCookies] CookieSpec selected: default
2025.09.09 10:20:07 DEBUG app[o.a.h.c.p.RequestAuthCache] Re-using cached ‘basic’ auth scheme for http://127.0.0.1:9001
2025.09.09 10:20:07 DEBUG app[o.a.h.c.p.RequestAuthCache] No credentials for preemptive authentication
2025.09.09 10:20:07 DEBUG app[o.a.h.i.n.c.InternalHttpAsyncClient] [exchange: 2] Request connection for {}->http://127.0.0.1:9001
2025.09.09 10:20:07 DEBUG app[o.a.h.i.n.c.PoolingNHttpClientConnectionManager] Connection request: [route: {}->http://127.0.0.1:9001][total kept alive: 0; route allocated: 0 of 10; total allocated: 0 of 30]
2025.09.09 10:20:07 DEBUG app[o.a.h.i.n.c.PoolingNHttpClientConnectionManager] Connection request failedjava.net.ConnectException: Connection refused: getsockoptat java.base/sun.nio.ch.Net.pollConnect(Native Method)at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:628)at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:1046)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)at java.base/java.lang.Thread.run(Thread.java:1447)
2025.09.09 10:20:07 DEBUG app[o.a.h.i.n.c.InternalHttpAsyncClient] [exchange: 2] connection request failed
2025.09.09 10:20:07 DEBUG app[o.e.c.RestClient] request [GET http://127.0.0.1:9001/\] failed
*** SNIPPED DUPLICATE ERRORS ***
ERROR: Elasticsearch died while starting up, with exit code 1
2025.09.09 10:20:11 WARN  app[o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 1
2025.09.09 10:20:11 DEBUG app[o.s.a.p.ManagedProcessLifecycle] StopWatcher[ElasticSearch] tryToMoveTo ElasticSearch from STARTED to HARD_STOPPING => true
2025.09.09 10:20:11 DEBUG app[o.s.a.p.ManagedProcessLifecycle] StopWatcher[ElasticSearch] tryToMoveTo ElasticSearch from HARD_STOPPING to FINALIZE_STOPPING => true
2025.09.09 10:20:11 INFO  app[o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2025.09.09 10:20:11 DEBUG app[o.s.a.p.ManagedProcessLifecycle] StopWatcher[ElasticSearch] tryToMoveTo ElasticSearch from FINALIZE_STOPPING to STOPPED => true
2025.09.09 10:20:11 DEBUG app[o.s.a.NodeLifecycle] HardStopper-0 tryToMoveTo from STARTING to HARD_STOPPING => true
2025.09.09 10:20:11 DEBUG app[o.s.a.p.ManagedProcessLifecycle] HardStopper-0 tryToMoveTo Compute Engine from INIT to HARD_STOPPING => false
2025.09.09 10:20:11 DEBUG app[o.s.a.p.ManagedProcessLifecycle] HardStopper-0 tryToMoveTo Web Server from INIT to HARD_STOPPING => false
2025.09.09 10:20:11 DEBUG app[o.s.a.p.ManagedProcessLifecycle] HardStopper-0 tryToMoveTo ElasticSearch from STOPPED to HARD_STOPPING => false
2025.09.09 10:20:11 DEBUG app[o.s.a.NodeLifecycle] HardStopper-0 tryToMoveTo from HARD_STOPPING to FINALIZE_STOPPING => true
2025.09.09 10:20:11 DEBUG app[o.s.a.NodeLifecycle] HardStopper-0 tryToMoveTo from FINALIZE_STOPPING to STOPPED => true
2025.09.09 10:20:11 INFO  app[o.s.a.SchedulerImpl] SonarQube is stopped
2025.09.09 10:20:11 DEBUG app[java.lang.Runtime] Runtime.exit() called with status: 0java.lang.Throwable: Runtime.exit(0)
	at java.base/java.lang.Shutdown.logRuntimeExit(Shutdown.java:179)
	at java.base/java.lang.Shutdown.exit(Shutdown.java:160)
	at java.base/java.lang.Runtime.exit(Runtime.java:177)
	at java.base/java.lang.System.exit(System.java:1518)
	at org.sonar.process.SystemExit.doExit(SystemExit.java:48)
	at org.sonar.process.SystemExit.exit(SystemExit.java:32)
	at org.sonar.application.App.start(App.java:77)
	at org.sonar.application.App.main(App.java:81)
2025.09.09 10:20:11 DEBUG app[o.s.a.NodeLifecycle] Shutdown Hook tryToMoveTo from STOPPED to STOPPING => false

It looks like it’s trying to access ElasticSearch but maybe it’s not installed? I believe it’s not an SQL Server issue at this point because SonarQube isn’t querying the SQL Server ports yet.

Any suggestions would be welcomed, please and thank you.

Hi,

ElasticSearch is part of the SonarQube installation. No need to install it separately. Can you share the full es.log?

 
Ann

I don’t see an es.log in the sonarqube/logs folder and a drive search did not turn one up either.

Hi,

Does SonarQube have full permissions to write to its directories? Because this is the first problem. If SonarQube can’t write to its logs, it won’t start.

 
Ann

Yes, I double-checked that the user running SonarQube has full read, write, and execute permissions for the SonarQube program and data directories.

Hi,

What does show up in the logs directory? Can you share the files?

 
Thx,
Ann

Besides the readme, these are the only two logs.

sonar.log (86.0 KB)

SonarServiceWrapper.wrapper.log (64 Bytes)

And this is the full text when I run the command startsonar > currentlog.txt

currentlog.txt (86.5 KB)

Hi,

Thanks for the logs.

Searching gets me this:

The “getsockopt connection refused” error, common in Minecraft, indicates a network issue where the client cannot reach the server, usually due to firewall blocking, incorrect IP/port, an offline server, or network misconfigurations.

Clearly, this is not Minecraft, but the cause is probably relevant.

 
HTH,
Ann

I found that same suggestion online and had the same thought. I received the same error when I ran startsonar with the firewall turned off. Any suggestions on ports to check? This seems odd because the web server, SQL Server, and SonarQube server are all on the same machine.

Could this be due to low disk space on C: even though SonarQube runs from D:?

Hi,

SonarQube starts 3 processes: the web process (responds to web requests), the compute engine process (background computations such as analysis reports), and the Elasticsearch process. By default, SonarQube talks to the ES process on port 9001, although this is configurable in conf/sonar.properties. So SonarQube needs the ability to open and communicate with at least that extra port.

 
HTH,
Ann