尝试启动Sonarqube服务时出现问题

时间:2017-04-26 09:32:34

标签: mysql sonarqube

我在我的机器上安装了 sonarqube-6.3.1 ,并在mysql db中创建了一个名为' sonarqubedb '的数据库。现在,当我在sonar.properties文件中进行更改以使用数据库时,sonarqube没有启动并抛出错误消息,但如果我使用的是默认的DB配置(而不是mysql),我就可以启动了。

当我使用mysql db时,有人可以向我提供一个解决方案。

我的 sonar.properties 文件如下:

sonar.jdbc.username=root
sonar.jdbc.password=

sonar.jdbc.url=jdbc:mysql://localhost:3306/sonarqubedb?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance
当我尝试启动服务时,

和声纳日志文件,如:

--> Wrapper Started as Service
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: 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.7600
Java Version   : 1.8.0_45-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@4f023edb, 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 : 4hhDEyNqmPXAiWpf
handleSocket(Socket[addr=/127.0.0.1,port=32000,localport=31001])
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
2017.04.26 14:54:12 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating 
temp directory C:\Program Files\Sonar\sonarqube-6.3.1\sonarqube-6.3.1\temp
2017.04.26 14:54:12 INFO  app[][o.s.p.m.JavaProcessLauncher] Launch 
process[es]: C:\Program Files\Java\jre1.8.0_45\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:\Program 
Files\Sonar\sonarqube-6.3.1\sonarqube-6.3.1\temp -javaagent:C:\Program 
Files\Java\jre1.8.0_45\lib\management-agent.jar -cp 
./lib/common/*;./lib/search/* org.sonar.search.SearchServer C:\Program 
Files\Sonar\sonarqube-6.3.1\sonarqube-6.3.1\temp\sq-
process3041279828124660880properties
Send a packet START_PENDING : 5000
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.
Received a packet PING : ping
Send a packet PING : ok
Received a packet PING : ping
Send a packet PING : ok
2017.04.26 14:54:23 INFO  app[][o.s.p.m.Monitor] Process[es] is up
2017.04.26 14:54:23 INFO  app[][o.s.p.m.JavaProcessLauncher] Launch 
process[web]: C:\Program Files\Java\jre1.8.0_45\bin\java -
Djava.awt.headless=true -Dfile.encoding=UTF-8 -Xmx512m -Xms128m -
XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=C:\Program 
Files\Sonar\sonarqube-6.3.1\sonarqube-6.3.1\temp -javaagent:C:\Program 
Files\Java\jre1.8.0_45\lib\management-agent.jar -cp 
./lib/common/*;./lib/server/*;C:\Program Files\Sonar\sonarqube-
6.3.1\sonarqube-6.3.1\lib\jdbc\mysql\mysql-connector-java-5.1.39.jar 
org.sonar.server.app.WebServer C:\Program Files\Sonar\sonarqube-
6.3.1\sonarqube-6.3.1\temp\sq-process5745752416531116392properties
Received a packet PING : ping
Send a packet PING : ok
2017.04.26 14:54:28 INFO  app[][o.s.p.m.Monitor] Process[es] is stopping
2017.04.26 14:54:28 ERROR app[][o.s.p.m.Monitor] Process[web] failed to 
start
2017.04.26 14:54:28 INFO  app[][o.s.p.m.Monitor] Process[es] is stopped
Wrapper Manager: ShutdownHook started
WrapperManager.stop(0) called by thread: Wrapper-Shutdown-Hook
Send a packet STOP : 0
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
Closing socket.
Server daemon shut down
Wrapper Manager: ShutdownHook complete
<-- Wrapper Stopped

提前致谢:)

3 个答案:

答案 0 :(得分:1)

转到sonarqube / logs目录。您将找到几个日志文件,其中一个将包含有关为什么sonarqube无法启动的详细错误。(您必须在文件中一直向下滚动以获取最新信息iirc)

答案 1 :(得分:0)

通过这个声纳文档,你会得到一些帮助 -

https://docs.sonarqube.org/display/SONAR/Installing+the+Server

答案 2 :(得分:0)

我有同样的问题。

问题是我的MySQL版本不符合最低要求。