ESonar server does not start up - sonarqube5.3

First time I am using SonarQube and after integration with eclipse, I start the sonarserver but I am getting the below error.
Error:
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
jvm 1 | WrapperManager class initialized by thread: main Using classloader:
sun.misc.Launcher$AppClassLoader#70dea4e
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 | Wrapper Manager: JVM #1
jvm 1 | Running a 64-bit JVM.
jvm 1 | Wrapper Manager: Registering shutdown hook
jvm 1 | Wrapper Manager: Using wrapper
jvm 1 | Load native library. One or more attempts may fail if platform speci
fic libraries do not exist.
jvm 1 | Loading native library failed: wrapper-windows-x86-64.dll Cause: jav
a.lang.UnsatisfiedLinkError: no wrapper-windows-x86-64 in java.library.path
jvm 1 | Loaded native library: wrapper.dll
jvm 1 | Calling native initialization method.
jvm 1 | Initializing WrapperManager native library.
jvm 1 | Java Executable: C:\ProgramData\Oracle\Java\javapath\java.exe
jvm 1 | Windows version: 6.1.7601
jvm 1 | Java Version : 1.8.0_60-b27 Java HotSpot(TM) 64-Bit Server VM
jvm 1 | Java VM Vendor : Oracle Corporation
jvm 1 |
jvm 1 | Startup runner thread started.
jvm 1 | Control event monitor thread started.
jvm 1 | WrapperManager.start(org.tanukisoftware.wrapper.WrapperSimpleApp#3f99
bd52, args[]) called by thread: main
jvm 1 | Communications runner thread started.
jvm 1 | Open socket to wrapper...Wrapper-Connection
jvm 1 | Opened Socket from 31000 to 32001
jvm 1 | Send a packet KEY : 8vB3fcnsLty4gNaO
jvm 1 | handleSocket(Socket[addr=/127.0.0.1,port=32001,localport=31000])
jvm 1 | Received a packet LOW_LOG_LEVEL : 1
jvm 1 | Wrapper Manager: LowLogLevel from Wrapper is 1
jvm 1 | Received a packet PING_TIMEOUT : 0
jvm 1 | PingTimeout from Wrapper is 0
jvm 1 | Received a packet PROPERTIES : (Property Values)
jvm 1 | Received a packet START : start
jvm 1 | calling WrapperListener.start()
jvm 1 | Waiting for WrapperListener.start runner thread to complete.
jvm 1 | WrapperListener.start runner thread started.
jvm 1 | WrapperSimpleApp: start(args) Will wait up to 2 seconds for the main
method to complete.
jvm 1 | WrapperSimpleApp: invoking main method
jvm 1 | 2016.03.02 11:06:16 INFO app[o.s.p.m.JavaProcessLauncher] Launch pro
cess[search]: C:\Program Files\Java\jre1.8.0_60\bin\java -Djava.awt.headless=tru
e -Xmx1G -Xms256m -Xss256k -Djava.net.preferIPv4Stack=true -XX:+UseParNewGC -XX:
+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingO
ccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=C:\Users\sri.laksh
mi.kovvuri\projectworkspace\SonarQube\sonarqube-5.3\temp -cp ./lib/common/*;./li
b/search/* org.sonar.search.SearchServer C:\Users\SRILAK~1.KOV\AppData\Local\Tem
p\sq-process1566850086740273426properties
jvm 1 | Send a packet START_PENDING : 5000
jvm 1 | Send a packet START_PENDING : 5000
jvm 1 | WrapperSimpleApp: start(args) end. Main Completed=false, exitCode=nu
ll
jvm 1 | WrapperListener.start runner thread stopped.
jvm 1 | returned from WrapperListener.start()
jvm 1 | Send a packet STARTED :
jvm 1 | Startup runner thread stopped.
jvm 1 | Received a packet PING : ping
jvm 1 | Send a packet PING : ok
jvm 1 | Wrapper Manager: ShutdownHook started
jvm 1 | WrapperManager.stop(0) called by thread: Wrapper-Shutdown-Hook
jvm 1 | Send a packet STOP : 0
jvm 1 | Received a packet STOP :
jvm 1 | Thread, Wrapper-Shutdown-Hook, handling the shutdown process.
jvm 1 | calling listener.stop()
jvm 1 | WrapperSimpleApp: stop(0)
jvm 1 | returned from listener.stop() -> 0
jvm 1 | shutdownJVM(0) Thread:Wrapper-Shutdown-Hook
jvm 1 | Send a packet STOPPED : 0
jvm 1 | Closing socket.
jvm 1 | Wrapper Manager: ShutdownHook complete
jvm 1 | Server daemon shut down
wrapper | <-- Wrapper Stopped
and in log file its coming the below error:
--> Wrapper Started as Console
Using tick timer.
server listening on port 32001.
Launching a JVM...
command: "java" -Djava.awt.headless=true -Xms3m -Xmx3m -Djava.library.path="./lib" -classpath "../../lib/jsw/wrapper-3.2.3.jar;../../lib/sonar-application-5.3.jar" -Dwrapper.key="n_2QZgO7FbHOC2G_" -Dwrapper.port=32001 -Dwrapper.jvm.port.min=31000 -Dwrapper.jvm.port.max=31999 -Dwrapper.debug="TRUE" -Dwrapper.pid=4876 -Dwrapper.version="3.2.3" -Dwrapper.native_library="wrapper" -Dwrapper.cpu.timeout="10" -Dwrapper.jvmid=1 org.tanukisoftware.wrapper.WrapperSimpleApp org.sonar.application.App
JVM started (PID=7932)
WrapperManager class initialized by thread: main Using classloader: sun.misc.Launcher$AppClassLoader#70dea4e
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
Wrapper Manager: JVM #1
Running a 64-bit JVM.
Wrapper Manager: Registering shutdown hook
Wrapper Manager: Using wrapper
Load native library. One or more attempts may fail if platform specific libraries do not exist.
Loading native library failed: wrapper-windows-x86-64.dll Cause: java.lang.UnsatisfiedLinkError: no wrapper-windows-x86-64 in java.library.path
Loaded native library: wrapper.dll
Calling native initialization method.
Initializing WrapperManager native library.
Java Executable: C:\ProgramData\Oracle\Java\javapath\java.exe
Windows version: 6.1.7601
Java Version : 1.8.0_60-b27 Java HotSpot(TM) 64-Bit Server VM
Java VM Vendor : Oracle Corporation
Startup runner thread started.
Control event monitor thread started.
WrapperManager.start(org.tanukisoftware.wrapper.WrapperSimpleApp#3f99bd52, args[]) called by thread: main
Communications runner thread started.
Open socket to wrapper...Wrapper-Connection
Opened Socket from 31000 to 32001
Send a packet KEY : n_2QZgO7FbHOC2G_
handleSocket(Socket[addr=/127.0.0.1,port=32001,localport=31000])
accepted a socket from 127.0.0.1 on port 31000
read a packet KEY : n_2QZgO7FbHOC2G_
Got key from JVM: n_2QZgO7FbHOC2G_
send a packet LOW_LOG_LEVEL : 1
send a packet PING_TIMEOUT : 0
send a packet PROPERTIES : (Property Values)
Start Application.
send a packet START : start
Received a packet LOW_LOG_LEVEL : 1
Wrapper Manager: LowLogLevel from Wrapper is 1
Received a packet PING_TIMEOUT : 0
PingTimeout from Wrapper is 0
Received a packet PROPERTIES : (Property Values)
Received a packet START : start
calling WrapperListener.start()
Waiting for WrapperListener.start runner thread to complete.
WrapperListener.start runner thread started.
WrapperSimpleApp: start(args) Will wait up to 2 seconds for the main method to complete.
WrapperSimpleApp: invoking main method
2016.03.02 14:39:07 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[search]: C:\Program Files\Java\jre1.8.0_60\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=C:\Users\sri.lakshmi.kovvuri\projectworkspace\SonarQube\sonarqube-5.3\temp -cp ./lib/common/*;./lib/search/* org.sonar.search.SearchServer C:\Users\SRILAK~1.KOV\AppData\Local\Temp\sq-process637648259402434916properties
Send a packet START_PENDING : 5000
read a packet START_PENDING : 5000
JVM signalled a start pending with waitHint of 5000 millis.
2016.03.02 14:39:07 INFO es[o.s.p.ProcessEntryPoint] Starting search
2016.03.02 14:39:07 INFO es[o.s.s.SearchSettings] Elasticsearch listening on 127.0.0.1:9001
2016.03.02 14:39:08 INFO es[o.elasticsearch.node] [sonar-1456909746449] version[1.7.2], pid[6784], build[e43676b/2015-09-14T09:49:53Z]
2016.03.02 14:39:08 INFO es[o.elasticsearch.node] [sonar-1456909746449] initializing ...
2016.03.02 14:39:08 INFO es[o.e.plugins] [sonar-1456909746449] loaded [], sites []
2016.03.02 14:39:08 INFO es[o.elasticsearch.env] [sonar-1456909746449] using [1] data paths, mounts [[OSDisk (C:)]], net usable_space [32.7gb], net total_space [148.5gb], types [NTFS]
Send a packet START_PENDING : 5000
WrapperSimpleApp: start(args) end. Main Completed=false, exitCode=null
WrapperListener.start runner thread stopped.
returned from WrapperListener.start()
Send a packet STARTED :
Startup runner thread stopped.
read a packet START_PENDING : 5000
JVM signalled a start pending with waitHint of 5000 millis.
read a packet STARTED :
JVM signalled that it was started.
send a packet PING : ping
Received a packet PING : ping
Send a packet PING : ok
read a packet PING : ok
Got ping response from JVM
2016.03.02 14:39:12 WARN es[o.e.bootstrap] JNA not found. native methods will be disabled.
2016.03.02 14:39:13 INFO es[o.elasticsearch.node] [sonar-1456909746449] initialized
2016.03.02 14:39:13 INFO es[o.elasticsearch.node] [sonar-1456909746449] starting ...
2016.03.02 14:39:14 WARN es[o.s.p.ProcessEntryPoint] Fail to start search
org.elasticsearch.transport.BindTransportException: Failed to bind to [9001]
at org.elasticsearch.transport.netty.NettyTransport.bindServerBootstrap(NettyTransport.java:422) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.transport.netty.NettyTransport.doStart(NettyTransport.java:283) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:85) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.transport.TransportService.doStart(TransportService.java:153) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:85) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.node.internal.InternalNode.start(InternalNode.java:257) ~[elasticsearch-1.7.2.jar:na]
at org.sonar.search.SearchServer.start(SearchServer.java:45) [sonar-search-5.3.jar:na]
at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:77) ~[sonar-process-5.3.jar:na]
at org.sonar.search.SearchServer.main(SearchServer.java:79) [sonar-search-5.3.jar:na]
Caused by: org.elasticsearch.common.netty.channel.ChannelException: Failed to bind to: /127.0.0.1:9001
at org.elasticsearch.common.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.transport.netty.NettyTransport$1.onPortNumber(NettyTransport.java:413) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.common.transport.PortsRange.iterate(PortsRange.java:58) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.transport.netty.NettyTransport.bindServerBootstrap(NettyTransport.java:409) ~[elasticsearch-1.7.2.jar:na]
... 8 common frames omitted
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_60]
at sun.nio.ch.Net.bind(Unknown Source) ~[na:1.8.0_60]
at sun.nio.ch.Net.bind(Unknown Source) ~[na:1.8.0_60]
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source) ~[na:1.8.0_60]
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source) ~[na:1.8.0_60]
at org.elasticsearch.common.netty.channel.socket.nio.NioServerBoss$RegisterTask.run(NioServerBoss.java:193) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:391) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:315) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.common.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) ~[elasticsearch-1.7.2.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:1.8.0_60]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:1.8.0_60]
at java.lang.Thread.run(Unknown Source) ~[na:1.8.0_60]
2016.03.02 14:39:14 INFO es[o.elasticsearch.node] [sonar-1456909746449] stopping ...
2016.03.02 14:39:14 INFO es[o.elasticsearch.node] [sonar-1456909746449] stopped
2016.03.02 14:39:14 INFO es[o.elasticsearch.node] [sonar-1456909746449] closing ...
2016.03.02 14:39:14 INFO es[o.elasticsearch.node] [sonar-1456909746449] closed
send a packet PING : ping
Received a packet PING : ping
Send a packet PING : ok
read a packet PING : ok
Got ping response from JVM
Wrapper Manager: ShutdownHook started
WrapperManager.stop(0) called by thread: Wrapper-Shutdown-Hook
Send a packet STOP : 0
read a packet STOP : 0
JVM requested a shutdown. (0)
wrapperStopProcess(0) called.
Sending stop signal to JVM
send a packet STOP : NULL
Received a packet STOP :
Thread, Wrapper-Shutdown-Hook, handling the shutdown process.
calling listener.stop()
WrapperSimpleApp: stop(0)
returned from listener.stop() -> 0
shutdownJVM(0) Thread:Wrapper-Shutdown-Hook
Send a packet STOPPED : 0
read a packet STOPPED : 0
JVM signalled that it was stopped.
Closing socket. socket read no code (closed?).
server listening on port 32002.
Wrapper Manager: ShutdownHook complete
Server daemon shut down
JVM process exited with a code of 0, leaving the wrapper exit code set to 0.
JVM exited normally.
<-- Wrapper Stopped

Sometimes SonarQube doesn't launch after several start/shutdown cycles and reports that couldn't make the "bind". For me, going to the "Task Manager" and close all the Java processes solves the problem.
It happens that somehow after closing the SonarQube console, something about that process is still running in the background and causes to block the ports to be used by SonarQube.

First try to find out that specific port and stop it as it has not stopped gracefully.
netstat -a -o -n
taskkill /F /PID <port> #cmd command to stat and kill the process
If not sure then go to the
conf->server.propeties
and change the sonar.search.port

Related

sonarQube exception shutdown after some time

Hi i din't get any exception but still sonarQube shutdown after few second
root#testmachine:~/sonarqube-7.1/bin/linux-x86-64# ./sonar.sh start
Starting SonarQube...
Started SonarQube.
root#testmachine:~/sonarqube-7.1/bin/linux-x86-64# ./sonar.sh console
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 | 2018.04.26 14:46:11 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /root/sonarqube-7.1/temp
jvm 1 | 2018.04.26 14:46:11 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
jvm 1 | 2018.04.26 14:46:11 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/root/sonarqube-7.1/elasticsearch]: /root/sonarqube-7.1/elasticsearch/bin/elasticsearch -Epath.conf=/root/sonarqube-7.1/temp/conf/es
jvm 1 | 2018.04.26 14:46:11 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
jvm 1 | 2018.04.26 14:46:12 INFO app[][o.e.p.PluginsService] no modules loaded
jvm 1 | 2018.04.26 14:46:12 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
jvm 1 | 2018.04.26 14:46:14 WARN app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 1
jvm 1 | 2018.04.26 14:46:14 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped
jvm 1 | 2018.04.26 14:46:14 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
wrapper | <-- Wrapper Stopped
You seem to be executing as root , SonarQube does not support that. See v6.6 Upgrade Note.

SonarQube Process exited with exit value [es]: 137

I want to install sonar on my vps (linux x86_64 debian 9) but when i exec this cdm : ./sonar.sh console i have this following log :
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.12.14 18:45:28 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /etc/sonarqube/temp
jvm 1 | 2017.12.14 18:45:28 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
jvm 1 | 2017.12.14 18:45:29 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/etc/sonarqube/elasticsearch]: /etc/sonarqube/elasticsearch/bin/elasticsearch -Epath.conf=/etc/sonarqube/temp/conf/es
jvm 1 | 2017.12.14 18:45:29 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
jvm 1 | 2017.12.14 18:45:29 WARN app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 137
jvm 1 | 2017.12.14 18:45:29 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped
jvm 1 | 2017.12.14 18:45:29 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
jvm 1 | 2017.12.14 18:45:29 INFO app[][o.e.p.PluginsService] no modules loaded
jvm 1 | 2017.12.14 18:45:29 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
jvm 1 | 2017.12.14 18:45:30 WARN app[][i.n.u.i.MacAddressUtil] Failed to find a usable hardware address from the network interfaces; using random bytes: 05:2b:7f:2f:de:90:ca:4a
wrapper | <-- Wrapper Stopped
An idea why the server is shut down immediately? I searched for [es]: 137 but I found nothing :(
it is memory problem. We experienced that kind of problems when we run Sonar as container and we try to limit maximum memory available for Sonar container below 2GB or RAM.
The Sonar runs under the hood Elasticsearch which requires a lot of memory so in this case I suggest to assign more that 2GB for Sonar.
You could also try to limit memory by ES_JAVA_OPTS below 2GB (if you have limited memory server) but when I've tried to play with this option Sonar started sucessfully but after some time and with some traffic problem returns and container stopped.
So the desciption on the ticket mentioned above that this is memory issue is correct: https://github.com/10up/wp-local-docker/issues/6
So I I think in this situation the easiest way to deal with the problem - just increase the memory for your Sonar server (container).
I found this page looking for SonarQube Process exited with exit value [es]: 1 .
I my case the answer was not memory but the fact that I tried to run as root.
Thanks to #Varun for the comment on the original question.
running as a non privileged user solved it for me
root#hostname # useradd sonar
root#hostname # chown -R sonar:sonar /opt/sonarqube
root#hostname # su - sonar
sonar#hostname # cd /opt/sonarqube
sonar#hostname # bin/linux-x86-64/sonar.sh console
The permissions on /opt/sonarqube are probably too wide but this is just a trial install.

Sonar service stopped after few seconds

I have installed Sonar on Ubuntu 12.04 LTS with all prerequisites Mysql & Java. When I start the service in console mode below error messages are appearing:
Running SonarQube...
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
wrapper | JVM exited while loading the application.
jvm 1 | wrapper | Unable to start JVM: No such file or directory (2)
wrapper | JVM Restarts disabled. Shutting down.
wrapper | <-- Wrapper Stopped
Even, java environment variable also configured in wrapper.properties file but still the issue persists.
Someone, help me to solve this issue.
After setting the java path in wrapper.java.command (wrapper.properties)
below error is occurring.
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 | 2017.12.19 12:06:19 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube-6.7/temp
jvm 1 | 2017.12.19 12:06:19 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
jvm 1 | 2017.12.19 12:06:19 INFO app[][o.s.a.p.ProcessLauncherImpl]
Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube-6.7/elasticsearch]: /opt/sonarqube-6.7/elasticsearch/bin/elasticsearch -Epath.conf=/opt/sonarqube-6.7/temp/conf/es
jvm 1 | 2017.12.19 12:06:19 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
jvm 1 | 2017.12.19 12:06:20 INFO app[][o.e.p.PluginsService] no modules loaded
jvm 1 | 2017.12.19 12:06:20 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
jvm 1 | 2017.12.19 12:06:22 WARN app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 1
jvm 1 | 2017.12.19 12:06:22 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped
jvm 1 | 2017.12.19 12:06:22 INFO app[][o.s.a.SchedulerImpl]
SonarQube is stopped
wrapper | <-- Wrapper Stopped
Please help #Eric
It looks like the property wrapper.java.command (in wrapper.conf) is incorrectly set.
The default value is java, if you have installed Java in a particular location, just update this value with the full path of the java executable.
Please, check the permission of jdk folder. I think its not accessible.
On MacOS, i needed copy the wrapper.conf file and past on the same path of wrapper exec with this wrapper.java.command:
wrapper.java.command=/Library/Java/JavaVirtualMachines/jdk-15.0.2.jdk/Contents/Home/bin/java

StartSonar Wrapper Stopped Error

I am new to using Sonar. I am trying to run Sonar Server but getting error
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.12.01 11:20:53 INFO app[][o.s.a.AppFileSystem] Cleaning
or creating temp directory C:\sonarqube-6.5\temp
jvm 1 | 2017.12.01 11:20:54 INFO app[]
[o.s.a.p.JavaProcessLauncherImpl] Launch process[es]: C:\Program
Files\Java\jre1.8.0_151\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=C:\sonarqube-6.5\temp -cp ./lib/common/*;./lib/search/*
org.sonar.search.SearchServer C:\sonarqube-6.5\temp\sq-
process3727603115591368728properties
jvm 1 | 2017.12.01 11:21:01 INFO app[][o.s.a.SchedulerImpl]
Process[es] is up
jvm 1 | 2017.12.01 11:21:01 INFO app[][o.s.a.p.JavaProcessLauncherImpl]
Launch process[web]: C:\Program Files\Java\jre1.8.0_151\bin\java -
Djava.awt.headless=true -Dfile.encoding=UTF-8 -Xmx512m -Xms128m -
XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=C:\sonarqube-6.5\temp -cp
./lib/common/*;./lib/server/*;C:\sonarqube-6.5\lib\jdbc\h2\h2-1.3.176.jar
org.sonar.server.app.WebServer C:\sonarqube-6.5\temp\sq-
process5462578831133863784properties
jvm 1 | 2017.12.01 11:21:02 INFO app[][o.s.a.SchedulerImpl] Process
[web] is stopped
jvm 1 | 2017.12.01 11:21:03 INFO app[][o.s.a.SchedulerImpl] Process
[es] is stopped
jvm 1 | 2017.12.01 11:21:03 INFO app[][o.s.a.SchedulerImpl]
SonarQube is stopped
wrapper | <-- Wrapper Stopped
checking the log for web getting error
Failed to initialize end point associated with ProtocolHandler ["http-nio-
0.0.0.0-9000"]java.net.BindException: Address already in use: bind
I am not sure what is solution for this problem I have changed Java Path in wrapper.conf as well added path in environment variable also.
Kindly help me with this.
ProtocolHandler ["http-nio- 0.0.0.0-9000"]java.net.BindException: Address already in use
This kind of error means that another process is listening on port 9000.
Check a few things:
Do you already have another instance of SonarQube running?
Go to localhost:9000 in a browser
Do you have another process that might be using this port?
Check the list of running processes. On Linux you can use netstat -ntlp | grep :9000 to find what's running on port 9000
Once you have identified what else is using port 9000 there are several solution paths:
Kill the other process
Change the configuration of the other process or SonarQube to use a different port
That is becauseof the port already in use so kill the port and use.
with WINDOWS10 default tools:
Step 1: Open Windows PowerShell as Administrator
Step 2: Find PID (ProcessID) for port 8080:
netstat -aon | findstr 9000
TCP 0.0.0.0:8080 0.0.0.0:0 LISTEN 77777
Step 3: Kill the zombie process:
taskkill /f /pid 77777
where "77777" is your PID
I had a perfect solution for this you just need to kill the process of sonarqube. If you are using windows machine I have these steps for you:-
Press the Windows key on your keyboard, type resmon.exe and press Enter.
In the window that appears, click the CPU tab.
In the third bar from the top, see the label Associated Handles.
Type the name of the file you're trying to close into the Search Handles bar, and then
click the magnifying glass icon.
Locate the program that is using your file.
Right-click the program using the file in question and select End Process.

Sonarqube 5.1.2 native package on RHEL6 won't start without root

I have recently installed the native RPM package of Sonarqube 5.1.2 on my RHEL 6.6 server.
I'm using 64 bit OpenJDK 1.8.0_51 and MySQL as DB.
Sonarqube starts up perfectly with root using the sonar.sh script in /bin within the installation folder (which is /opt/sonar in my case) but it doesn't work with the startup script created by the package in /etc/init.d.
Here is the log export:
Running SonarQube...
wrapper | --> Wrapper Started as Console
wrapper | Using tick timer.
wrapperp | server listening on port 32000.
wrapper | Command[0] : /etc/alternatives/java_sdk/bin/java
wrapper | Command[1] : -Djava.awt.headless=true
wrapper | Command[2] : -Xms3m
wrapper | Command[3] : -Xmx32m
wrapper | Command[4] : -Djava.library.path=./lib
wrapper | Command[5] : -classpath
wrapper | Command[6] : ../../lib/jsw/wrapper-3.2.3.jar:../../lib/sonar-application-5.1.2.jar
wrapper | Command[7] : -Dwrapper.key=sdELP0aWwf4S5hdM
wrapper | Command[8] : -Dwrapper.port=32000
wrapper | Command[9] : -Dwrapper.jvm.port.min=31000
wrapper | Command[10] : -Dwrapper.jvm.port.max=31999
wrapper | Command[11] : -Dwrapper.debug=TRUE
wrapper | Command[12] : -Dwrapper.pid=23176
wrapper | Command[13] : -Dwrapper.version=3.2.3
wrapper | Command[14] : -Dwrapper.native_library=wrapper
wrapper | Command[15] : -Dwrapper.cpu.timeout=10
wrapper | Command[16] : -Dwrapper.jvmid=1
wrapper | Command[17] : org.tanukisoftware.wrapper.WrapperSimpleApp
wrapper | Command[18] : org.sonar.application.App
wrapper | Launching a JVM...
jvm 1 | WrapperManager class initialized by thread: main Using classloader: sun.misc.Launcher$AppClassLoader#4e25154f
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 | Wrapper Manager: JVM #1
jvm 1 | Running a 64-bit JVM.
jvm 1 | Wrapper Manager: Registering shutdown hook
jvm 1 | Wrapper Manager: Using wrapper
jvm 1 | Load native library. One or more attempts may fail if platform specific libraries do not exist.
jvm 1 | Loading native library failed: libwrapper-linux-x86-64.so Cause: java.lang.UnsatisfiedLinkError: no wrapper-linux-x86-64 in java.library.path
jvm 1 | Loaded native library: libwrapper.so
jvm 1 | Calling native initialization method.
jvm 1 | Inside native WrapperManager initialization method
jvm 1 | Java Version : 1.8.0_51-b16 OpenJDK 64-Bit Server VM
jvm 1 | Java VM Vendor : Oracle Corporation
jvm 1 |
jvm 1 | Startup runner thread started.
jvm 1 | Control event monitor thread started.
jvm 1 | WrapperManager.start(org.tanukisoftware.wrapper.WrapperSimpleApp#4a574795, args[]) called by thread: main
jvm 1 | Communications runner thread started.
jvm 1 | Open socket to wrapper...Wrapper-Connection
jvm 1 | Failed attempt to bind using local port 31000
jvm 1 | Opened Socket from 31001 to 32000
jvm 1 | Send a packet KEY : sdELP0aWwf4S5hdM
jvm 1 | handleSocket(Socket[addr=/127.0.0.1,port=32000,localport=31001])
wrapperp | accepted a socket from 127.0.0.1 on port 31001
wrapperp | read a packet KEY : sdELP0aWwf4S5hdM
wrapper | Got key from JVM: sdELP0aWwf4S5hdM
wrapperp | send a packet LOW_LOG_LEVEL : 1
wrapperp | send a packet PING_TIMEOUT : 0
wrapperp | send a packet PROPERTIES : (Property Values)
wrapper | Start Application.
wrapperp | send a packet START : start
jvm 1 | Received a packet LOW_LOG_LEVEL : 1
jvm 1 | Wrapper Manager: LowLogLevel from Wrapper is 1
jvm 1 | Received a packet PING_TIMEOUT : 0
jvm 1 | PingTimeout from Wrapper is 0
jvm 1 | Received a packet PROPERTIES : (Property Values)
jvm 1 | Received a packet START : start
jvm 1 | calling WrapperListener.start()
jvm 1 | Waiting for WrapperListener.start runner thread to complete.
jvm 1 | WrapperListener.start runner thread started.
jvm 1 | WrapperSimpleApp: start(args) Will wait up to 2 seconds for the main method to complete.
jvm 1 | WrapperSimpleApp: invoking main method
jvm 1 | Wrapper Manager: ShutdownHook started
jvm 1 | WrapperManager.stop(0) called by thread: Wrapper-Shutdown-Hook
jvm 1 | Send a packet STOP : 0
jvm 1 | Startup runner thread stopped.
wrapperp | read a packet STOP : 0
wrapper | JVM requested a shutdown. (0)
wrapper | wrapperStopProcess(0) called.
wrapper | Sending stop signal to JVM
wrapperp | send a packet STOP : NULL
jvm 1 | Send a packet START_PENDING : 5000
wrapperp | read a packet START_PENDING : 5000
wrapper | JVM signalled a start pending with waitHint of 5000 millis.
jvm 1 | Thread, Wrapper-Shutdown-Hook, handling the shutdown process.
jvm 1 | shutdownJVM(0) Thread:Wrapper-Shutdown-Hook
jvm 1 | Send a packet STOPPED : 0
wrapperp | read a packet STOPPED : 0
wrapper | JVM signalled that it was stopped.
jvm 1 | Closing socket.
wrapperp | socket read no code (closed?).
wrapperp | server listening on port 32001.
jvm 1 | Wrapper Manager: ShutdownHook complete
wrapper | JVM exited normally.
wrapper | Signal trapped. Details:
wrapper | signal number=17 (SIGCHLD), source="unknown"
wrapper | Received SIGCHLD, checking JVM process status.
wrapper | JVM process exited with a code of 0, leaving the wrapper exit code set to 0.
wrapper | <-- Wrapper Stopped
I know it must be something with the permissions for the "sonar" user which was also created by the install package and I already made sure that the /opt/sonar folder is owned by the sonar user but still, these logs can't tell me what is missing.
I also compared the above log with the one when I start the script with the root user and I was able to point out at least some differences.
With root, after invoking the main method, the actual java process starts properly:
.
.
jvm 1 | WrapperSimpleApp: invoking main method
jvm 1 | INFO app[o.s.p.m.JavaProcessLauncher] Launch process[search]: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.51-1.b16.el6_7.x86_64/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=/opt/sonar/temp -cp ./lib/common/*:./lib/search/* org.sonar.search.SearchServer /tmp/sq-process3395120832375267732properties
With the sonar user, its not started and the JVM (or wrapper) simply initiates a shutdown:
.
.
jvm 1 | WrapperSimpleApp: invoking main method
jvm 1 | Wrapper Manager: ShutdownHook started
jvm 1 | WrapperManager.stop(0) called by thread: Wrapper-Shutdown-Hook
Unfortunately I have no idea what might be missing from the sonar user because according to the RPM package description, the startup script should work without root privileges.
Can anyone help me or point me to the right direction? I really don't want to run Sonarqube as root if it's not necessary.
Thank you for the help in advance!
Did you initialy start sonar using root account (via sonar.sh) ?
If so, did you chown -r /opt/sonar directory to sonar user ?

Resources