Linux OS : Failed to create native process factories for Machine Learning

I've installed X-Pack plugin for elastic search.
When I try to start the elastic search, I'm getting the below exception.
I'm using it in linux OS.
Please help me solving it

[2018-06-06T10:09:54,757][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: ElasticsearchException[Failed to create native process factories for Machine Learning]; nested: FileNotFoundException[/tmp/elasticsearch/controller_log_24991 (No such file or directory)];
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:125) ~[elasticsearch-6.2.3.jar:6.2.3]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) ~[elasticsearch-6.2.3.jar:6.2.3]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-6.2.3.jar:6.2.3]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-6.2.3.jar:6.2.3]
at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-6.2.3.jar:6.2.3]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-6.2.3.jar:6.2.3]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85) ~[elasticsearch-6.2.3.jar:6.2.3]
Caused by: org.elasticsearch.ElasticsearchException: Failed to create native process factories for Machine Learning
at org.elasticsearch.xpack.ml.MachineLearning.createComponents(MachineLearning.java:422) ~[?:?]
at org.elasticsearch.xpack.ml.MachineLearning.createComponents(MachineLearning.java:373) ~[?:?]
at org.elasticsearch.node.Node.lambda$new$7(Node.java:397) ~[elasticsearch-6.2.3.jar:6.2.3]
at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:267) ~[?:1.8.0_161]
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) ~[?:1.8.0_161]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[?:1.8.0_161]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[?:1.8.0_161]
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:1.8.0_161]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_161]
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[?:1.8.0_161]
at org.elasticsearch.node.Node.(Node.java:400) ~[elasticsearch-6.2.3.jar:6.2.3]
at org.elasticsearch.node.Node.(Node.java:246) ~[elasticsearch-6.2.3.jar:6.2.3]
at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:213) ~[elasticsearch-6.2.3.jar:6.2.3]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:213) ~[elasticsearch-6.2.3.jar:6.2.3]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:323) ~[elasticsearch-6.2.3.jar:6.2.3]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) ~[elasticsearch-6.2.3.jar:6.2.3]
... 6 more
Caused by: java.io.FileNotFoundException: /tmp/elasticsearch/controller_log_24991 (No such file or directory)
at java.io.FileInputStream.open0(Native Method) ~[?:1.8.0_161]
at java.io.FileInputStream.open(FileInputStream.java:195) ~[?:1.8.0_161]
at java.io.FileInputStream.(FileInputStream.java:138) ~[?:1.8.0_161]
at java.io.FileInputStream.(FileInputStream.java:93) ~[?:1.8.0_161]
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_161]
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:66) ~[?:?]
at org.elasticsearch.xpack.ml.job.process.NativeControllerHolder.getNativeController(NativeControllerHolder.java:49) ~[?:?]
at org.elasticsearch.xpack.ml.MachineLearning.createComponents(MachineLearning.java:412) ~[?:?]
at org.elasticsearch.xpack.ml.MachineLearning.createComponents(MachineLearning.java:373) ~[?:?]
at org.elasticsearch.node.Node.lambda$new$7(Node.java:397) ~[elasticsearch-6.2.3.jar:6.2.3]
at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:267) ~[?:1.8.0_161]
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) ~[?:1.8.0_161]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[?:1.8.0_161]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[?:1.8.0_161]
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:1.8.0_161]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_161]
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[?:1.8.0_161]
at org.elasticsearch.node.Node.(Node.java:400) ~[elasticsearch-6.2.3.jar:6.2.3]
at org.elasticsearch.node.Node.(Node.java:246) ~[elasticsearch-6.2.3.jar:6.2.3]
at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:213) ~[elasticsearch-6.2.3.jar:6.2.3]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:213) ~[elasticsearch-6.2.3.jar:6.2.3]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:323) ~[elasticsearch-6.2.3.jar:6.2.3]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) ~[elasticsearch-6.2.3.jar:6.2.3]
... 6 more

Hi

FileNotFoundException[/tmp/elasticsearch/controller_log_24991 (No such file or directory)];

Can you check if the directory /tmp/elasticsearch exists please. The user who you run elasticsearch as should have read, write and execute permission on that directory (mode 700), creating that directory may well solve your problem. Alternatively you can change the temporary directory elasticsearch uses by exporting the ES_TMPDIR variable before staring elasticsearch

export ES_TMPDIR=/my/temp/dir

I'd like to understand how this error happened. Which version of Linux and Elasticsearch are you using? Was elasticsearch running successfully before you installed x-pack?

Thanks

Hi David,

Yes the folder '/tmp/elasticsearch' exists and the user has permissions to write and read.
I'm using Elastisearch 6.2.3 and X-pack 6.2.3.
Linux version is Red Hat Enterprise Linux Server release 5.11 (Tikanga).

After adding the 'xpack.ml.enabled: false' in elasticsearch.yml then it's working fine.

But I got to know that above line will disable x-pack machine learning.

Can you please help me know whats causing this issue/

Thanks,
Bharath

Linux version is Red Hat Enterprise Linux Server release 5.11 (Tikanga).

RHEL 5 is quite old now and uses kernel version 2.6 I suspect the reason for the error is due to the version of Linux you are using. Is there any particular reason you are using it?

Elasticsearch is officially supported on RHEL 6 & 7 and many other distributions but not on RHEL 5. See the support matrix for details I recommend one of the supported Linux's.

1 Like

Thanks for the reply Kyle,

The linux environment was provided by my client. This is an old project, we have not upgraded our environments since the start of the project.

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