Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not able to start Sonar Server

I am using Sonar to generate code review reports of my project. But I am not able to start the server. I am getting

HeapDumpOnOutOfMemoryError

while running

StartSonar.bat

file.

Please find the logs generated while sonar start up.

C:\TEMP2\Sonar\sonarqube-4.5\bin\windows-x86-32>StartSonar.bat 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 | 2015.07.28 07:30:51 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[search]: C:\Software\jdk1.6.0_18\jre\bin\java -Xmx256m -Xms256m - Xss256k -Djava.net.preferIPv4Stack=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyO nly -XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true -Djava.io.tmpdir=C:\TEMP2\Sonar\sonarqube-4.5\temp -cp ./lib/common/;./lib/search/ org. sonar.search.SearchServer C:\Users\gxs114\AppData\Local\Temp\sq-process8934190933893070058properties jvm 1 | 2015.07.28 07:30:57 INFO app[o.s.p.m.Monitor] Process[search] is up jvm 1 | 2015.07.28 07:30:57 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[web]: C:\Software\jdk1.6.0_18\jre\bin\java -Xmx768m -XX:MaxPermSi ze=160m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=fals e -Djava.io.tmpdir=C:\TEMP2\Sonar\sonarqube-4.5\temp -cp ./lib/common/;./lib/server/ org.sonar.server.app.WebServer C:\Users\gxs114\AppData\Local\Te mp\sq-process4251708419326591677properties jvm 1 | 2015.07.28 07:30:57 INFO app[o.s.p.m.TerminatorThread] Process[search] is stopping jvm 1 | 2015.07.28 07:30:58 INFO app[o.s.p.m.TerminatorThread] Process[search] is stopped wrapper | <-- Wrapper Stopped

C:\TEMP2\Sonar\sonarqube-4.5\bin\windows-x86-32>

How can I solve this issue ? Any idea/solution appreciated.

like image 503
Gunjan Shah Avatar asked Jul 28 '15 11:07

Gunjan Shah


People also ask

How do I troubleshoot my SonarQube server?

SonarQubeCommunityProduct News Troubleshooting Checking the logs If you're having trouble starting your server for the first time (or any subsequent time!) the first thing to do is check your server logs. You'll find them in $SONARQUBE_HOME/logs:

Why is my JVM running in the background when starting sonar?

Because If you had already started Sonar and killed the process on command prompt, your JVM would still be running in the background. If the issue is not solved then go to conf folder in sonarqube and open sonar properties file and search for the 9000 port number and change sonar.web.port value to some other port number Eg.9050 and uncomment it.

Where to find server start up logs from sonar?

I got the solution from sonar log files itself. You can find server start up logs in the sonar.log file under directory "sonarqube-4.5\logs". I was not able to start the server due to following port binding exception :

Why can't I find the port number for sonar?

The reason behind this problem is that port number is already in use by SONAR, you didn't properly end the SONAR. There are two ways to get rid of this, Identify the port number using log file (sonarqube-4.5\logs). Then identify the PID for that process.


1 Answers

If you had already started Sonar and killed the process on command prompt, your JVM would still be running in the background.

Kill the java process and try again, it works. Tried and worked for me.

like image 152
Prasad Avatar answered Sep 23 '22 10:09

Prasad