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) http://wrapper.tanukisoftware.org
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-8.9.3.48735\temp
jvm 1    | 2021.11.10 08:09:24 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:50953]
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-8.9.3.48735\elasticsearch]: C:\Program Files\RedHat\java-11-openjdk-11.0.4-1\bin\java -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Djava.io.tmpdir=C:\sonarqube-8.9.3.48735\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-8.9.3.48735\elasticsearch -Des.path.conf=C:\sonarqube-8.9.3.48735\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-8.9.3.48735]: C:\Program Files\RedHat\java-11-openjdk-11.0.4-1\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=C:\sonarqube-8.9.3.48735\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/sonar-application-8.9.3.48735.jar;C:\sonarqube-8.9.3.48735\lib\jdbc\mssql\mssql-jdbc-9.2.0.jre11.jar org.sonar.server.app.WebServer C:\sonarqube-8.9.3.48735\temp\sq-process14760074690220757328propertiesjvm 1    | uncaught exception in thread [main]
jvm 1    | java.lang.IllegalStateException: failed to obtain node locks, tried [[C:\sonarqube-8.9.3.48735\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>(NodeEnvironment.java:292)
jvm 1    |      at org.elasticsearch.node.Node.<init>(Node.java:368)
jvm 1    |      at org.elasticsearch.node.Node.<init>(Node.java:278)
jvm 1    |      at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:217)
jvm 1    |      at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:217)
jvm 1    |      at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:397)
jvm 1    |      at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159)
jvm 1    |      at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150)
jvm 1    |      at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:75)
jvm 1    |      at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:116)
jvm 1    |      at org.elasticsearch.cli.Command.main(Command.java:79)
jvm 1    |      at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115)
jvm 1    |      at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:81)
jvm 1    | For complete error details, refer to the log at C:\sonarqube-8.9.3.48735\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.