ElasticsearchException[Failed to create native process factories for Machine Learning]; nested: FileNotFoundException[/tmp/controller_log_13 (No such file or directory)];

Hi

I am testing 5.4.0 with x-pack on Alpine 3.5 in kubernetes land 1.6.

2our Java is oracle jre 8u121 (not using openjdk .

We mostly use https://github.com/pires/docker-elasticsearch/blob/master/Dockerfile except we're using Oracle JRE 8u121, ( not openjdk8-jre per https://github.com/pires/docker-jre/blob/master/Dockerfile)

Here is the error I get - Anyone knows the root cause of this?
Accessorily we're planning on using 5.1.1 for production but this is not tested yet... Thks!

$ kubectl logs es-client-798425435-lvr45
[2017-05-17T01:33:58,927][INFO ][o.e.n.Node ] [es-client-798425435-lvr45] initializing ...
[2017-05-17T01:33:58,996][INFO ][o.e.e.NodeEnvironment ] [es-client-798425435-lvr45] using [1] data paths, mounts [[/data (/dev/sda1)]], net usable_space [89gb], net total_space [94.3gb], spins? [possibly], types [ext4]
[2017-05-17T01:33:58,997][INFO ][o.e.e.NodeEnvironment ] [es-client-798425435-lvr45] heap size [247.5mb], compressed ordinary object pointers [true]
[2017-05-17T01:33:58,998][INFO ][o.e.n.Node ] [es-client-798425435-lvr45] node name [es-client-798425435-lvr45], node ID [VAptWx1XRZ2kwkvSmiNGRA]
[2017-05-17T01:33:58,998][INFO ][o.e.n.Node ] [es-client-798425435-lvr45] version[5.4.0], pid[13], build[780f8c4/2017-04-28T17:43:27.229Z], OS[Linux/4.4.35+/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_121/25.121-b13]
[2017-05-17T01:34:00,296][INFO ][o.e.p.PluginsService ] [es-client-798425435-lvr45] loaded module [aggs-matrix-stats]
[2017-05-17T01:34:00,297][INFO ][o.e.p.PluginsService ] [es-client-798425435-lvr45] loaded module [ingest-common]
[2017-05-17T01:34:00,297][INFO ][o.e.p.PluginsService ] [es-client-798425435-lvr45] loaded module [lang-expression]
[2017-05-17T01:34:00,297][INFO ][o.e.p.PluginsService ] [es-client-798425435-lvr45] loaded module [lang-groovy]
[2017-05-17T01:34:00,297][INFO ][o.e.p.PluginsService ] [es-client-798425435-lvr45] loaded module [lang-mustache]
[2017-05-17T01:34:00,297][INFO ][o.e.p.PluginsService ] [es-client-798425435-lvr45] loaded module [lang-painless]
[2017-05-17T01:34:00,297][INFO ][o.e.p.PluginsService ] [es-client-798425435-lvr45] loaded module [percolator]
[2017-05-17T01:34:00,297][INFO ][o.e.p.PluginsService ] [es-client-798425435-lvr45] loaded module [reindex]
[2017-05-17T01:34:00,297][INFO ][o.e.p.PluginsService ] [es-client-798425435-lvr45] loaded module [transport-netty3]
[2017-05-17T01:34:00,297][INFO ][o.e.p.PluginsService ] [es-client-798425435-lvr45] loaded module [transport-netty4]
[2017-05-17T01:34:00,297][INFO ][o.e.p.PluginsService ] [es-client-798425435-lvr45] loaded plugin [x-pack]
[2017-05-17T01:34:12,331][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [es-client-798425435-lvr45] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: ElasticsearchException[Failed to create native process factories for Machine Learning]; nested: FileNotFoundException[/tmp/controller_log_13 (No such file or directory)];
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:127) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:114) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:67) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.cli.Command.main(Command.java:88) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) ~[elasticsearch-5.4.0.jar:5.4.0]
Caused by: org.elasticsearch.ElasticsearchException: Failed to create native process factories for Machine Learning
at org.elasticsearch.xpack.ml.MachineLearning.createComponents(MachineLearning.java:297) ~[?:?]
at org.elasticsearch.xpack.XPackPlugin.createComponents(XPackPlugin.java:288) ~[?:?]
at org.elasticsearch.node.Node.lambda$new$7(Node.java:410) ~[elasticsearch-5.4.0.jar:5.4.0]
at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:267) ~[?:1.8.0_121]
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374) ~[?:1.8.0_121]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[?:1.8.0_121]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[?:1.8.0_121]
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:1.8.0_121]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_121]
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[?:1.8.0_121]
at org.elasticsearch.node.Node.(Node.java:412) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.node.Node.(Node.java:242) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.bootstrap.Bootstrap$6.(Bootstrap.java:242) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:242) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:360) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:123) ~[elasticsearch-5.4.0.jar:5.4.0]
... 6 more
Caused by: java.io.FileNotFoundException: /tmp/controller_log_13 (No such file or directory)
at java.io.FileInputStream.open0(Native Method) ~[?:1.8.0_121]
at java.io.FileInputStream.open(FileInputStream.java:195) ~[?:1.8.0_121]
at java.io.FileInputStream.(FileInputStream.java:138) ~[?:1.8.0_121]
at java.io.FileInputStream.(FileInputStream.java:93) ~[?:1.8.0_121]
at org.elasticsearch.xpack.ml.utils.NamedPipeHelper$PrivilegedInputPipeOpener.run(NamedPipeHelper.java:297) ~[?:?]
at org.elasticsearch.xpack.ml.utils.NamedPipeHelper$PrivilegedInputPipeOpener.run(NamedPipeHelper.java:286) ~[?:?]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_121]
at org.elasticsearch.xpack.ml.utils.NamedPipeHelper.openNamedPipeInputStream(NamedPipeHelper.java:139) ~[?:?]
at org.elasticsearch.xpack.ml.utils.NamedPipeHelper.openNamedPipeInputStream(NamedPipeHelper.java:106) ~[?:?]
at org.elasticsearch.xpack.ml.job.process.ProcessPipes.connectStreams(ProcessPipes.java:140) ~[?:?]
at org.elasticsearch.xpack.ml.job.process.NativeController.(NativeController.java:65) ~[?:?]
at

