Can't start Elasticsearch on Ubuntu 19.10

I am trying to run Elasticsearch on Ubuntu 19.10, which was released just three days ago.

  1. I downloaded the Elasticsearch 7.4.0 .tar.gz file from https://www.elastic.co/downloads/elasticsearch
  2. I extracted the .tar.gz
  3. I tried executing ./elasticsearch
  4. The output was:
ubuntu@ubuntu:~/Downloads/elasticsearch-7.4.0-linux-x86_64/elasticsearch-7.4.0/bin$ ./elasticsearch
Exception in thread "main" java.lang.RuntimeException: starting java failed with [137]
output:

error:
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
	at org.elasticsearch.tools.launchers.JvmErgonomics.flagsFinal(JvmErgonomics.java:111)
	at org.elasticsearch.tools.launchers.JvmErgonomics.finalJvmOptions(JvmErgonomics.java:79)
	at org.elasticsearch.tools.launchers.JvmErgonomics.choose(JvmErgonomics.java:57)
	at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:89)

Obviously there is a Java exception, and while I don't have Java installed, it should presumably be using the bundled JDK.

I know there are other options such as the .deb package, but I wanted to give it a try running it like this, and have no idea why it won't work.

Hi @dandago

See here:

Exception in thread "main" java.lang.RuntimeException: starting java failed with [137]

Error 137 means that the system failed to allocate enough memory for the Java process.
The default jvm.options provided by us will require at least 1GB of free memory available for the Elasticsearch process to run. In practice you will probably need a little more than that.

Makes sense, I was testing it out from the live CD on a laptop with 4GB RAM. Thanks.

Is there anywhere I can look up those error codes? It really would have been much nicer if the output just told me what the problem was. :slight_smile:

@dandago

I'm afraid there's no nice list out that there that would've give you a straight-forward explanation of the 137. The way that one comes about is, that exit codes of the form 128+n mean, "stopped by signal n", in this case 9 == SIGKILL, which unless you sent it yourself, is generally the OS killing the process for using up too much memory.

There's a little more documentation on this topic here https://www.tldp.org/LDP/abs/html/exitcodes.html if you're interested.

1 Like

Had the same issue today...upgrading from 7.3 to 7.4 on Ubuntu 16.10.
I'm running elastic with ES_JAVA_OPTS: "-Xms4g -Xmx4g -XX:-AssumeMP"...on a machine with 32GB RAM...so i guess it can't be a memory thing...

...switching back to 7.3 with the same options and everything is working again...

@creaticious That's quite strange. When ES dies on a 137 you should get an error dump (hs_* file), could you share that if it gets produced?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.