SonarQube 6.1 stopping itself. Not starting - sonarqube

I have installed Sonar qube 6.1. I have started sonar by executing sonar.sh start and checked status with sonar.sh status. After few seconds, sonar stopping itself by writing below statements in the wrapper.log file. Please help me on this issue to get resolve.
2017.05.04 07:01:13 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube-6.1/temp
2017.05.04 07:01:13 INFO app[][o.s.p.m.JavaProcessLauncher] Launch process[es]: /usr/java/jdk1.8.0_111/jre/bin/java -Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djna.nosys=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=/opt/sonarqube-6.1/temp -javaagent:/usr/java/jdk1.8.0_111/jre/lib/management-agent.jar -cp ./lib/common/*:./lib/search/* org.sonar.search.SearchServer /opt/sonarqube-6.1/temp/sq-process4451619261882420874properties
2017.05.04 07:01:23 INFO app[][o.s.p.m.Monitor] Process[es] is up
2017.05.04 07:01:23 INFO app[][o.s.p.m.JavaProcessLauncher] Launch process[web]: /usr/java/jdk1.8.0_111/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false -Djruby.compile.invokedynamic=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=/opt/sonarqube-6.1/temp -javaagent:/usr/java/jdk1.8.0_111/jre/lib/management-agent.jar -cp ./lib/common/*:./lib/server/*:/opt/sonarqube-6.1/lib/jdbc/h2/h2-1.3.176.jar org.sonar.server.app.WebServer /opt/sonarqube-6.1/temp/sq-process3625744255132410453properties
2017.05.04 07:01:25 INFO app[][o.s.p.m.Monitor] Process[es] is stopping
2017.05.04 07:01:26 INFO app[][o.s.p.m.Monitor] Process[es] is stopped

es is ElasticSearch, a component that indexes your data to accelerate searching. Maybe your indexes are corrupted. You can rebuild them by removing contents of ${SONARQUBE_HOME}/data/es/ directory, and retry.

Related

Sonarqube not workig

I tried starting the Sonarqube but I got the following error
2022.05.22 14:03:02 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\Users\Loc\Downloads\sonarqube-9.4.0.54424\temp
2022.05.22 14:03:02 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:65080]
2022.05.22 14:03:02 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [C:\Users\Loc\Downloads\sonarqube-9.4.0.54424\elasticsearch]: C:\Program Files\Java\jdk-17.0.1\bin\java -XX:+UseG1GC -Djava.io.tmpdir=C:\Users\Lochana\Downloads\sonarqube-9.4.0.54424\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 -Djna.tmpdir=C:\Users\Lochana\Downloads\sonarqube-9.4.0.54424\temp -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 -Dlog4j2.formatMsgNoLookups=true -Djava.locale.providers=COMPAT -Dcom.redhat.fips=false -Xmx512m -Xms512m -XX:MaxDirectMemorySize=256m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=C:\Users\Lochana\Downloads\sonarqube-9.4.0.54424\elasticsearch -Des.path.conf=C:\Users\Lochana\Downloads\sonarqube-9.4.0.54424\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch
2022.05.22 14:03:02 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2022.05.22 14:03:03 INFO app[][o.s.a.SchedulerImpl] Process[es] is up
2022.05.22 14:03:03 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[WEB_SERVER] from [C:\Users\Loc\Downloads\sonarqube-9.4.0.54424]: C:\Program Files\Java\jdk-17.0.1\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=C:\Users\Lochana\Downloads\sonarqube-9.4.0.54424\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.4.0.54424.jar;C:\Users\Lochana\Downloads\sonarqube-9.4.0.54424\lib\jdbc\h2\h2-2.1.210.jar org.sonar.server.app.WebServer C:\Users\Lochana\Downloads\sonarqube-9.4.0.54424\temp\sq-process7212444604706398600properties
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/Loc/Downloads/sonarqube-9.4.0.54424/lib/sonar-application-9.4.0.54424.jar)
WARNING: Please consider reporting this to the maintainers of org.sonar.process.PluginSecurityManager
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\Lochana\Downloads\sonarqube-9.4.0.54424\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.<init>(NodeEnvironment.java:328)
at org.elasticsearch.node.Node.<init>(Node.java:429)
at org.elasticsearch.node.Node.<init>(Node.java:309)
at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:234)
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:234)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:434)
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:166)
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:157)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112)
at org.elasticsearch.cli.Command.main(Command.java:77)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:122)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:80)
For complete error details, refer to the log at C:\Users\Loc\Downloads\sonarqube-9.4.0.54424\logs\sonarqube.log
2022.05.22 14:03:05 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 1
2022.05.22 14:03:05 INFO app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2022.05.22 14:03:10 INFO app[][o.s.a.SchedulerImpl] Process[Web Server] is stopped
2022.05.22 14:03:10 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
<-- Wrapper Stopped
I added the java path before starting the Sonarqube. I think all is done. But I got that error
How to solve this error
Anyone can help me
Thank you

Sonarqube 5.2 starts, but not accessible

Sonarqube 5.2 starts without errors, but is not accessible. It was working fine until a couple of days ago.
1. Sonar is configured to run on Port 9000, but the port is free.
2. Firefox cannot access the url.
This is the sonar.log entry:
*--> Wrapper Started as Daemon
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
2018.04.11 22:44:47 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[search]: /usr/java/jre1.8.0_161/bin/java -Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djava.net.preferIPv4Stack=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=/scratch/aime/Sonar/sonarqube-5.2/temp -cp ./lib/common/*:*./lib/search/* *org.sonar.search.SearchServer /tmp/sq-process3042361883049663302properties
2018.04.11 22:44:47 INFO es[o.s.p.ProcessEntryPoint] Starting search
2018.04.11 22:44:47 INFO es[o.s.s.SearchSettings] Elasticsearch listening on 127.0.0.1:9001
2018.04.11 22:44:48 INFO es[o.elasticsearch.node] [sonar-1523511887257] version[1.7.2], pid[1648], build[e43676b/2015-09-14T09:49:53Z]
2018.04.11 22:44:48 INFO es[o.elasticsearch.node] [sonar-1523511887257] initializing ...
2018.04.11 22:44:48 INFO es[o.e.plugins] [sonar-1523511887257] loaded [], sites []*
There has been no change in the sonar.properties and sonar was fine until a few days ago.
What is going wrong?

In sonarqube Web page is not displaying

I am working in SonarQube the process is fully running in command prompt but the web page is not displaying. I changed the address and port in the sonar properties but still the web page is not displaying.
If I load webpage it is showing as connection refused.
D:\>cd D:\Development_Avecto\Sonar\sonarqube-6.7\bin\windows-x86-64
D:\Development_Avecto\Sonar\sonarqube-6.7\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 | 2018.01.05 17:49:09 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory D:\Development_Avecto\Sonar\sonarqube-6.7\temp
jvm 1 | 2018.01.05 17:49:09 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
jvm 1 | 2018.01.05 17:49:11 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [D:\Development_Avecto\Sonar\sonarqube-6.7\elasticsearch]: C:\Program Files\Java\jre1.8.0_121\bin\java -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -server -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -Djdk.io.permissionsUseCanonicalPath=true -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Dlog4j.skipJansi=true -Xms512m -Xmx512m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=D:\Development_Avecto\Sonar\sonarqube-6.7\elasticsearch -cp lib/* org.elasticsearch.bootstrap.Elasticsearch -Epath.conf=D:\Development_Avecto\Sonar\sonarqube-6.7\temp\conf\es
jvm 1 | 2018.01.05 17:49:11 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
jvm 1 | 2018.01.05 17:49:13 INFO app[][o.e.p.PluginsService] no modules loaded
jvm 1 | 2018.01.05 17:49:13 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
jvm 1 | 2018.01.05 17:49:23 INFO app[][o.s.a.SchedulerImpl] Process[es] is up
jvm 1 | 2018.01.05 17:49:23 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [D:\Development_Avecto\Sonar\sonarqube-6.7]: C:\Program Files\Java\jre1.8.0_121\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=D:\Development_Avecto\Sonar\sonarqube-6.7\temp -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -cp ./lib/common/*;./lib/server/*;D:\Development_Avecto\Sonar\sonarqube-6.7\lib\jdbc\h2\h2-1.3.176.jar org.sonar.server.app.WebServer D:\Development_Avecto\Sonar\sonarqube-6.7\temp\sq-process1476121489817180909properties
jvm 1 | 2018.01.05 17:51:08 INFO app[][o.s.a.SchedulerImpl] Process[web] is up
jvm 1 | 2018.01.05 17:51:08 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='ce', ipcIndex=3, logFilenamePrefix=ce]] from [D:\Development_Avecto\Sonar\sonarqube-6.7]: C:\Program Files\Java\jre1.8.0_121\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=D:\Development_Avecto\Sonar\sonarqube-6.7\temp -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -cp ./lib/common/*;./lib/server/*;./lib/ce/*;D:\Development_Avecto\Sonar\sonarqube-6.7\lib\jdbc\h2\h2-1.3.176.jar org.sonar.ce.app.CeServer D:\Development_Avecto\Sonar\sonarqube-6.7\temp\sq-process446994653925487374properties
jvm 1 | 2018.01.05 17:51:13 INFO app[][o.s.a.SchedulerImpl] Process[ce] is up
jvm 1 | 2018.01.05 17:51:13 INFO app[][o.s.a.SchedulerImpl] SonarQube is up
After long search, below solution worked for me.
I have tried disabling proxy and hit the sonar server URL (http://127.0.0.50:9111/). It worked. Since I need proxy setup, i have added my ip and port in the exceptions of proxy.
Thanks everyone who extended help here. :)
Config file entry is
sonar.web.host=127.0.0.50
sonar.web.port=9111

Cannot restart sonar sever after installing sonar-js plugin

cloned sonarjs plugin from github | sonarjs plugin
created jar file via, mvn install command
copied jar file into sonarqube-5.6.6/extensions/plugins/
Now, when trying to start sonar server, it stops with following message:
Running SonarQube...
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 | 2017.11.29 22:17:20 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory /home/sd2labs/ mycomputer/sonarqube-5.6.6/temp
jvm 1 | 2017.11.29 22:17:20 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[es]: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djava.net.preferIPv4Stack=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=/home/sd2labs/mycomputer/sonarqube-5.6.6/temp -javaagent:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/management-agent.jar -cp ./lib/common/:./lib/search/ org.sonar.search.SearchServer /home/sd2labs/mycomputer/sonarqube-5.6.6/temp/ sq-process8688307264383931251properties
jvm 1 | 2017.11.29 22:17:28 INFO app[o.s.p.m.Monitor] Process[es] is up
jvm 1 | 2017.11.29 22:17:28 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[web]: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false -Djruby.compile.invokedynamic=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true -Djava.io.tmpdir=/home/sd2labs/mycomputer/sonarqube-5.6.6/temp -javaagent:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/management-agent.jar -cp ./lib/common/:./lib/server/:/home/sd2labs/mycomputer/sonarqube-5.6.6/lib/jdbc/mysql/mysql-connector-java-5.1.35.jar org.sonar.server.app.WebServer /home/sd2labs/mycomputer/sonarqube-5.6.6/temp/ sq-process1772881744825311451properties
jvm 1 | 2017.11.29 22:17:33 INFO app[o.s.p.m.Monitor] Process[es] is stopping
jvm 1 | 2017.11.29 22:17:34 INFO app[o.s.p.m.Monitor] Process[es] is stopped
wrapper | <-- Wrapper Stopped
What am I doing wrong?
Most probably you have 2 plugin version for SonarJS in your /extensions/plugins/. Remove the one, you don't need (the one provided by default)

SonarQube version 6.2 will not start on amazon Linux

After rebooting our Sonar Server running an up-to-date Amazon Linux it would not start.
2017.01.27 10:36:42 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonar/temp
2017.01.27 10:36:42 INFO app[][o.s.p.m.JavaProcessLauncher] Launch process[es]: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.121 0.b13.29.amzn1.x86_64/jre/bin/java -Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djna.nosys=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=/opt/sonar/temp -javaagent:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.121-0.b13.29.amzn1.x86_64/jre/lib/management-agent.jar -cp ./lib/common/*:./lib/search/* org.sonar.search.SearchServer /opt/sonar/temp/sq-process7514074371677370036properties
2017.01.27 10:36:51 INFO app[][o.s.p.m.Monitor] Process[es] is up
2017.01.27 10:36:51 INFO app[][o.s.p.m.JavaProcessLauncher] Launch process[web]: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.121-0.b13.29.amzn1.x86_64/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false -Djruby.compile.invokedynamic=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=/opt/sonar/temp -javaagent:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.121-0.b13.29.amzn1.x86_64/jre/lib/management-agent.jar -cp ./lib/common/*:./lib/server/*:/opt/sonar/lib/jdbc/postgresql/postgresql-9.4.1209.jre7.jar org.sonar.server.app.WebServer /opt/sonar/temp/sq-process6553321235832962376properties
2017.01.27 10:36:54 INFO app[][o.s.p.m.Monitor] Process[es] is stopping
2017.01.27 10:36:54 ERROR app[][o.s.p.m.Monitor] Process[web] failed to start
2017.01.27 10:36:54 INFO app[][o.s.p.m.Monitor] Process[es] is stopped
<-- Wrapper Stopped
The above indicates you need to read /var/log/sonar/web.log
The postgres jar above /opt/sonar/lib/jdbc/postgresql/postgresql-9.4.1209.jre7.jar is a bad smell, so on a hunch I downloaded the latest version,
which fixed the problem.
I imagine this will be fixed by the Sonar team pretty soon but this posted here in the hope that it helps.

Resources