Sonarqube 8.6.1 - +HeapDumpOnOutOfMemoryError

问题描述

在我的 Mac 上安装 Sonarqube 并在本地进行设置。我有 Java 11 和 postgres 13.1。我能够启动它几次,但随后它开始抛出 +HeapDumpOnOutOfMemoryError,我尝试了很多潜在的解决方案,包括从 sonar.properties 文件更改堆大小,但错误仍然出现。请在下面找到终端日志,

wrapper  | --> Wrapper Started as Console
wrapper  | Launching a JVM...
jvm 1    | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1    |   copyright 1999-2006 Tanuki Software,Inc.  All Rights Reserved.
jvm 1    | 
jvm 1    | 2021.01.29 17:59:34 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /Users/.../sonarqube/temp
jvm 1    | 2021.01.29 17:59:34 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9005
jvm 1    | 2021.01.29 17:59:34 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es',ipcIndex=1,logFilenamePrefix=es]] from [/Users/…/sonarqube/elasticsearch]: /Users/…/sonarqube/elasticsearch/bin/elasticsearch
jvm 1    | 2021.01.29 17:59:34 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
jvm 1    | Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcmarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
jvm 1    | 2021.01.29 17:59:35 INFO  app[][o.e.p.PluginsService] no modules loaded
jvm 1    | 2021.01.29 17:59:35 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
jvm 1    | 2021.01.29 17:59:48 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
jvm 1    | 2021.01.29 17:59:48 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='web',ipcIndex=2,logFilenamePrefix=web]] from [/Users/…/sonarqube]: /Library/Java/JavaVirtualMachines/jdk-11.0.7.jdk/Contents/Home/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/Users/.../sonarqube/temp -XX:-OmitStackTraceInFastThrow --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED -Xmx512m -xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/common/*:/Users/…/sonarqube/lib/jdbc/postgresql/postgresql-42.2.11.jar org.sonar.server.app.WebServer /Users/…/sonarqube/temp/sq-process4739419519904490611properties
jvm 1    | 2021.01.29 17:59:52 INFO  app[][o.s.a.SchedulerImpl] Process[web] is stopped
jvm 1    | 2021.01.29 17:59:52 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
jvm 1    | 2021.01.29 17:59:52 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
jvm 1    | 2021.01.29 17:59:52 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 143
wrapper  | <-- Wrapper Stopped

(在适用的路径中添加点,直到它到达“sonarqube”文件夹)

这是 sonar.properties 文件中的弹性搜索部分

#JVM options of Elasticsearch process*
*#sonar.search.javaOpts=-Xmx128m -xms2048m -XX:+HeapDumpOnOutOfMemoryError
sonar.search.javaOpts=-Xmx2048m -xms2048m -XX:MaxDirectMemorySize=1024m
#Same as prevIoUs property,but allows to not repeat all other settings like -Xmx
#sonar.search.javaAdditionalOpts=
*# Elasticsearch port. Default is 9001. Use 0 to get a free port.
#As a security precaution,should be blocked by a firewall and not exposed to the Internet.
sonar.search.port=9005
#Elasticsearch host. The search server will bind this address and the search client will connect to it.
#Default is loopback address.
#As a security precaution,should NOT be set to a publicly available address.
#sonar.search.host=*

jvm.options 文件,我也改变了堆大小

## JVM configuration
################################################################
##IMPORTANT: JVM heap size
################################################################
##
##You should always set the min and max JVM heap
##size to the same value. For example,to set
##the heap to 4 GB,set:
##
-xms4g
-Xmx4g
##
##See https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html
##for more information
##

################################################################
*#xms represents the initial size of total heap space
#Xmx represents the maximum size of total heap space

xms4g
Xmx4g

请让我知道如何解决这个问题,已经被困在这里一个星期了。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...