Failed to start elasticsearch 7.16.2 after upgrade from 6.8.8

hi, i'm new at ELK, i installed the Elasticsearch version 7.16.2 on centos 8 but i get this error so i disabled machine learning functionality with(xpack.ml.enabled: false)

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:845) ~[?:?]
        at org.elasticsearch.node.Node.lambda$new$18(Node.java:733) ~[elasticsearch-7.16.2.jar:7.16.2]
        at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:273) ~[?:?]
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) ~[?:?]
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) ~[?:?]
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
        at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[?:?]
        at org.elasticsearch.node.Node.<init>(Node.java:747) ~[elasticsearch-7.16.2.jar:7.16.2]
        at org.elasticsearch.node.Node.<init>(Node.java:309) ~[elasticsearch-7.16.2.jar:7.16.2]
        at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:234) ~[elasticsearch-7.16.2.jar:7.16.2]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:234) ~[elasticsearch-7.16.2.jar:7.16.2]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:434) [elasticsearch-7.16.2.jar:7.16.2]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:166) [elasticsearch-7.16.2.jar:7.16.2]
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:157) [elasticsearch-7.16.2.jar:7.16.2]
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77) [elasticsearch-7.16.2.jar:7.16.2]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112) [elasticsearch-cli-7.16.2.jar:7.16.2]
        at org.elasticsearch.cli.Command.main(Command.java:77) [elasticsearch-cli-7.16.2.jar:7.16.2]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:122) [elasticsearch-7.16.2.jar:7.16.2]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:80) [elasticsearch-7.16.2.jar:7.16.2]

after changing the Elasticsearch.yml file i get another error
I try running the controller process separately to Elasticsearch with
/usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/bin/controller --version

i get this on output

~]$ /usr/share/Elasticsearch/modules/x-pack-ml/platform/linux-x86_64/bin/controller --version

si_signo 4, si_code: 2, si_errno: 0, address: 0x7f76f5f252f8, library: /usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/bin/../lib/libMlCore.so, base: 0x7f76f5e01000, normalized address: 0x1242f8
Illegal instruction (core dumped)
 Process 505971 (controller) of user 1001 dumped core.

                                                       Stack trace of thread 505971:
                                                       #0  0x00007fe53af61c6f raise (libpthread.so.0)
                                                       #1  0x00007fe53a992f00 _ZN2ml4core12crashHandlerEiP7siginfoPv (libMlCore.so)
                                                       #2  0x00007fe53af61dd0 __restore_rt (libpthread.so.0)
                                                       #3  0x00007fe53aa352f8 _ZN2ml4core7CLoggerC2Ev (libMlCore.so)
                                                       #4  0x00007fe53aa35654 _ZN2ml4core7CLogger8instanceEv (libMlCore.so)
                                                       #5  0x00007fe53a98c039 n/a (libMlCore.so)
                                                       #6  0x00007fe53b17eeca call_init.part.0 (ld-linux-x86-64.so.2)
                                                       #7  0x00007fe53b17efca _dl_init (ld-linux-x86-64.so.2)
                                                       #8  0x00007fe53b17008a _dl_start_user (ld-linux-x86-64.so.2)

what i should do how i can fix this? i try to much but i didn't get any solution. Thanks ALL
Elastic version
7.16.2
Java version
$ java --version
openjdk 14.0.2 2020-07-14
OpenJDK Runtime Environment (build 14.0.2+12-46)
OpenJDK 64-Bit Server VM (build 14.0.2+12-46, mixed mode, sharing)
OS version
$ cat /etc/centos-release
CentOS Linux release 8.2.2004 (Core)

We use SSE4.2 instructions in ML. Does your machine have these? You can tell from the flags list in the output of cat /proc/cpuinfo. If the list includes sse4_2 then the problem is something else, but if sse4_2 is not in the list then that's the reason.

The list doesn't includes sse4_2 instead i have sse4e, is not the same ?
what to do then ? thank you

flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid pni cx16 x2apic popcnt hypervisor lahf_lm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw vmmcall

It means either you need to run on a newer machine or leave ML disabled.

This is in the docs for version 7: Machine learning limitations | Machine Learning in the Elastic Stack [7.0] | Elastic

There's list of processors that have SSE4.2 instructions here: SSE4 - Wikipedia

Roughly speaking, any Intel CPU from the last 12 years will have it. For AMD you'd need a processor from about the last 8 years.

4 Likes

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