# ML problem

**URL:** <https://discuss.elastic.co/t/ml-problem/321144>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-machine-learning\
**Created:** [December 13, 2022, 3:47pm UTC](https://discuss.elastic.co/t/ml-problem/321144 "2022-12-13T15:47:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alvaro\_ing](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alvaro_ing/32/98571_2.png) [@alvaro\_ing](https://discuss.elastic.co/u/alvaro_ing)\
**Post date:** [December 13, 2022, 3:47pm UTC](https://discuss.elastic.co/t/ml-problem/321144/1 "2022-12-13T15:47:45Z")

</div>

When I try to run an anomaly detection job in elastic I get an error and it does not execute me. The error I get in the elastic console is this:

[2022-12-13T16:30:18,711][WARN][o.e.p.PersistentTasksClusterService] [alvaro-virtual-machine] persistent task job-prueba\_job failed  
org.elasticsearch.ElasticsearchException: Failed to launch autodetect for job prueba\_job  
at org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper.serverError(ExceptionsHelper.java:55) ~[?:?]  
at org.elasticsearch.xpack.ml.job.process.autodetect.NativeAutodetectProcessFactory.createNativeProcess(NativeAutodetectProcessFactory.java:133) ~[?:?]  
at org.elasticsearch.xpack.ml.job.process.autodetect.NativeAutodetectProcessFactory.createAutodetectProcess(NativeAutodetectProcessFactory.java:82) ~[?:?]  
at org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcessManager.create(AutodetectProcessManager.java:519) ~[?:?]  
at org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcessManager.createProcessAndSetRunning(AutodetectProcessManager.java:470) ~[?:?]  
at org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcessManager.access$200(AutodetectProcessManager.java:92) ~[?:?]  
at org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcessManager$2.doRun(AutodetectProcessManager.java:403) ~[?:?]  
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:695) [elasticsearch-7.8.1.jar:7.8.1]  
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-7.8.1.jar:7.8.1]  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) [?:?]  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) [?:?]  
at java.lang.Thread.run(Thread.java:832) [?:?]  
Caused by: java.io.FileNotFoundException: Cannot open /tmp/elasticsearch-751926434050238478/autodetect\_prueba\_job\_input\_2417 (No such file or directory)  
at org.elasticsearch.xpack.ml.utils.NamedPipeHelper.openNamedPipeOutputStreamUnix(NamedPipeHelper.java:249) ~[?:?]  
at org.elasticsearch.xpack.ml.utils.NamedPipeHelper.openNamedPipeOutputStream(NamedPipeHelper.java:174) ~[?:?]  
at org.elasticsearch.xpack.ml.utils.NamedPipeHelper.openNamedPipeOutputStream(NamedPipeHelper.java:160) ~[?:?]  
at org.elasticsearch.xpack.ml.process.ProcessPipes.connectStreams(ProcessPipes.java:138) ~[?:?]  
at org.elasticsearch.xpack.ml.job.process.autodetect.NativeAutodetectProcessFactory.createNativeProcess(NativeAutodetectProcessFactory.java:129) ~[?:?]  
... 10 more

---

<div class="post-metadata">

**Author:** ![droberts195](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/droberts195/32/17692_2.png) [@droberts195](https://discuss.elastic.co/u/droberts195)\
**Post date:** [December 13, 2022, 4:04pm UTC](https://discuss.elastic.co/t/ml-problem/321144/2 "2022-12-13T16:04:05Z")

</div>

Does the following directory exist on your machine?

> [@alvaro\_ing](#):
>
> `/tmp/elasticsearch-751926434050238478`

If it doesn't then please create it, making sure it's owned and writable by the user that Elasticsearch is running as.

The docs on how to prevent this issue happening again are in [Temp directory | Elasticsearch Guide [7.8] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.8/es-tmpdir.html).

---

<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:** [January 10, 2023, 4:04pm UTC](https://discuss.elastic.co/t/ml-problem/321144/3 "2023-01-10T16:04:33Z")

</div>

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