我正在按照本教程在我的CentOS 7中设置SonarQube:https://thegeeksalive.com/how-to-install-sonarqube-on-centos/
最后我启动了我的Sonar,但它不能启动,因为这里的内存问题。
--> Wrapper Started as Daemon
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
2019.07.24 10:58:55 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2019.07.24 10:58:55 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2019.07.24 10:58:55 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
2019.07.24 10:58:55 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2019.07.24 10:58:55 INFO app[][o.e.p.PluginsService] no modules loaded
2019.07.24 10:58:55 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
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.
2019.07.24 10:59:08 INFO app[][o.s.a.SchedulerImpl] Process[es] is up
2019.07.24 10:59:08 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [/opt/sonarqube]: /usr/java/jdk-11.0.4/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonarqube/temp --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/*:/opt/sonarqube/lib/jdbc/mysql/mysql-connector-java-5.1.46.jar org.sonar.server.app.WebServer /opt/sonarqube/temp/sq-process16556217505100103896properties
2019.07.24 10:59:12 INFO app[][o.s.a.SchedulerImpl] Process[web] is stopped
2019.07.24 10:59:12 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 143
2019.07.24 10:59:12 INFO app[][o.s.a.SchedulerImpl] Process[es] is stopped
2019.07.24 10:59:12 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
<-- Wrapper Stopped希望大家能帮我找到解决方案。谢谢!
发布于 2019-07-25 21:25:11
检查SonarQube主目录中的logs/es.log中的内容。在Linux上启动SonarQube的许多问题都会显示消息,比如max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
如果您看到这一点,那么您应该在启动SonarQube之前运行以下命令
sysctl -w vm.max_map_count=262144
sysctl -w fs.file-max=65535发布于 2019-07-25 00:35:30
此错误最有可能是由于项目太大,SonarQube无法使用默认内存设置进行扫描。
尝试以下解决方法:
export _JAVA_OPTIONS="-Xmx1g"https://stackoverflow.com/questions/57175156
复制相似问题