我正在尝试安装Sonar来获取我的项目的一些统计信息,但是我收到了这个错误:
--> 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
我用来启动Sonar的脚本是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
为什么会这样,我该如何解决?
答案 0 :(得分:1)
这似乎不太可能,但似乎JVM的HeapDumpOnOutOfMemoryError
参数是在JDK 1.4.2中引入的 - 更新12
您使用的是旧版本的Java吗?
答案 1 :(得分:1)
您的问题来源位于.. \ conf \ wrapper.conf文件中。
对该行发表评论:
并尝试启动SonarQube。
答案 2 :(得分:0)
检查声纳日志文件本身。您可以在目录&#34; sonarqube-4.5 \ logs&#34;下的sonar.log文件中找到服务器启动日志。
由于以下端口绑定异常,您会发现服务器没有启动:
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]
将港口号码改为&#34; 4950&#34;来自&#34; 9000&#34;在目录&#34; sonarqube-4.5 \ conf&#34;下的sonar.properties文件中。
# 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