SonarQube is stopped: [o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1

Hi:

I have sonarqube 7.7 and am trying to run sonar.sh and it stops working. The most current error is:

[o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1

Before that for it was the same except it was for ManagedProcessHandler.

Tried version 7.9, changing paths, lots of research ( based on log error ), stopped, started, sudo, checked user name, checked against Activity Monitor to see if cpu was blocking it somehow ( does not seem to be )

Any help would be appreciated!

Relevant log entries are:

**jvm 1    | 2019.09.26 15:18:09 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running**
**jvm 1    | 2019.09.26 15:18:09 INFO  app[][o.e.p.PluginsService] no modules loaded**

...

**jvm 1    | 2019.09.26 15:18:17 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1**
**jvm 1    | 2019.09.26 15:18:17 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped**
jvm 1    | 2019.09.26 15:18:17 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
wrapper  | <-- Wrapper Stopped

*Edit - Can this error be caused by lack of disk space? I am on a work computer with an overload of system files that causes low disk space warnings frequently ( trying to work with IT to resolve this :slight_smile: )

Could you check the ES log for any errors and solve them? (there are a lot of posts in this forum detailing the necessary settings).

1 Like

Hi, I have the same issue using the latest version of SonarQube 8.0 with java 13.0.1 on MacOS Mojave version 10.14.6.

  MacBook-Pro-2:macosx-universal-64 buildserver$ /Users/buildserver/Downloads/sonarqube-8-2.0/bin/macosx-universal-64/sonar.sh console
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    | 2019.11.19 14:54:19 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /Users/buildserver/Downloads/sonarqube-8-2.0/temp
jvm 1    | 2019.11.19 14:54:19 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
jvm 1    | 2019.11.19 14:54:19 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/Users/buildserver/Downloads/sonarqube-8-2.0/elasticsearch]: /Users/buildserver/Downloads/sonarqube-8-2.0/elasticsearch/bin/elasticsearch
jvm 1    | 2019.11.19 14:54:19 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
jvm 1    | 2019.11.19 14:54:20 INFO  app[][o.e.p.PluginsService] no modules loaded
jvm 1    | 2019.11.19 14:54:20 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
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    | 2019.11.19 14:54:24 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1
jvm 1    | 2019.11.19 14:54:24 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
jvm 1    | 2019.11.19 14:54:24 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
wrapper  | <-- Wrapper Stopped
MacBook-Pro-2:macosx-universal-64 buildserver$ java -version
java version "13.0.1" 2019-10-15
Java(TM) SE Runtime Environment (build 13.0.1+9)
Java HotSpot(TM) 64-Bit Server VM (build 13.0.1+9, mixed mode, sharing)
MacBook-Pro-2:macosx-universal-64 buildserver$ 

Thanks!

Same advice: check for Elasticsearch errors and fix them.

1 Like

Hi,

Sonarqube is not Java13-ready yet. You have to use Java 11 instead.

Gilbert

I knew this was the case for 7.9, I wasn’t aware about 8.0 having the same issue.

For reference, here you can find the Elasticsearch compatibility matrix: https://www.elastic.co/support/matrix

1 Like

Hi,

thanks for the link.
Sonarqube 7.9.1 and 8.0 are using ES 6.8.0, so according to the compatibility matrix,
ES could run with Java13. Seems there are other reasons why Sonarqube insists on Java11.

Gilbert

Tenía el mismo problema y lo solucione con este consejo, utilizando java 11 trabaja perfectamente

Coming from 7.0, switching to Java 11, I had the same errors initially.

I then put the sonar.search.javaOpts to default and that worked. Now I’m fighting with

[2] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

Getting there, too, I’m sure.

P.S. my previous settings was

sonar.search.javaOpts=-Xmx2G -Xms256m -Xss1m -Djna.nosys=true \
  -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 \
  -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError
1 Like

Both of them should be set at OS level.
There should be some answers about them in this forum, or you can google the proper way of setting them for your specific OS.

1 Like

For anyone who will have this issue in future:
Could be because you running SonarQube as a root what is unacceptable for Elasticsearch.

2020.08.25 15:48:27 WARN  es[][o.e.b.ElasticsearchUncaughtExceptionHandler] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:163) ~[elasticsearch-6.8.4.jar:6.8.4]
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) ~[elasticsearch-6.8.4.jar:6.8.4]
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-6.8.4.jar:6.8.4]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-6.8.4.jar:6.8.4]
        at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-6.8.4.jar:6.8.4]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:116) ~[elasticsearch-6.8.4.jar:6.8.4]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93) ~[elasticsearch-6.8.4.jar:6.8.4]
Caused by: java.lang.RuntimeException: can not run elasticsearch as root
        at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:103) ~[elasticsearch-6.8.4.jar:6.8.4]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:170) ~[elasticsearch-6.8.4.jar:6.8.4]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) ~[elasticsearch-6.8.4.jar:6.8.4]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-6.8.4.jar:6.8.4]
        ... 6 more