SonarQube 5.0.1无法启动

时间:2015-03-26 18:26:34

标签: sonarqube

系统是Linux-x86-64。我们运行SonarQube 4.0但无法运行任何版本。我们一直试图让5.0.1启动并运行,但它会在大约两秒后停止。

我们在日志中看到此错误,但不确定它是否正常:

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

这是日志:

-bash-4.1$ ./sonar.sh status
+ DEF_APP_NAME=SonarQube
+ DEF_APP_LONG_NAME=SonarQube
+ SONAR_HOME=/usr/local/sonarqube-5.0.1
+ PLATFORM=linux-x86-64
+ APP_NAME=SonarQube
+ APP_LONG_NAME=SonarQube
+ WRAPPER_CMD=/usr/local/sonarqube-5.0.1/bin/linux-x86-64/wrapper
+ WRAPPER_CONF=/usr/local/sonarqube-5.0.1/conf/wrapper.conf
+ PRIORITY=
+ PIDDIR=/var/run/sonar
+ case $0 in
++ pwd
+ PWD=/usr/local/sonarqube-5.0.1/bin/linux-x86-64
+ SCRIPT=/usr/local/sonarqube-5.0.1/bin/linux-x86-64/./sonar.sh
+ CHANGED=true
+ '[' Xtrue '!=' X ']'
++ echo /usr/local/sonarqube-5.0.1/bin/linux-x86-64/./sonar.sh
++ sed -e 's; ;:;g'
+ SAFESCRIPT=/usr/local/sonarqube-5.0.1/bin/linux-x86-64/./sonar.sh
++ echo /usr/local/sonarqube-5.0.1/bin/linux-x86-64/./sonar.sh
++ sed -e 's;/; ;g'
+ TOKENS=' usr local sonarqube-5.0.1 bin linux-x86-64 . sonar.sh'
+ REALPATH=
+ for C in '$TOKENS'
++ echo usr
++ sed -e 's;:; ;g'
+ C=usr
+ REALPATH=/usr
+ '[' -h /usr ']'
+ for C in '$TOKENS'
++ echo local
++ sed -e 's;:; ;g'
+ C=local
+ REALPATH=/usr/local
+ '[' -h /usr/local ']'
+ for C in '$TOKENS'
++ echo sonarqube-5.0.1
++ sed -e 's;:; ;g'
+ C=sonarqube-5.0.1
+ REALPATH=/usr/local/sonarqube-5.0.1
+ '[' -h /usr/local/sonarqube-5.0.1 ']'
+ for C in '$TOKENS'
++ echo bin
++ sed -e 's;:; ;g'
+ C=bin
+ REALPATH=/usr/local/sonarqube-5.0.1/bin
+ '[' -h /usr/local/sonarqube-5.0.1/bin ']'
+ for C in '$TOKENS'
++ echo linux-x86-64
++ sed -e 's;:; ;g'
+ C=linux-x86-64
+ REALPATH=/usr/local/sonarqube-5.0.1/bin/linux-x86-64
+ '[' -h /usr/local/sonarqube-5.0.1/bin/linux-x86-64 ']'
+ for C in '$TOKENS'
++ echo .
++ sed -e 's;:; ;g'
+ C=.
+ REALPATH=/usr/local/sonarqube-5.0.1/bin/linux-x86-64/.
+ '[' -h /usr/local/sonarqube-5.0.1/bin/linux-x86-64/. ']'
+ for C in '$TOKENS'
++ echo sonar.sh
send a packet START : start
Received a packet LOW_LOG_LEVEL : 1
Wrapper Manager: LowLogLevel from Wrapper is 1
calling WrapperListener.start()
Waiting for WrapperListener.start runner thread to complete.
WrapperListener.start runner thread started.
WrapperSimpleApp: invoking main method
Wrapper Manager: ShutdownHook started
WrapperManager.stop(0) called by thread: Wrapper-Shutdown-Hook
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
Spawning intermediate process...
Spawning daemon process...
--> Wrapper Started as Daemon
Using tick timer.
server listening on port 32000.
Command[0] : /auto/uscmweb/java/jdk1.8.0_40/bin/java
Command[1] : -Djava.awt.headless=true
Command[2] : -Xms256m
Command[3] : -Xmx512m
Command[4] : -Djava.library.path=./lib
Command[5] : -classpath
Command[7] : -Dwrapper.key=0bS89TdW9DaXfF5z
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=9207
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...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
  Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.
send a packet START : start
Received a packet LOW_LOG_LEVEL : 1
Wrapper Manager: LowLogLevel from Wrapper is 1
calling WrapperListener.start()
Waiting for WrapperListener.start runner thread to complete.
WrapperListener.start runner thread started.
WrapperSimpleApp: invoking main method
Wrapper Manager: ShutdownHook started
WrapperManager.stop(0) called by thread: Wrapper-Shutdown-Hook
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
Spawning intermediate process...
Spawning daemon process...
--> Wrapper Started as Daemon
Using tick timer.
server listening on port 32000.
Command[0] : /auto/uscmweb/java/jdk1.8.0_40/bin/java
Command[1] : -Djava.awt.headless=true
Command[2] : -Xms256m
Command[3] : -Xmx512m
Command[4] : -Djava.library.path=./lib
Command[5] : -classpath
Command[7] : -Dwrapper.key=0bS89TdW9DaXfF5z
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=9207
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...
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 librari
es do not exist.
Loading native library failed: libwrapper-linux-x86-64.so  Cause: java.lang.Unsa
tisfiedLinkError: 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
Failed attempt to bind using local port 31000
Opened Socket from 31001 to 32000
Send a packet KEY : 0bS89TdW9DaXfF5z
handleSocket(Socket[addr=/127.0.0.1,port=32000,localport=31001])
accepted a socket from 127.0.0.1 on port 31001
read a packet KEY : 0bS89TdW9DaXfF5z
Got key from JVM: 0bS89TdW9DaXfF5z
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 c
omplete.
WrapperSimpleApp: invoking main method
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
Startup runner thread stopped.
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.
<-- Wrapper Stopped

1 个答案:

答案 0 :(得分:4)

我能解决这个问题。修复是为了确保目录中的所有文件都由您登录的用户拥有。

chown -R sonaruser /usr/local/sonarqube-5.0.1
chown sonaruser /etc/init.d/sonar