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

**URL:** <https://discuss.elastic.co/t/elasticsearchexception-failed-to-create-native-process-factories-for-machine-learning-nested-filenotfoundexception-tmp-controller-log-13-no-such-file-or-directory/86157>\
**Category:** Elasticsearch\
**Created:** [May 17, 2017, 5:58pm UTC](https://discuss.elastic.co/t/elasticsearchexception-failed-to-create-native-process-factories-for-machine-learning-nested-filenotfoundexception-tmp-controller-log-13-no-such-file-or-directory/86157 "2017-05-17T17:58:55Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![patM](https://avatars.discourse-cdn.com/v4/letter/p/9d8465/32.png) [@patM](https://discuss.elastic.co/u/patM)\
**Post date:** [May 17, 2017, 5:58pm UTC](https://discuss.elastic.co/t/elasticsearchexception-failed-to-create-native-process-factories-for-machine-learning-nested-filenotfoundexception-tmp-controller-log-13-no-such-file-or-directory/86157/1 "2017-05-17T17:58:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dkyle](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dkyle/32/59114_2.png) [@dkyle](https://discuss.elastic.co/u/dkyle)\
**Post date:** [May 18, 2017, 8:54am UTC](https://discuss.elastic.co/t/elasticsearchexception-failed-to-create-native-process-factories-for-machine-learning-nested-filenotfoundexception-tmp-controller-log-13-no-such-file-or-directory/86157/2 "2017-05-18T08:54:01Z")

</div>

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](https://www.elastic.co/support/matrix) .

I recommend you use the official Centos 7 based [docker image](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html)

---

<div class="post-metadata">

**Author:** ![patM](https://avatars.discourse-cdn.com/v4/letter/p/9d8465/32.png) [@patM](https://discuss.elastic.co/u/patM)\
**Post date:** [May 31, 2017, 10:26pm UTC](https://discuss.elastic.co/t/elasticsearchexception-failed-to-create-native-process-factories-for-machine-learning-nested-filenotfoundexception-tmp-controller-log-13-no-such-file-or-directory/86157/3 "2017-05-31T22:26:45Z")

</div>

THks dkyle, I actually could install it on Alpine 3.5

---

<div class="post-metadata">

**Author:** ![Falco\_Peijnenburg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/falco_peijnenburg/32/19350_2.png) [@Falco\_Peijnenburg](https://discuss.elastic.co/u/Falco_Peijnenburg)\
**Post date:** [June 21, 2017, 10:04am UTC](https://discuss.elastic.co/t/elasticsearchexception-failed-to-create-native-process-factories-for-machine-learning-nested-filenotfoundexception-tmp-controller-log-13-no-such-file-or-directory/86157/4 "2017-06-21T10:04:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![patM](https://avatars.discourse-cdn.com/v4/letter/p/9d8465/32.png) [@patM](https://discuss.elastic.co/u/patM)\
**Post date:** [June 21, 2017, 11:42pm UTC](https://discuss.elastic.co/t/elasticsearchexception-failed-to-create-native-process-factories-for-machine-learning-nested-filenotfoundexception-tmp-controller-log-13-no-such-file-or-directory/86157/5 "2017-06-21T23:42:41Z")

</div>

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](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](http://PATH-TO/glibc-bin-%22$%7BGLIBC_VERSION%7D%22.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](http://PATH-TO/jre%22$%7BVERSION%7D%22/jre-%22$%7BVERSION%7D%22u%22$%7BUPDATE%7D%22-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

---

<div class="post-metadata">

**Author:** ![Falco\_Peijnenburg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/falco_peijnenburg/32/19350_2.png) [@Falco\_Peijnenburg](https://discuss.elastic.co/u/Falco_Peijnenburg)\
**Post date:** [June 22, 2017, 7:32am UTC](https://discuss.elastic.co/t/elasticsearchexception-failed-to-create-native-process-factories-for-machine-learning-nested-filenotfoundexception-tmp-controller-log-13-no-such-file-or-directory/86157/6 "2017-06-22T07:32:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 20, 2017, 7:33am UTC](https://discuss.elastic.co/t/elasticsearchexception-failed-to-create-native-process-factories-for-machine-learning-nested-filenotfoundexception-tmp-controller-log-13-no-such-file-or-directory/86157/7 "2017-07-20T07:33:04Z")

</div>

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