StartSonar.bat fails

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
  • what are you trying to achieve
  • what have you tried so far to achieve this
    .
    I’m using SonarQube Version: 8.6.1
    Trying to get the StartSonar.bat to run.
    Currently I am following the Try Out SonarQube | SonarQube Docs

I receive the following error in my cmd.

C:\Users\z0044kAy>C:\sonarqube\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 | 2021.02.10 13:38:24 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory C:\sonarqube\temp
jvm 1 | 2021.02.10 13:38:24 INFO app[o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:51886]
jvm 1 | 2021.02.10 13:38:24 INFO app[o.s.a.ProcessLauncherImpl] Launch process[[key=‘es’, ipcIndex=1, logFilenamePrefix=es]] from [C:\sonarqube\elasticsearch]: C:\Program Files\Java\jdk-11\bin\java -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Djava.io.tmpdir=C:\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 -Xmx512m -Xms512m -XX:MaxDirectMemorySize=256m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=C:\sonarqube\elasticsearch -Des.path.conf=C:\sonarqube\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch
jvm 1 | 2021.02.10 13:38:24 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 | 2021.02.10 13:38:37 INFO app[o.s.a.SchedulerImpl] Process[es] is up
jvm 1 | 2021.02.10 13:38:37 INFO app[o.s.a.ProcessLauncherImpl] Launch process[[key=‘web’, ipcIndex=2, logFilenamePrefix=web]] from [C:\sonarqube]: C:\Program Files\Java\jdk-11\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=C:\sonarqube\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/;C:\sonarqube\lib\jdbc\h2\h2-1.4.199.jar org.sonar.server.app.WebServer C:\sonarqube\temp\sq-process4563632367400267822properties
jvm 1 | 2021.02.10 13:38:39 INFO app[o.s.a.SchedulerImpl] Process[web] is stopped
jvm 1 | 2021.02.10 13:38:39 INFO app[o.s.a.SchedulerImpl] Process[es] is stopped
jvm 1 | 2021.02.10 13:38:39 INFO app[o.s.a.SchedulerImpl] SonarQube is stopped

Hello @27.Roger and welcome to the community :wave:

did you check the logs already and can you share them? i think there are more information in the web.log and/or es.log

Hi,
I have attached the logs

es.log (27.7 KB)
web.log (14.1 KB)

looks like the standard port of sonarqube is already allocated on your system. you can either clear up port 9000 or define another one using the property sonar.web.port in conf/sonar.properties.

hope that helps :slight_smile:

1 Like

Thanks, that seems to resolve the issue.

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