Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SonarQube Process exited with exit value [es]: 137

I want to install sonar on my vps (linux x86_64 debian 9) but when i exec this cdm : ./sonar.sh console i have this following log :

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

An idea why the server is shut down immediately? I searched for [es]: 137 but I found nothing :(

like image 751
Fanor Avatar asked Dec 15 '17 15:12

Fanor


2 Answers

it is memory problem. We experienced that kind of problems when we run Sonar as container and we try to limit maximum memory available for Sonar container below 2GB or RAM.

The Sonar runs under the hood Elasticsearch which requires a lot of memory so in this case I suggest to assign more that 2GB for Sonar.

You could also try to limit memory by ES_JAVA_OPTS below 2GB (if you have limited memory server) but when I've tried to play with this option Sonar started sucessfully but after some time and with some traffic problem returns and container stopped.

So the desciption on the ticket mentioned above that this is memory issue is correct: https://github.com/10up/wp-local-docker/issues/6

So I I think in this situation the easiest way to deal with the problem - just increase the memory for your Sonar server (container).

like image 121
Przemek Nowak Avatar answered Nov 11 '22 19:11

Przemek Nowak


I found this page looking for SonarQube Process exited with exit value [es]: 1 .

I my case the answer was not memory but the fact that I tried to run as root. Thanks to @Varun for the comment on the original question.

running as a non privileged user solved it for me

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

The permissions on /opt/sonarqube are probably too wide but this is just a trial install.

like image 22
carl verbiest Avatar answered Nov 11 '22 21:11

carl verbiest