Hi patM

Machine Learning in X-Pack is not compatible with Alpine Linux due to the musl implementation of libc. Alpine Linux is not a supported OS: https://www.elastic.co/support/matrix .

I recommend you use the official Centos 7 based docker image

THks dkyle, I actually could install it on Alpine 3.5

@patM I'm getting the same error while trying to use x-pack on NixOS. How did you solve it?

For Alpine, you'll need to build and install glibc from sources as alpine is not suppoting glibc package officially.
check https://github.com/adewynter/GlibcBuilder

Example Docker file for our oracle/jre image, one which ES can run ok

Docker File

FROM any-repo-with-alpine:3.5

Defining environment variables

ENV DEBIAN_FRONTEND noninteractive

JDK version

ENV VERSION 8
ENV UPDATE 131
ENV BUILD 1
ENV GLIBC_VERSION 2.25

Setting JAVA and JRE home

ENV JAVA_DIR /usr/lib/jvm/java-${VERSION}-oracle
ENV JAVA_HOME ${JAVA_DIR}/jre
ENV JRE_HOME ${JAVA_DIR}/jre
ENV PATH=${PATH}:/usr/lib/jvm/java-${VERSION}-oracle/jre/bin

Install build requirements

RUN apk add --update libstdc++ ca-certificates bash openssl curl

Download and extract glibc binary

RUN curl --silent --location --retry 3
http://PATH-TO/glibc-bin-"${GLIBC_VERSION}".tar.gz |
tar xz -C / &&
( /usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 C.UTF-8 || true ) &&
echo "export LANG=C.UTF-8" > /etc/profile.d/locale.sh &&
/usr/glibc-compat/sbin/ldconfig /lib /usr/glibc-compat/lib

Download and extract JRE8

RUN curl --silent --location --retry 3
http://PATH-TO/jre"${VERSION}"/jre-"${VERSION}"u"${UPDATE}"-linux-x64.tar.gz |
tar xz -C /tmp &&
mkdir -p ${JAVA_DIR} && mv /tmp/jre1.${VERSION}.0_${UPDATE} "${JRE_HOME}" && mv ${JRE_HOME}/man ${JAVA_DIR}

Hope this helps

I'll try it out! Thanks for the help!

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