I'm seeing below error while starting SonarQube 6.7.5
Y:\sonarqube-6.7.5\bin\windows-x86-64>StartSonar.bat
wrapper | --> Wrapper Started as Console
wrapperp | server socket creation failed. (An invalid argument was supplied. (0x2726))
wrapperp | server socket creation failed. (An invalid argument was supplied. (0x2726))
wrapper | Launching a JVM...
wrapperp | server socket creation failed. (An invalid argument was supplied. (0x2726))
wrapperp | server socket creation failed. (An invalid argument was supplied. (0x2726))
wrapperp | server socket creation failed. (An invalid argument was supplied. (0x2726))
wrapperp | server socket creation failed. (An invalid argument was supplied. (0x2726))
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 | Failed to connect to the Wrapper at port 0.
jvm 1 | java.net.ConnectException: connect: Address is invalid on local machine, or port is not valid on remote machine
jvm 1 | Exiting JVM...
wrapperp | server socket creation failed. (An invalid argument was supplied. (0x2726))
wrapperp | server socket creation failed. (An invalid argument was supplied. (0x2726))
My java verison is :
C:\Users\Shiv.Dewangan>java -version
java version "1.8.0_112"
Java(TM) SE Runtime Environment (build 1.8.0_112-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.112-b15, mixed mode)
I've also tried to change
wrapper.java.command=java
to
wrapper.java.command=D:/apps/Java/jre1.8.0_112_x64/bin/java
in wrapper.conf but no help. Any clue please ?
Adding the debug log :
--> Wrapper Started as Console
Using tick timer.
server socket creation failed. (An invalid argument was supplied. (0x2726))
server socket creation failed. (An invalid argument was supplied. (0x2726))
Launching a JVM...
command: "D:\apps\Java\jre1.8.0_112_x64\bin\java" -Dsonar.wrapped=true -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Xms8m -Xmx32m -Djava.library.path="./lib" -classpath "../../lib/jsw/wrapper-3.2.3.jar;../../lib/common/commons-codec-1.8.jar;../../lib/common/commons-io-2.4.jar;../../lib/common/commons-lang-2.6.jar;../../lib/common/commons-logging-1.1.3.jar;../../lib/common/elasticsearch-5.6.3.jar;../../lib/common/elasticsearch-rest-client-5.6.3.jar;../../lib/common/guava-18.0.jar;../../lib/common/hazelcast-3.8.6.jar;../../lib/common/hazelcast-client-3.8.6.jar;../../lib/common/HdrHistogram-2.1.9.jar;../../lib/common/hppc-0.7.1.jar;../../lib/common/httpasyncclient-4.1.2.jar;../../lib/common/httpclient-4.5.2.jar;../../lib/common/httpcore-4.4.5.jar;../../lib/common/httpcore-nio-4.4.5.jar;../../lib/common/jackson-core-2.9.5.jar;../../lib/common/jackson-dataformat-cbor-2.8.6.jar;../../lib/common/jackson-dataformat-smile-2.8.6.jar;../../lib/common/jackson-dataformat-yaml-2.8.6.jar;../../lib/common/jna-4.4.0-1.jar;../../lib/common/joda-time-2.9.5.jar;../../lib/common/jopt-simple-5.0.2.jar;../../lib/common/jul-to-slf4j-1.7.25.jar;../../lib/common/log4j-api-2.8.2.jar;../../lib/common/log4j-core-2.8.2.jar;../../lib/common/log4j-to-slf4j-2.8.2.jar;../../lib/common/logback-classic-1.2.3.jar;../../lib/common/logback-core-1.2.3.jar;../../lib/common/lucene-analyzers-common-6.6.1.jar;../../lib/common/lucene-backward-codecs-6.6.1.jar;../../lib/common/lucene-core-6.6.1.jar;../../lib/common/lucene-grouping-6.6.1.jar;../../lib/common/lucene-highlighter-6.6.1.jar;../../lib/common/lucene-join-6.6.1.jar;../../lib/common/lucene-memory-6.6.1.jar;../../lib/common/lucene-misc-6.6.1.jar;../../lib/common/lucene-queries-6.6.1.jar;../../lib/common/lucene-queryparser-6.6.1.jar;../../lib/common/lucene-sandbox-6.6.1.jar;../../lib/common/lucene-spatial-6.6.1.jar;../../lib/common/lucene-spatial-extras-6.6.1.jar;../../lib/common/lucene-spatial3d-6.6.1.jar;../../lib/common/lucene-suggest-6.6.1.jar;../../lib/common/netty-buffer-4.1.13.Final.jar;../../lib/common/netty-codec-4.1.13.Final.jar;../../lib/common/netty-codec-http-4.1.13.Final.jar;../../lib/common/netty-common-4.1.13.Final.jar;../../lib/common/netty-handler-4.1.13.Final.jar;../../lib/common/netty-resolver-4.1.13.Final.jar;../../lib/common/netty-transport-4.1.13.Final.jar;../../lib/common/parent-join-client-5.6.3.jar;../../lib/common/percolator-client-5.6.3.jar;../../lib/common/reindex-client-5.6.3.jar;../../lib/common/securesm-1.1.jar;../../lib/common/slf4j-api-1.7.25.jar;../../lib/common/snakeyaml-1.15.jar;../../lib/common/sonar-main-6.7.5.jar;../../lib/common/sonar-process-6.7.5.jar;../../lib/common/t-digest-3.0.jar;../../lib/common/transport-5.6.3.jar;../../lib/common/transport-netty4-client-5.6.3.jar;../../lib/sonar-application-6.7.5.jar" -Dwrapper.key="3vFWJRiR3ITHrjH8" -Dwrapper.port=0 -Dwrapper.jvm.port.min=31000 -Dwrapper.jvm.port.max=31999 -Dwrapper.debug="TRUE" -Dwrapper.pid=6268 -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=6404)
server socket creation failed. (An invalid argument was supplied.
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: D:\apps\Java\jre1.8.0_112_x64\bin\java.exe
Windows version: 6.1.7601
Java Version : 1.8.0_112-b15 Java HotSpot(TM) 64-Bit Server VM
Java VM Vendor : Oracle Corporation
Control event monitor thread started.
Startup runner thread started.
WrapperManager.start(org.tanukisoftware.wrapper.WrapperSimpleApp#31cefde0, args[]) called by thread: main
Communications runner thread started.
Open socket to wrapper...Wrapper-Connection
Failed to connect to the Wrapper at port 0.
java.net.ConnectException: connect: Address is invalid on local machine, or port is not valid on remote machine
Exiting JVM...
WrapperManager.stopImmediate(1) called by thread: Wrapper-Connection
server socket creation failed. (An invalid argument was supplied. (0x2726))
server socket creation failed. (An invalid argument was supplied. (0x2726))
server socket creation failed. (An invalid argument was supplied. (0x2726))
CTRL-C trapped. Shutting down.
I did little google and added -Djava.net.preferIPv4Stack=true into wrapper.conf but it's same error.
jvm 1 | Failed to connect to the Wrapper at port 0.
jvm 1 | java.net.ConnectException: connect: Address is invalid on local machine, or port is not valid on remote machine
jvm 1 | Exiting JVM...
Related
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
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.
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
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 ?
I'm currently trying to install sonarqube on my VM which runs CentOS.
I'm just running ./sonar.sh start or ./sonar.sh console but I get the following error:
Spawning intermediate process...
Spawning daemon process...
--> Wrapper Started as Daemon
Using tick timer.
server listening on port 32000.
Command[0] : /usr/java/jdk1.8.0_40/bin/java
Command[1] : -Djava.awt.headless=true
Command[2] : -Xms3m
Command[3] : -Xmx32m
Command[4] : -Djava.library.path=./lib
Command[5] : -classpath
Command[6] : ../../lib/jsw/wrapper-3.2.3.jar:../../lib/sonar-application-5.1.1.jar
Command[7] : -Dwrapper.key=YJaZZIwuLc49FoZw
Command[8] : -Dwrapper.port=32000
Command[9] : -Dwrapper.jvm.port.min=31000
Command[10] : -Dwrapper.jvm.port.max=31999
Command[11] : -Dwrapper.debug=TRUE
Command[12] : -Dwrapper.pid=8925
Command[13] : -Dwrapper.version=3.2.3
Command[14] : -Dwrapper.native_library=wrapper
Command[15] : -Dwrapper.service=TRUE
Command[16] : -Dwrapper.cpu.timeout=10
Command[17] : -Dwrapper.jvmid=1
Command[18] : org.tanukisoftware.wrapper.WrapperSimpleApp
Command[19] : org.sonar.application.App
Launching a JVM...
WrapperManager class initialized by thread: main Using classloader: sun.misc.Launcher$AppClassLoader#4e25154f
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: libwrapper-linux-x86-64.so Cause: java.lang.UnsatisfiedLinkError: no wrapper-linux-x86-64 in java.library.path
Loaded native library: libwrapper.so
Calling native initialization method.
Inside native WrapperManager initialization method
Java Version : 1.8.0_40-b25 Java HotSpot(TM) 64-Bit Server VM
Java VM Vendor : Oracle Corporation
Control event monitor thread started.
Startup runner thread started.
WrapperManager.start(org.tanukisoftware.wrapper.WrapperSimpleApp#4a574795, args[]) called by thread: main
Communications runner thread started.
Open socket to wrapper...Wrapper-Connection
Opened Socket from 31000 to 32000
Send a packet KEY : YJaZZIwuLc49FoZw
handleSocket(Socket[addr=/127.0.0.1,port=32000,localport=31000])
accepted a socket from 127.0.0.1 on port 31000
read a packet KEY : YJaZZIwuLc49FoZw
Got key from JVM: YJaZZIwuLc49FoZw
send a packet LOW_LOG_LEVEL : 0
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 : 0
Wrapper Manager: LowLogLevel from Wrapper is 0
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
Wrapper Manager: ShutdownHook started
WrapperManager.stop(0) called by thread: Wrapper-Shutdown-Hook
Send a packet STOP : 0
Startup runner thread stopped.
read a packet STOP : 0
JVM requested a shutdown. (0)
wrapperStopProcess(0) called.
Sending stop signal to JVM
send a packet STOP : NULL
Send a packet START_PENDING : 5000
read a packet START_PENDING : 5000
JVM signalled a start pending with waitHint of 5000 millis.
Thread, Wrapper-Shutdown-Hook, handling the shutdown process.
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 32001.
JVM exited normally.
Signal trapped. Details:
signal number=17 (SIGCHLD), source="unknown"
Received SIGCHLD, checking JVM process status.
JVM process exited with a code of 0, leaving the wrapper exit code set to 0.
Wrapper Manager: ShutdownHook complete
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 :
Server daemon shut down
<-- Wrapper Stopped
Spawning intermediate process...
Spawning daemon process...
--> Wrapper Started as Daemon
Using tick timer.
server listening on port 32000.
Command[0] : /usr/java/jdk1.8.0_40/bin/java
Command[1] : -Djava.awt.headless=true
Command[2] : -Xms3m
Command[3] : -Xmx32m
Command[4] : -Djava.library.path=./lib
Command[5] : -classpath
Command[6] : ../../lib/jsw/wrapper-3.2.3.jar:../../lib/sonar-application-5.1.1.jar
Command[7] : -Dwrapper.key=M_r8LVkidRlWI7_b
Command[8] : -Dwrapper.port=32000
Command[9] : -Dwrapper.jvm.port.min=31000
Command[10] : -Dwrapper.jvm.port.max=31999
Command[11] : -Dwrapper.debug=TRUE
Command[12] : -Dwrapper.pid=9032
Command[13] : -Dwrapper.version=3.2.3
Command[14] : -Dwrapper.native_library=wrapper
Command[15] : -Dwrapper.service=TRUE
Command[16] : -Dwrapper.cpu.timeout=10
Command[17] : -Dwrapper.jvmid=1
Command[18] : org.tanukisoftware.wrapper.WrapperSimpleApp
Command[19] : org.sonar.application.App
Launching a JVM...
WrapperManager class initialized by thread: main Using classloader: sun.misc.Launcher$AppClassLoader#4e25154f
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: libwrapper-linux-x86-64.so Cause: java.lang.UnsatisfiedLinkError: no wrapper-linux-x86-64 in java.library.path
Loaded native library: libwrapper.so
Calling native initialization method.
Inside native WrapperManager initialization method
Java Version : 1.8.0_40-b25 Java HotSpot(TM) 64-Bit Server VM
Java VM Vendor : Oracle Corporation
Control event monitor thread started.
Startup runner thread started.
WrapperManager.start(org.tanukisoftware.wrapper.WrapperSimpleApp#4a574795, args[]) called by thread: main
Communications runner thread started.
Open socket to wrapper...Wrapper-Connection
Opened Socket from 31000 to 32000
Send a packet KEY : M_r8LVkidRlWI7_b
handleSocket(Socket[addr=/127.0.0.1,port=32000,localport=31000])
accepted a socket from 127.0.0.1 on port 31000
read a packet KEY : M_r8LVkidRlWI7_b
Got key from JVM: M_r8LVkidRlWI7_b
send a packet LOW_LOG_LEVEL : 0
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 : 0
Wrapper Manager: LowLogLevel from Wrapper is 0
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
Wrapper Manager: ShutdownHook started
WrapperManager.stop(0) called by thread: Wrapper-Shutdown-Hook
Send a packet STOP : 0
Startup runner thread stopped.
read a packet STOP : 0
JVM requested a shutdown. (0)
wrapperStopProcess(0) called.
Sending stop signal to JVM
send a packet STOP : NULL
Send a packet START_PENDING : 5000
read a packet START_PENDING : 5000
JVM signalled a start pending with waitHint of 5000 millis.
Thread, Wrapper-Shutdown-Hook, handling the shutdown process.
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 32001.
JVM exited normally.
Signal trapped. Details:
signal number=17 (SIGCHLD), source="unknown"
Received SIGCHLD, checking JVM process status.
JVM process exited with a code of 0, leaving the wrapper exit code set to 0.
Wrapper Manager: ShutdownHook complete
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 :
Server daemon shut down
<-- Wrapper Stopped
Spawning intermediate process...
Spawning daemon process...
--> Wrapper Started as Daemon
Using tick timer.
server listening on port 32000.
Command[0] : /usr/java/jdk1.8.0_40/bin/java
Command[1] : -Djava.awt.headless=true
Command[2] : -Xms3m
Command[3] : -Xmx32m
Command[4] : -Djava.library.path=./lib
Command[5] : -classpath
Command[6] : ../../lib/jsw/wrapper-3.2.3.jar:../../lib/sonar-application-5.1.1.jar
Command[7] : -Dwrapper.key=90kxlGkfiFFf0qJi
Command[8] : -Dwrapper.port=32000
Command[9] : -Dwrapper.jvm.port.min=31000
Command[10] : -Dwrapper.jvm.port.max=31999
Command[11] : -Dwrapper.debug=TRUE
Command[12] : -Dwrapper.pid=10211
Command[13] : -Dwrapper.version=3.2.3
Command[14] : -Dwrapper.native_library=wrapper
Command[15] : -Dwrapper.service=TRUE
Command[16] : -Dwrapper.cpu.timeout=10
Command[17] : -Dwrapper.jvmid=1
Command[18] : org.tanukisoftware.wrapper.WrapperSimpleApp
Command[19] : org.sonar.application.App
Launching a JVM...
Unable to start JVM: No such file or directory (2)
Signal trapped. Details:
signal number=17 (SIGCHLD), source="unknown"
Received SIGCHLD, checking JVM process status.
JVM process exited with a code of 1, setting the wrapper exit code to 1.
JVM exited while loading the application.
JVM Restarts disabled. Shutting down.
<-- Wrapper Stopped
--> Wrapper Started as Console
Using tick timer.
server listening on port 32000.
Command[0] : /usr/java/jdk1.8.0_40/bin/java
Command[1] : -Djava.awt.headless=true
Command[2] : -Xms3m
Command[3] : -Xmx32m
Command[4] : -Djava.library.path=./lib
Command[5] : -classpath
Command[6] : ../../lib/jsw/wrapper-3.2.3.jar:../../lib/sonar-application-5.1.1.jar
Command[7] : -Dwrapper.key=pQGEkNJknvC5D5wq
Command[8] : -Dwrapper.port=32000
Command[9] : -Dwrapper.jvm.port.min=31000
Command[10] : -Dwrapper.jvm.port.max=31999
Command[11] : -Dwrapper.debug=TRUE
Command[12] : -Dwrapper.pid=10259
Command[13] : -Dwrapper.version=3.2.3
Command[14] : -Dwrapper.native_library=wrapper
Command[15] : -Dwrapper.cpu.timeout=10
Command[16] : -Dwrapper.jvmid=1
Command[17] : org.tanukisoftware.wrapper.WrapperSimpleApp
Command[18] : org.sonar.application.App
Launching a JVM...
Unable to start JVM: No such file or directory (2)
Signal trapped. Details:
signal number=17 (SIGCHLD), source="unknown"
Received SIGCHLD, checking JVM process status.
JVM process exited with a code of 1, setting the wrapper exit code to 1.
JVM exited while loading the application.
wrapper | Unable to start JVM: No such file or directory (2)
JVM Restarts disabled. Shutting down.
<-- Wrapper Stopped
Any suggestions on what may be my problem?
I'll post my sonar.properties and wrapper.conf files below:
# This file must contain only ISO 8859-1 characters.
# See http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Properties.html#load(java.io.InputStream)
#
# Property values can:
# - reference an environment variable, for example sonar.jdbc.url= ${env:SONAR_JDBC_URL}
# - be encrypted. See http://redirect.sonarsource.com/doc/settings-encryption.html
#--------------------------------------------------------------------------------------------------
# DATABASE
#
# IMPORTANT: the embedded H2 database is used by default. It is recommended for tests but not for
# production use. Supported databases are MySQL, Oracle, PostgreSQL and Microsoft SQLServer.
# User credentials.
# Permissions to create tables, indices and triggers must be granted to JDBC user.
# The schema must be created first.
sonar.jdbc.username=root
sonar.jdbc.password=
#----- Embedded Database (default)
# It does not accept connections from remote hosts, so the
# server and the analyzers must be executed on the same host.
sonar.jdbc.url=jdbc:h2:tcp://localhost:9092/sonar
# H2 embedded database server listening port, defaults to 9092
sonar.embeddedDatabase.port=9092
#----- MySQL 5.x
# Only InnoDB storage engine is supported (not myISAM).
# Only the bundled driver is supported.
#sonar.jdbc.driverClassName=net.sourceforge.jtds.jdbc.Driver
#sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance
#----- Oracle 10g/11g
# - Only thin client is supported
# - Only versions 11.2.* of Oracle JDBC driver are supported, even if connecting to lower Oracle versions.
# - The JDBC driver must be copied into the directory extensions/jdbc-driver/oracle/
# - If you need to set the schema, please refer to http://jira.codehaus.org/browse/SONAR-5000
#sonar.jdbc.url=jdbc:oracle:thin:#localhost/XE
#----- PostgreSQL 8.x/9.x
# If you don't use the schema named "public", please refer to http://jira.codehaus.org/browse/SONAR-5000
#sonar.jdbc.url=jdbc:postgresql://localhost/sonar
#----- Microsoft SQLServer 2008/2012
# Only the bundled jTDS driver is supported.
# Collation must be case-sensitive (CS) and accent-sensitive (AS).
#sonar.jdbc.url=jdbc:jtds:sqlserver://localhost/sonar;SelectMethod=Cursor
#----- Connection pool settings
# The maximum number of active connections that can be allocated
# at the same time, or negative for no limit.
sonar.jdbc.maxActive=50
# The maximum number of connections that can remain idle in the
# pool, without extra ones being released, or negative for no limit.
sonar.jdbc.maxIdle=5
# The minimum number of connections that can remain idle in the pool,
# without extra ones being created, or zero to create none.
sonar.jdbc.minIdle=2
# The maximum number of milliseconds that the pool will wait (when there
# are no available connections) for a connection to be returned before
# throwing an exception, or <= 0 to wait indefinitely.
sonar.jdbc.maxWait=5000
sonar.jdbc.minEvictableIdleTimeMillis=600000
sonar.jdbc.timeBetweenEvictionRunsMillis=30000
#--------------------------------------------------------------------------------------------------
# WEB SERVER
# Web server is executed in a dedicated Java process. By default heap size is 768Mb.
# Use the following property to customize JVM options.
# Recommendations:
#
# The HotSpot Server VM is recommended. The property -server should be added if server mode
# is not enabled by default on your environment: http://docs.oracle.com/javase/7/docs/technotes/guides/vm/server-class.html
#
# Set min and max memory (respectively -Xms and -Xmx) to the same value to prevent heap
# from resizing at runtime.
#
sonar.web.javaOpts=-Xmx768m -XX:MaxPermSize=160m -XX:+HeapDumpOnOutOfMemoryError -server
# Same as previous property, but allows to not repeat all other settings like -Xmx
#sonar.web.javaAdditionalOpts=
# Binding IP address. For servers with more than one IP address, this property specifies which
# address will be used for listening on the specified ports.
# By default, ports will be used on all IP addresses associated with the server.
sonar.web.host=127.0.0.1
# Web context. When set, it must start with forward slash (for example /sonarqube).
# The default value is root context (empty value).
sonar.web.context=/sonarqube
# TCP port for incoming HTTP connections. Disabled when value is -1.
sonar.web.port=9000
# The maximum number of connections that the server will accept and process at any given time.
# When this number has been reached, the server will not accept any more connections until
# the number of connections falls below this value. The operating system may still accept connections
# based on the sonar.web.connections.acceptCount property. The default value is 50 for each
# enabled connector.
sonar.web.http.maxThreads=50
#sonar.web.https.maxThreads=50
# The minimum number of threads always kept running. The default value is 5 for each
# enabled connector.
sonar.web.http.minThreads=5
#sonar.web.https.minThreads=5
# The maximum queue length for incoming connection requests when all possible request processing
# threads are in use. Any requests received when the queue is full will be refused.
# The default value is 25 for each enabled connector.
sonar.web.http.acceptCount=25
#sonar.web.https.acceptCount=25
# TCP port for incoming AJP connections. Disabled if value is -1. Disabled by default.
sonar.ajp.port=9000
#--------------------------------------------------------------------------------------------------
# ELASTICSEARCH
# Elasticsearch is used to facilitate fast and accurate information retrieval.
# It is executed in a dedicated Java process.
# JVM options of Elasticsearch process
# Recommendations:
#
# Use HotSpot Server VM. The property -server should be added if server mode
# is not enabled by default on your environment: http://docs.oracle.com/javase/7/docs/technotes/guides/vm/server-class.html
#
# Set min and max memory (respectively -Xms and -Xmx) to the same value to prevent heap
# from resizing at runtime.
#
sonar.search.javaOpts=-Xmx1G -Xms256m -Xss256k -Djava.net.preferIPv4Stack=true \
-XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 \
-XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError
# Same as previous property, but allows to not repeat all other settings like -Xmx
#sonar.search.javaAdditionalOpts=
# Elasticsearch port. Default is 9001. Use 0 to get a free port.
# This port must be private and must not be exposed to the Internet.
sonar.search.port=9001
#--------------------------------------------------------------------------------------------------
# UPDATE CENTER
# Update Center requires an internet connection to request http://update.sonarsource.org
# It is enabled by default.
sonar.updatecenter.activate=true
# HTTP proxy (default none)
#http.proxyHost=
#http.proxyPort=
# NT domain name if NTLM proxy is used
#http.auth.ntlm.domain=
# SOCKS proxy (default none)
#socksProxyHost=
#socksProxyPort=
# proxy authentication. The 2 following properties are used for HTTP and SOCKS proxies.
#http.proxyUser=
#http.proxyPassword=
#--------------------------------------------------------------------------------------------------
# LOGGING
# Level of logs. Supported values are INFO, DEBUG and TRACE
sonar.log.level=TRACE
# Path to log files. Can be absolute or relative to installation directory.
# Default is <installation home>/logs
sonar.path.logs=logs
# Rolling policy of log files
# - based on time if value starts with "time:", for example by day ("time:yyyy-MM-dd")
# or by month ("time:yyyy-MM")
# - based on size if value starts with "size:", for example "size:10MB"
# - disabled if value is "none". That needs logs to be managed by an external system like logrotate.
sonar.log.rollingPolicy=time:yyyy-MM-dd
# Maximum number of files to keep if a rolling policy is enabled.
# - maximum value is 20 on size rolling policy
# - unlimited on time rolling policy. Set to zero to disable old file purging.
sonar.log.maxFiles=20
# Access log is the list of all the HTTP requests received by server. If enabled, it is stored
# in the file {sonar.path.logs}/access.log. This file follows the same rolling policy as for
# sonar.log (see sonar.log.rollingPolicy and sonar.log.maxFiles).
sonar.web.accessLogs.enable=true
# Format of access log. It is ignored if sonar.web.accessLogs.enable=false. Value is:
# - "common" is the Common Log Format (shortcut for: %h %l %u %user %date "%r" %s %b)
# - "combined" is another format widely recognized (shortcut for: %h %l %u [%t] "%r" %s %b "%i{Referer}" "%i{User-Agent}")
# - else a custom pattern. See http://logback.qos.ch/manual/layouts.html#AccessPatternLayout
sonar.web.accessLogs.pattern=combined
#--------------------------------------------------------------------------------------------------
# OTHERS
# Delay in seconds between processing of notification queue. Default is 60 seconds.
sonar.notifications.delay=60
# Paths to persistent data files (embedded database and search index) and temporary files.
# Can be absolute or relative to installation directory.
# Defaults are respectively <installation home>/data and <installation home>/temp
sonar.path.data=data
sonar.path.temp=temp
#--------------------------------------------------------------------------------------------------
# DEVELOPMENT - only for developers
# The following properties MUST NOT be used in production environments.
# Dev mode allows to reload web sources on changes and to restart server when new versions
# of plugins are deployed.
sonar.web.dev=true
# Path to webapp sources for hot-reloading of Ruby on Rails, JS and CSS (only core,
# plugins not supported).
sonar.web.dev.sources=/path/to/server/sonar-web/src/main/webapp
# Uncomment to enable the Elasticsearch HTTP connector, so that ES can be directly requested through
# http://lmenezes.com/elasticsearch-kopf/?location=http://localhost:9010
sonar.search.httpPort=9010
And the wrapper.conf file:
# Path to JVM executable. By default it must be available in PATH.
# Can be an absolute path, for example:
#wrapper.java.command=/path/to/my/jdk/bin/java
#wrapper.java.command=java
wrapper.java.command=/usr/java/jdk1.8.0_40/bin/java
#
# DO NOT EDIT THE FOLLOWING SECTIONS
#
#********************************************************************
# Wrapper Java
#********************************************************************
wrapper.java.additional.1=-Djava.awt.headless=true
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
wrapper.java.classpath.1=../../lib/jsw/*.jar
wrapper.java.classpath.2=../../lib/*.jar
wrapper.java.library.path.1=./lib
wrapper.app.parameter.1=org.sonar.application.App
wrapper.java.initmemory=3
# Xmx can't be set to a lower value because of compatibility with Java 6
wrapper.java.maxmemory=32
#********************************************************************
# Wrapper Logs
#********************************************************************
wrapper.console.format=PM
wrapper.console.loglevel=TRACE
wrapper.logfile=../../logs/sonar.log
wrapper.logfile.format=M
wrapper.logfile.loglevel=TRACE
# Maximum size that the log file will be allowed to grow to before
# the log is rolled. Size is specified in bytes. The default value
# of 0, disables log rolling. May abbreviate with the 'k' (kb) or
# 'm' (mb) suffix. For example: 10m = 10 megabytes.
wrapper.logfile.maxsize=10m
# Maximum number of rolled log files which will be allowed before old
# files are deleted. The default value of 0 implies no limit.
wrapper.logfile.maxfiles=10
# Log Level for sys/event log output. (See docs for log levels)
wrapper.syslog.loglevel=DEBUG
#********************************************************************
# Wrapper Windows Properties
#********************************************************************
# Title to use when running as a console
wrapper.console.title=SonarQube
# Disallow start of multiple instances of an application at the same time on Windows
wrapper.single_invocation=true
#********************************************************************
# Wrapper Windows NT/2000/XP Service Properties
#********************************************************************
# WARNING - Do not modify any of these properties when an application
# using this configuration file has been installed as a service.
# Please uninstall the service before modifying this section. The
# service can then be reinstalled.
# Name of the service
wrapper.ntservice.name=SonarQube
# Display name of the service
wrapper.ntservice.displayname=SonarQube
# Description of the service
wrapper.ntservice.description=SonarQube
# Service dependencies. Add dependencies as needed starting from 1
wrapper.ntservice.dependency.1=
# Mode in which the service is installed. AUTO_START or DEMAND_START
wrapper.ntservice.starttype=AUTO_START
# Allow the service to interact with the desktop.
wrapper.ntservice.interactive=false
#********************************************************************
# Forking Properties
#********************************************************************
wrapper.disable_restarts=TRUE
wrapper.ping.timeout=0
wrapper.shutdown.timeout=3000
wrapper.jvm_exit.timeout=3000
The error log "Unable to start JVM: No such file or directory (2)" means that the path to java executable does not exist. Please check that /usr/java/jdk1.8.0_40/bin/java, as you configured in wrapper.conf, is correctly installed.