Error while creating elastic cluster on docker

Hi,

I'am creating an elastic cluster on a local docker on my macbook. I'm having this message while launching the 3rd node of elastic.

"stacktrace": ["org.elasticsearch.bootstrap.StartupException: 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].]",

"at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:163) ~[elasticsearch-7.3.0.jar:7.3.0]",

"at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) ~[elasticsearch-7.3.0.jar:7.3.0]",

"at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-7.3.0.jar:7.3.0]",

"at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-7.3.0.jar:7.3.0]",

"at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-7.3.0.jar:7.3.0]",

"at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115) ~[elasticsearch-7.3.0.jar:7.3.0]",

"at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-7.3.0.jar:7.3.0]",

"Caused by: org.elasticsearch.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].",

"at org.elasticsearch.xpack.ml.MachineLearning.createComponents(MachineLearning.java:497) ~[?:?]",

"at org.elasticsearch.node.Node.lambda$new$9(Node.java:457) ~[elasticsearch-7.3.0.jar:7.3.0]",

"at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:271) ~[?:?]",

"at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1654) ~[?:?]",

"at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) ~[?:?]",

"at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[?:?]",

"at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) ~[?:?]",

"at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]",

"at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578) ~[?:?]",

"at org.elasticsearch.node.Node.(Node.java:460) ~[elasticsearch-7.3.0.jar:7.3.0]",

"at org.elasticsearch.node.Node.(Node.java:258) ~[elasticsearch-7.3.0.jar:7.3.0]",

"at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:221) ~[elasticsearch-7.3.0.jar:7.3.0]",

"at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:221) ~[elasticsearch-7.3.0.jar:7.3.0]",

"at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:349) ~[elasticsearch-7.3.0.jar:7.3.0]",

"at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-7.3.0.jar:7.3.0]",

"... 6 more"] }

Did you have this issue before? Need help. Thanks in advance

1 Like

I had the same error and it was due to my hosts not supporting SSE4.2.

You can disable Machine Learning with these lines

extraEnvs: 
  - name: xpack.ml.enabled
    value: "false"

What container image are you using? Or which Os distribution is image docker based?