Unable to launch SonarQube server

Hi,

I am using SonarQube Community edition version 8.4.1.35646.
I have also installed jdk 11 and added java 11 path to wrapper.conf file:
wrapper.java.command=C:\Program Files\Java\jdk-11\bin\java

I am unable to launch SonarQube server.
It gives me following error:

D:\sonarqube-8.4.1.35646\sonarqube-8.4.1.35646\bin\windows-x86-64>StartSonar.bat
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM…
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 |
jvm 1 | 2020.07.24 15:32:47 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory D:\sonarqube-8.4.1.35646\sonarqube-8.4.1.35646\temp
jvm 1 | 2020.07.24 15:32:47 INFO app[o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
jvm 1 | 2020.07.24 15:32:47 INFO app[o.s.a.ProcessLauncherImpl] Launch process[[key=‘es’, ipcIndex=1, logFilenamePrefix=es]] from [D:\sonarqube-8.4.1.35646\sonarqube-8.4.1.35646\elasticsearch]: C:\Program Files\Java\jdk-11\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 -Djava.io.tmpdir=D:\sonarqube-8.4.1.35646\sonarqube-8.4.1.35646\temp -XX:ErrorFile=…/logs/es_hs_err_pid%p.log -Xmx512m -Xms512m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=D:\sonarqube-8.4.1.35646\sonarqube-8.4.1.35646\elasticsearch -Des.path.conf=D:\sonarqube-8.4.1.35646\sonarqube-8.4.1.35646\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch
jvm 1 | 2020.07.24 15:32:48 INFO app[o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
jvm 1 | Java HotSpot™ 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
jvm 1 | 2020.07.24 15:32:48 INFO app[o.e.p.PluginsService] no modules loaded
jvm 1 | 2020.07.24 15:32:48 INFO app[o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
jvm 1 | 2020.07.24 15:32:59 INFO app[o.s.a.SchedulerImpl] Process[es] is up
jvm 1 | 2020.07.24 15:32:59 INFO app[o.s.a.ProcessLauncherImpl] Launch process[[key=‘web’, ipcIndex=2, logFilenamePrefix=web]] from [D:\sonarqube-8.4.1.35646\sonarqube-8.4.1.35646]: C:\Program Files\Java\jdk-11\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=D:\sonarqube-8.4.1.35646\sonarqube-8.4.1.35646\temp -XX:-OmitStackTraceInFastThrow --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/;D:\sonarqube-8.4.1.35646\sonarqube-8.4.1.35646\lib\jdbc\h2\h2-1.4.199.jar org.sonar.server.app.WebServer D:\sonarqube-8.4.1.35646\sonarqube-8.4.1.35646\temp\sq-process17835202390127263831properties
jvm 1 | 2020.07.24 15:33:01 INFO app[o.s.a.SchedulerImpl] Process[web] is stopped
jvm 1 | 2020.07.24 15:33:01 INFO app[o.s.a.SchedulerImpl] Process[es] is stopped
jvm 1 | 2020.07.24 15:33:01 INFO app[o.s.a.SchedulerImpl] SonarQube is stopped
wrapper | <-- Wrapper Stopped

Can someone please help me resolve this issue?

Hi Pratiti,

This seems to be your first message in the SonarSource Community! Welcome!

Looks like your SonarQube’s web server is not able to start. Can you please share the full logs in your $SONARQUBE_HOME/logs folder: web.log, es.log and ce.log?

Regards,
Daniel

Hi Daniel,

Thanks for quick response!

I have not defined any system environment $SONARQUBE_HOME variable for now.
My SonarQube is placed at following path:
D:\sonarqube-8.4.1.35646\sonarqube-8.4.1.35646

PFA logs as requested:
es.log (3.5 KB)
sonar.log (3.0 KB) web.log (2.3 KB)

Any suggestion would be of great help!

Hi Pratiti,

Checking your web.log file, we can see the following error:

2020.07.24 19:56:45 ERROR web[o.s.s.a.EmbeddedTomcat] Fail to start web server
org.apache.catalina.LifecycleException: Failed to initialize connector [Connector[HTTP/1.1-9000]]
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:559)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)

It seems like another process is running on port 9000. You can either check which and stop it before you launch SonarQube, or change the port that SonarQube’s web process will use with the sonar.web.port property in your configuration file under D:\sonarqube-8.4.1.35646\sonarqube-8.4.1.35646\conf\sonar.properties file. Then launch SonarQube again and use that new port to connect on the browser.

As a side note, when we say $SONARQUBE_HOME, this is just a way to refer to the root folder of your SonarQube installation.

Great Thanks Daniel!

This seems to be working. I checked and found that port 9000 is being used by some admin process.
I changed the port to 9002 in sonar.properties file.
sonar.web.port=9002

Just one small question. Is it okay to use port 9002 or should I use any other port?

Great Thanks Daniel!

This seems to be working now.
I checked and found that port 9000 is being used by some admin process.
I have changed the port to 9002 in sonar.properties file.

sonar.web.port=9002

Just one small question. Is it fine to use port# 9002 or should I use any other port?

Hi Pratiti,

You are welcome! The port you choose is completely up to you.

Best regards,
Daniel