Incompatible heap sizes error in Sonarqube

2019-07-14 23:29发布

I'm trying to install SonarQube on a Maxc (actually sonar source, tutorial is at http://chapter31.com/2013/05/02/installing-sonar-source-on-mac-osx/). The result of the "sonar start" command is the following output in sonar.log:

--> Wrapper Started as Daemon
Launching a JVM...
JVM exited while loading the application.
Error occurred during initialization of VM
Incompatible minimum and maximum heap sizes specified
JVM Restarts disabled.  Shutting down.
<-- Wrapper Stopped

I've tried to set the Java properties correctly in sonar.properties:

sonar.web.javaOpts=-Xms512m -Xmx768m -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true

The system is a Macbook Pro running OSX 10.11.1. Typing "java -version" into the command line outputs java version "1.6.0_65".

2条回答
叛逆
2楼-- · 2019-07-15 00:21

I had java installed even then i was also getting the same error in my mac system and i just installed "Java SE Development Kit 8u60"(jdk-8u60-macosx-x64.dmg) for "Mac OS X x64" and then the issue got fixed. http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html

so i think just installing "Java SE Development Kit 8u60" for right system from above link may fix this issue for others who ever faces this problem.

查看更多
男人必须洒脱
3楼-- · 2019-07-15 00:25

Maybe it needs quotes?

sonar.web.javaOpts="-Xms512m -Xmx768m -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true"

I think it picking up the Xms, but ignoring the rest. Meaning Xms is probably greater than default Xmx, which produces the error.

查看更多
登录 后发表回答