【问题标题】:"Out of Memory!"-error on Debian 8 when starting SonarQube installed from native package“内存不足!” - 启动从本机包安装的 SonarQube 时 Debian 8 上的错误
【发布时间】:2016-07-04 02:32:04
【问题描述】:

我在具有 4GB RAM 的 VM 上全新安装了 Debian 8。我安装了 SonarQube(使用本机包)。当我尝试从提供的脚本开始时,日志显示以下内容:

--> Wrapper Started as Daemon
Launching a JVM...
JVM exited while loading the application.
GC Warning: Out of Memory!  Returning NIL!
Exception in thread "main" GC Warning: Out of Memory!  Returning NIL!
java.lang.OutOfMemoryError
*** Got java.lang.NoClassDefFoundError: gnu.gcj.runtime.NameFinder while trying to print stack trace.
JVM Restarts disabled.  Shutting down.
<-- Wrapper Stopped

我尝试增加启动脚本中的 -Xmx 和 -Xms 值,但没有效果。

【问题讨论】:

    标签: jvm debian sonarqube sonarqube-ops


    【解决方案1】:

    从您的日志看来,您正在使用默认的 java aka gnu.gcj。

    你应该安装openjdk7或openjdk8

    您可以通过编辑 wrapper.java.command 属性 ie 在 $SONAR_HOME/conf/wrapper.conf 中选择适当的 JVM

    # To use Java 7
    wrapper.java.command=/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
    
    # To use Java 8
    wrapper.java.command=/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
    

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-08-02
    • 2016-07-31
    • 2012-11-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-02-19
    相关资源
    最近更新 更多