Incompatible heap sizes error in Sonarqube

时间秒杀一切 提交于 2019-12-24 00:02:17

问题


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


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/33701426/incompatible-heap-sizes-error-in-sonarqube

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!