0
votes

I installed sonarqube-6.3.1 in my machine and created a database in mysql db named 'sonarqubedb'. Now when I am making changes in sonar.properties file to use the database, sonarqube is not getting started and throwing error msg, but If I am using the default DB configuration (and NOT mysql), I am able to start.

Could somebody please provide me a solution what is going wrong when I am using mysql db.

My sonar.properties file be like:

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

sonar.jdbc.url=jdbc:mysql://localhost:3306/sonarqubedb?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance

and the sonar log file when I try to start service, be like:

--> 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

Thanks in Advance :)

3

3 Answers

1
votes

Go to your sonarqube/logs directory. You'll find several log files and one of them will contain the detailed error on why sonarqube won't start.(you'll have to scroll all the way down inside the files for the latest information iirc)

0
votes

Go through this sonar documentation, you will get some help -

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

0
votes

I had the same issue.

The problem was that my MySQL version didn't meet the minimum requirements.