SonarQube is stopped <-- Wrapper Stopped

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    version- 9.2.1 community edition

  • what are you trying to achieve
    Install SonarQube on Windows 10

  • what have you tried so far to achieve this
    Fail to execute StartSonar.bat

sonar.20211210.log

β†’ Wrapper Started as Console
Launching a JVM…
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.

2021.12.10 12:01:41 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory C:\Users\lily.mou\Downloads\sonarqube-9.2.1.49989\temp
2021.12.10 12:01:41 INFO app[o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:21939]
2021.12.10 12:01:41 INFO app[o.s.a.ProcessLauncherImpl] Launch process[[key=β€˜es’, ipcIndex=1, logFilenamePrefix=es]] from [C:\Users\lily.mou\Downloads\sonarqube-9.2.1.49989\elasticsearch]: C:\Program Files\Java\jdk-17.0.1\bin\java -XX:+UseG1GC -Djava.io.tmpdir=C:\Users\lily.mou\Downloads\sonarqube-9.2.1.49989\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 -Dcom.redhat.fips=false -Xmx512m -Xms512m -XX:MaxDirectMemorySize=256m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=C:\Users\lily.mou\Downloads\sonarqube-9.2.1.49989\elasticsearch -Des.path.conf=C:\Users\lily.mou\Downloads\sonarqube-9.2.1.49989\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch
2021.12.10 12:01:41 INFO app[o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.elasticsearch.bootstrap.Elasticsearch (file:/C:/Users/lily.mou/Downloads/sonarqube-9.2.1.49989/elasticsearch/lib/elasticsearch-7.14.1.jar)
WARNING: Please consider reporting this to the maintainers of org.elasticsearch.bootstrap.Elasticsearch
WARNING: System::setSecurityManager will be removed in a future release
2021.12.10 12:01:41 INFO app[o.s.a.SchedulerImpl] Process[es] is up
2021.12.10 12:01:41 INFO app[o.s.a.ProcessLauncherImpl] Launch process[[key=β€˜web’, ipcIndex=2, logFilenamePrefix=web]] from [C:\Users\lily.mou\Downloads\sonarqube-9.2.1.49989]: C:\Program Files\Java\jdk-17.0.1\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=C:\Users\lily.mou\Downloads\sonarqube-9.2.1.49989\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 --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED -Dcom.redhat.fips=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application-9.2.1.49989.jar;C:\Users\lily.mou\Downloads\sonarqube-9.2.1.49989\lib\jdbc\h2\h2-1.4.199.jar org.sonar.server.app.WebServer C:\Users\lily.mou\Downloads\sonarqube-9.2.1.49989\temp\sq-process3432021657716499545properties
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.sonar.process.PluginSecurityManager (file:/C:/Users/lily.mou/Downloads/sonarqube-9.2.1.49989/lib/sonar-application-9.2.1.49989.jar)
WARNING: Please consider reporting this to the maintainers of org.sonar.process.PluginSecurityManager
WARNING: System::setSecurityManager will be removed in a future release
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.elasticsearch.bootstrap.Security (file:/C:/Users/lily.mou/Downloads/sonarqube-9.2.1.49989/elasticsearch/lib/elasticsearch-7.14.1.jar)
WARNING: Please consider reporting this to the maintainers of org.elasticsearch.bootstrap.Security
WARNING: System::setSecurityManager will be removed in a future release
uncaught exception in thread [main]
java.lang.IllegalStateException: failed to obtain node locks, tried [[C:\Users\lily.mou\Downloads\sonarqube-9.2.1.49989\data\es7]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])?
at org.elasticsearch.env.NodeEnvironment.(NodeEnvironment.java:292)
at org.elasticsearch.node.Node.(Node.java:376)
at org.elasticsearch.node.Node.(Node.java:281)
at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:219)
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:219)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:399)
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159)
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:75)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:116)
at org.elasticsearch.cli.Command.main(Command.java:79)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:81)
For complete error details, refer to the log at C:\Users\lily.mou\Downloads\sonarqube-9.2.1.49989\logs\sonarqube.log
2021.12.10 12:01:44 WARN app[o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1
2021.12.10 12:01:44 INFO app[o.s.a.SchedulerImpl] Process[es] is stopped
2021.12.10 12:01:46 INFO app[o.s.a.SchedulerImpl] Process[web] is stopped
2021.12.10 12:01:46 INFO app[o.s.a.SchedulerImpl] SonarQube is stopped
← Wrapper Stopped

es.log (31.4 KB)

Hi @starmomou and welcome to the community :wave:

seems like there is eigher another instance of sonarqube already running that is locking this data directory or the path specified is not writable by sonarqube.
can you check if there are other java processes running on your system and ensure that only one instance of sonarqube is running at a time?
if this is the case and you are still facing this issue, please delete the es7 directory and try again. there might be a lock from a previously crashed es instance that did not get removed there.

hope that helps :slight_smile:

1 Like

Indeed there was an old SonarQube version. Thanks!

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