elasticsearch SonarQube进程已退出,退出值为[es]:137,elasticsearch,sonarqube,debian,elasticsearch,Sonarqube,Debian" /> elasticsearch SonarQube进程已退出,退出值为[es]:137,elasticsearch,sonarqube,debian,elasticsearch,Sonarqube,Debian" />

elasticsearch SonarQube进程已退出,退出值为[es]:137

elasticsearch SonarQube进程已退出,退出值为[es]:137,elasticsearch,sonarqube,debian,elasticsearch,Sonarqube,Debian,我想在我的vps(linux x86_64 debian 9)上安装sonar,但当我执行此cdm:./sonar.sh控制台时,我有以下日志: Running SonarQube... wrapper | --> Wrapper Started as Console wrapper | Launching a JVM... jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org jvm 1 |

我想在我的vps(linux x86_64 debian 9)上安装sonar,但当我执行此cdm:./sonar.sh控制台时,我有以下日志:

Running SonarQube...
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    | 2017.12.14 18:45:28 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /etc/sonarqube/temp
jvm 1    | 2017.12.14 18:45:28 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
jvm 1    | 2017.12.14 18:45:29 INFO  app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from     [/etc/sonarqube/elasticsearch]: /etc/sonarqube/elasticsearch/bin/elasticsearch -Epath.conf=/etc/sonarqube/temp/conf/es
jvm 1    | 2017.12.14 18:45:29 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
jvm 1    | 2017.12.14 18:45:29 WARN  app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 137
jvm 1    | 2017.12.14 18:45:29 INFO  app[][o.s.a.SchedulerImpl] Process [es] is stopped
jvm 1    | 2017.12.14 18:45:29 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
jvm 1    | 2017.12.14 18:45:29 INFO  app[][o.e.p.PluginsService] no modules loaded
jvm 1    | 2017.12.14 18:45:29 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
jvm 1    | 2017.12.14 18:45:30 WARN  app[][i.n.u.i.MacAddressUtil] Failed to find a usable hardware address from the network interfaces; using random bytes: 05:2b:7f:2f:de:90:ca:4a
wrapper  | <-- Wrapper Stopped
正在运行SonarQube。。。
包装器-->包装器作为控制台包装器启动|启动JVM。。。
jvm 1 |包装器(版本3.2.3)http://wrapper.tanukisoftware.org
jvm 1 |版权1999-2006塔努基软件公司。保留所有权利。
JVM1|
jvm 1 | 2017.12.14 18:45:28信息应用程序[][o.s.a.AppFileSystem]清理或创建临时目录/etc/sonaqube/temp
jvm 1 | 2017.12.14 18:45:28信息应用程序[][o.s.a.es.EsSettings]Elasticsearch监听/127.0.0.1:9001
jvm 1 | 2017.12.14 18:45:29信息应用程序[][o.s.a.p.ProcessLauncherImpl]启动过程[[key='es',ipindex=1,logFilenamePrefix=es]]来自[/etc/sonarqube/elasticsearch]:/etc sonarqube/elasticsearch/bin/elasticsearch-Epath.conf=/etc/sonarqube/temp/conf/es
jvm 1 | 2017.12.14 18:45:29信息应用程序[][o.s.a.SchedulerImpl]正在等待Elasticsearch启动并运行
jvm 1 | 2017.12.14 18:45:29警告应用程序[][o.s.a.p.AbstractProcessMonitor]进程已退出,退出值为[es]:137
jvm 1 | 2017.12.14 18:45:29信息应用程序[][o.s.a.SchedulerImpl]进程[es]已停止
jvm 1 | 2017.12.14 18:45:29信息应用程序[][o.s.a.SchedulerImpl]SonarQube已停止
jvm 1 | 2017.12.14 18:45:29信息应用程序[][o.e.p.PluginsService]未加载模块
jvm 1 | 2017.12.14 18:45:29信息应用程序[][o.e.p.PluginsService]加载的插件[org.elasticsearch.transport.Netty4Plugin]
jvm 1 | 2017.12.14 18:45:30警告应用程序[][i.n.u.i.MacAddressUtil]未能从网络接口中找到可用的硬件地址;使用随机字节:05:2b:7f:2f:de:90:ca:4a

包装器|这是内存问题。当我们将Sonar作为容器运行时,我们遇到了这种问题,我们试图将Sonar容器的最大可用内存限制在2GB或RAM以下

声纳在引擎盖下运行,Elasticsearch需要大量内存,因此在这种情况下,我建议为声纳分配更多2GB的内存

您也可以尝试通过ES_JAVA_选项将内存限制在2GB以下(如果您的内存服务器有限),但当我尝试使用此选项时,Sonar成功启动,但一段时间后,由于一些交通问题,返回并停止了容器

因此,上面提到的票据上关于这是内存问题的描述是正确的:


因此,我认为在这种情况下,解决问题的最简单方法是增加Sonar服务器(容器)的内存。

我发现此页面正在查找带退出值[es]:1退出的SonarQube进程

我认为我的案例的答案不是记忆,而是我试图以root身份运行的事实。 感谢@Varun对原始问题的评论

以非特权用户身份运行为我解决了这个问题

root@hostname # useradd sonar
root@hostname # chown -R sonar:sonar /opt/sonarqube
root@hostname # su - sonar
sonar@hostname # cd /opt/sonarqube
sonar@hostname # bin/linux-x86-64/sonar.sh console

/opt/sonarqube上的权限可能太宽,但这只是一个试用安装。

可能是内存问题。例如,请查看此问题。请添加es.log文件,主要问题将显示在那里。您是否尝试以root用户身份运行console.sh?我们如何才能做到?我们需要修改sonar.properties或java设置?如果您将sonar作为容器运行,则必须为容器分配更多内存。好的,谢谢您提供的信息。现在我正在EC2上使用RHEL,我已经更改了一些关于内存的属性,并更改了我的数据库连接,因为我使用的是MySql,然后我换成了PostgreSQL,它的工作方式就像一个charmphew!!。我有这个问题差不多3个星期了。在库伯内特斯运行索纳库贝。增加了吊舱内存。答对 了执行第三个命令时询问声纳的密码。密码是什么?