Elasticsearch 7.10 does not start on MacOS

I am very confused. I've downloaded the latest ELK stack to make a test on my machine. I am on MacOS 10.15.7 and Java 11

Here's what I did:

  1. Unzip the tar somewhere in my home directory
  2. cd to the elasticsearch
  3. invoke bin/elasticsearch

I get a blank screen, no logs, nothing. Something seems to be running but the port does not answer to request. I have no logs either.

As always, you need to report the issue to get more feedback. So it took several minutes before I got any log at all. Is that normal? Is it normal that an out-of-the-box run on MacOs fails with

ElasticsearchException[Failure running machine learning native code. This could be due to running on an unsupported OS or distribution, missing OS libraries, or a problem with the temp directory. To bypass this problem by running Elasticsearch without machine learning functionality set [xpack.ml.enabled: false].]

Hey Stéphane

Long time no see on the road :frowning:

I just tried it locally. Same MacOS version.

wget --no-check-certificate https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.10.0-darwin-x86_64.tar.gz
tar xzf elasticsearch-7.10.0-darwin-x86_64.tar.gz
cd elasticsearch-7.10.0
bin/elasticsearch

And everything went well on my side.

Note that Elasticsearch is providing a default JVM for the machine so normally everything should be ok.

I'm wondering if there are any global java options, or settings that would overload the default behavior...

Could you check your jvm settings if any? Like do you have a $JAVA_HOME set? In which case bin/elasticsearch-env uses it.

This is the bundled JVM BTW:

$ elasticsearch-7.10.0/jdk.app/Contents/Home/bin/java --version
openjdk 15.0.1 2020-10-20
OpenJDK Runtime Environment AdoptOpenJDK (build 15.0.1+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 15.0.1+9, mixed mode, sharing)

I had indeed a JAVA_HOME set (or java on my path in general). I unset the former and that didn't change anything. I copy/pasted the 4 instructions above and I had to wait 4+ minutes to get anything showing up (once it had downloaded and extracted the bits).

I can see a number of process running. JavaVersionChecker. Then nothing for a long period of time, jps not showing any extra process.

A colleague with similar setup as mine does not have the problem and I have no idea where that could come from.

More data point, running bin/elasticsearch-env manually takes a lot of time to complete: around 90 seconds!

Weird. @DavidTurner could you help?

So a reboot fixed it. That's frustrating, I have no idea what the problem was. Thanks for following-up David!

:partying_face:

:scream:

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