4

I need to work on elasticSearch, i have downloaded elasticsearch-6.7.2 from authorized website, but while trying to start the ElasticSearch server and while executing elasticsearch.bat file, i am getting the below error:

org.elasticsearch.bootstrap.StartupException: ElasticsearchException[X-Pack is not supported and Machine Learning is not available for [windows-x86]; you can use the other X-Pack features (unsupported) by setting xpack.ml.enabled: false in elasticsearch.yml] at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:163) ~[elasticsearch-6.7.2.jar:6.7.2] at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) ~[elasticsearch-6.7.2.jar:6.7.2] at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-6.7.2.jar:6.7.2] at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-6.7.2.jar:6.7.2] at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-6.7.2.jar:6.7.2] at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:116) ~[elasticsearch-6.7.2.jar:6.7.2] at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93) ~[elasticsearch-6.7.2.jar:6.7.2] Caused by: org.elasticsearch.ElasticsearchException: X-Pack is not supported and Machine Learning is not available for [windows-x86]; you can use the other X-Pack features (unsupported) by setting xpack.ml.enabled: false in elasticsearch.yml at org.elasticsearch.xpack.ml.MachineLearningFeatureSet.isRunningOnMlPlatform(MachineLearningFeatureSet.java:107) ~[?:?] at org.elasticsearch.xpack.ml.MachineLearningFeatureSet.isRunningOnMlPlatform(MachineLearningFeatureSet.java:98) ~[?:?] at org.elasticsearch.xpack.ml.MachineLearning.createComponents(MachineLearning.java:413) ~[?:?] at org.elasticsearch.node.Node.lambda$new$11(Node.java:472) ~[elasticsearch-6.7.2.jar:6.7.2] at java.util.stream.ReferencePipeline$7$1.accept(Unknown Source) ~[?:1.8.0_211] at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source) ~[?:1.8.0_211] at java.util.stream.AbstractPipeline.copyInto(Unknown Source) ~[?:1.8.0_211] at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) ~[?:1.8.0_211] at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source) ~[?:1.8.0_211] at java.util.stream.AbstractPipeline.evaluate(Unknown Source) ~[?:1.8.0_211] at java.util.stream.ReferencePipeline.collect(Unknown Source) ~[?:1.8.0_211] at org.elasticsearch.node.Node.(Node.java:475) ~[elasticsearch-6.7.2.jar:6.7.2] at org.elasticsearch.node.Node.(Node.java:266) ~[elasticsearch-6.7.2.jar:6.7.2] at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:212) ~[elasticsearch-6.7.2.jar:6.7.2] at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:212) ~[elasticsearch-6.7.2.jar:6.7.2] at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) ~[elasticsearch-6.7.2.jar:6.7.2] at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-6.7.2.jar:6.7.2] ... 6 more

J. Scott Elblein
  • 4,013
  • 15
  • 58
  • 94
Akash Roy
  • 398
  • 5
  • 11

3 Answers3

18

Go to the ElasticSearch directory:

C:\elasticsearch-6.7.2\config

Put the below Entry in your elasticsearch.yml:

xpack.ml.enabled: false

J. Scott Elblein
  • 4,013
  • 15
  • 58
  • 94
Akash Roy
  • 398
  • 5
  • 11
5

The error message is pretty straight-forward. X-Pack is not supporting and Machine Learning is not available for windows-x86, so it is not compatible with your operating system.

The reason is that 32-bit architectures are not supported. If you happen to have a 64-bit system OS, then something else makes it think that you are using a 32-bit environment. Check your JVM and see whether it is 32-bit or not. If it's 32 bit, then that's the problem.

It can also be caused by an unsupported CPU as per the following warning from elasticsearch docs. In this case, you can disable the option by adding xpack.ml.enabled: false to elasticsearch.yml. enter image description here

Mitch
  • 1,556
  • 1
  • 17
  • 17
Lajos Arpad
  • 64,414
  • 37
  • 100
  • 175
  • Thankful for the insights , but i just resolved the issue by disabling ML – Akash Roy May 14 '19 at 09:21
  • @AkashRoy that's a solution if and only if you do not want to use Machine Learning. If you do not want to restrict yourself, you can make sure that it's a 64-bit env. – Lajos Arpad May 14 '19 at 11:00
  • What is the likely course if `java --version` has the following output? ```openjdk 11.0.11 2021-04-20 OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04) OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)``` – Mitch Aug 25 '21 at 08:52
0

Logs which I have got:

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].]

Tested on the given combination:

  • macOS: Catalina, Version: 10.15.4
  • Java Version: 11.0.4
  • ElasticVersion: 7.6.2

The possible workaround is by setting x-pack-ml.enabled: false, in the elasticsearch.yml file.

For more detail click here

Keshav Lodhi
  • 2,641
  • 2
  • 17
  • 23