SonarQube woun't start

I too am making this same upgrade but my install is either hanging or force closing like the below. Any tips or ideas to resolve this issue?

wrapper  | --> Wrapper Started as Console
wrapper  | Launching a JVM...
jvm 1    | Wrapper (Version 3.2.3)
jvm 1    |   Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.
jvm 1    |
jvm 1    | 2021.11.10 08:09:24 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\sonarqube-\temp
jvm 1    | 2021.11.10 08:09:24 INFO  app[][] Elasticsearch listening on [HTTP:, TCP:]
jvm 1    | 2021.11.10 08:09:24 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [C:\sonarqube-\elasticsearch]: C:\Program Files\RedHat\java-11-openjdk-11.0.4-1\bin\java -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly\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 -Des.enforce.bootstrap.checks=true -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.11.10 08:09:24 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
jvm 1    | OpenJDK 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.11.10 08:09:25 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
jvm 1    | 2021.11.10 08:09:25 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [C:\sonarqube-]: C:\Program Files\RedHat\java-11-openjdk-11.0.4-1\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8\sonarqube-\temp -XX:-OmitStackTraceInFastThrow --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 -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application-;C:\sonarqube-\lib\jdbc\mssql\mssql-jdbc-9.2.0.jre11.jar C:\sonarqube-\temp\sq-process14760074690220757328propertiesjvm 1    | uncaught exception in thread [main]
jvm 1    | java.lang.IllegalStateException: failed to obtain node locks, tried [[C:\sonarqube-\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])?
jvm 1    |      at org.elasticsearch.env.NodeEnvironment.<init>(
jvm 1    |      at org.elasticsearch.node.Node.<init>(
jvm 1    |      at org.elasticsearch.node.Node.<init>(
jvm 1    |      at org.elasticsearch.bootstrap.Bootstrap$5.<init>(
jvm 1    |      at org.elasticsearch.bootstrap.Bootstrap.setup(
jvm 1    |      at org.elasticsearch.bootstrap.Bootstrap.init(
jvm 1    |      at org.elasticsearch.bootstrap.Elasticsearch.init(
jvm 1    |      at org.elasticsearch.bootstrap.Elasticsearch.execute(
jvm 1    |      at org.elasticsearch.cli.EnvironmentAwareCommand.execute(
jvm 1    |      at org.elasticsearch.cli.Command.mainWithoutErrorHandling(
jvm 1    |      at org.elasticsearch.cli.Command.main(
jvm 1    |      at org.elasticsearch.bootstrap.Elasticsearch.main(
jvm 1    |      at org.elasticsearch.bootstrap.Elasticsearch.main(
jvm 1    | For complete error details, refer to the log at C:\sonarqube-\logs\sonarqube.log
jvm 1    | 2021.11.10 08:09:30 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1
jvm 1    | 2021.11.10 08:09:30 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped

Hi @murquiza and welcome to the community :wave: ,

i moved your post to a new thread as it does not really seem related to the other topic.

judging from the log you posted there seems to be another SQ instance holding a lock on your ES data directory. please make sure that there is only one SQ instance running at a time. If the lock is still not released you are okay to remove the es7 folder as all data persists in the database and the indexes will be recreated during startup.
after that your SQ instance should start. If this is not the case please post all log files in your logs directory

my apologies Tobias, I didnā€™t see this notification. I actually ended up spinning up a new Sonarqube server all together and pointed the new server to the DB hosted on a second server.

1 Like

All good :joy: This would be the extreme method of cleaning your elasticsearch directory.
i will mark this as solved then. feel free to create another thread if you are facing any other issues :slight_smile:

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