Reputation: 1180
I'm trying to install Sonar to get some statistics for my project, But I'm getting this error :
--> Wrapper Started as Console
Launching a JVM...
Unrecognized VM option '+HeapDumpOnOutOfMemoryError'
Could not create the Java virtual machine.
JVM exited while loading the application.
Launching a JVM...
Unrecognized VM option '+HeapDumpOnOutOfMemoryError'
Could not create the Java virtual machine.
JVM exited while loading the application.
Launching a JVM...
Unrecognized VM option '+HeapDumpOnOutOfMemoryError'
Could not create the Java virtual machine.
JVM exited while loading the application.
Launching a JVM...
Unrecognized VM option '+HeapDumpOnOutOfMemoryError'
Could not create the Java virtual machine.
JVM exited while loading the application.
Launching a JVM...
Unrecognized VM option '+HeapDumpOnOutOfMemoryError'
Could not create the Java virtual machine.
JVM exited while loading the application.
There were 5 failed launches in a row, each lasting less than 300 seconds. Giving up.
There may be a configuration problem: please check the logs.
<-- Wrapper Stopped
The script that I'm using to start Sonar is StartSonar :
@echo off setlocal
rem Copyright (c) 1999, 2006 Tanuki Software Inc. rem rem Java Service Wrapper general startup script rem
rem rem Resolve the real path of the wrapper.exe rem For non NT systems, the _REALPATH and _WRAPPER_CONF values rem can be hard-coded below and the following test removed. rem if "%OS%"=="Windows_NT" goto nt echo This script only works with NT-based versions of Windows. goto :eof
:nt rem rem Find the application home. rem rem %~dp0 is location of current script under NT set _REALPATH=%~dp0
rem Decide on the wrapper binary. set _WRAPPER_BASE=wrapper set
_WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe if exist "%_WRAPPER_EXE%" goto conf set
_WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe if exist "%_WRAPPER_EXE%" goto conf set
_WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%.exe if exist "%_WRAPPER_EXE%" goto conf echo Unable to locate a Wrapper executable using any of the following names: echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe echo %_REALPATH%%_WRAPPER_BASE%.exe pause goto :eof
rem rem Find the wrapper.conf rem :conf set _WRAPPER_CONF="%~f1" if not %_WRAPPER_CONF%=="" goto startup set
_WRAPPER_CONF="%_REALPATH%..\..\conf\wrapper.conf"
rem rem Start the Wrapper rem :startup "%_WRAPPER_EXE%" -c %_WRAPPER_CONF% if not errorlevel 1 goto :eof pause
Why this is happening and how can I solve it?
Upvotes: 2
Views: 6878
Reputation: 147
Check the sonar log files itself. You can find server start up logs in the sonar.log file under directory "sonarqube-4.5\logs".
You will find server didnt start due to following port binding exception :
2015.12.01 02:46:36 ERROR web[o.a.c.h.Http11Protocol] Failed to initialize end point associated with ProtocolHandler ["http-bio-0.0.0.0-9000"]
java.net.BindException: Address already in use: JVM_Bind /0.0.0.0:9000
at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:411) ~[tomcat-embed-core-7.0.54.jar:7.0.54]
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:640) ~[tomcat-embed-core-7.0.54.jar:7.0.54]
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:434) ~[tomcat-embed-core-7.0.54.jar:7.0.54]
at org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:119) [tomcat-embed-core-7.0.54.jar:7.0.54]
Chang the port number to "4950" from "9000" in sonar.properties file under directory "sonarqube-4.5\conf".
# TCP port for incoming HTTP connections. Disabled when value is -1.
sonar.web.port=4950
# TCP port for incoming HTTPS connections. Disabled when value is -1 (default).
#sonar.web.https.port=-1
Upvotes: 0
Reputation: 789
Source of your problem is in the ..\conf\wrapper.conf file.
Put in comment the line :
and try to start SonarQube.
Upvotes: 1
Reputation: 7335
This seems unlikely, but it appears that the HeapDumpOnOutOfMemoryError
parameter to the JVM was introduced in JDK 1.4.2 - update 12
You're not using an older version of Java that that are you?
Upvotes: 1