# ML job error : Failed to launch autodetect for job

**URL:** <https://discuss.elastic.co/t/ml-job-error-failed-to-launch-autodetect-for-job/260243>\
**Category:** Kibana\
**Tags:** elastic-stack-machine-learning\
**Created:** [January 5, 2021, 4:49pm UTC](https://discuss.elastic.co/t/ml-job-error-failed-to-launch-autodetect-for-job/260243 "2021-01-05T16:49:41Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![kimi89](https://avatars.discourse-cdn.com/v4/letter/k/e480ec/32.png) [@kimi89](https://discuss.elastic.co/u/kimi89)\
**Post date:** [January 5, 2021, 4:49pm UTC](https://discuss.elastic.co/t/ml-job-error-failed-to-launch-autodetect-for-job/260243/1 "2021-01-05T16:49:41Z")

</div>

Unexpected job state [failed] while waiting for job to be opened

Error Log: " Failed to launch autodetect for job jobname"

---

<div class="post-metadata">

**Author:** ![poff](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/poff/32/81795_2.png) [@poff](https://discuss.elastic.co/u/poff)\
**Post date:** [January 5, 2021, 8:38pm UTC](https://discuss.elastic.co/t/ml-job-error-failed-to-launch-autodetect-for-job/260243/2 "2021-01-05T20:38:10Z")

</div>

Hey there! Would you mind providing some more info about the job that's failing? Also, is there any additional output preceding the error in the error log?

---

<div class="post-metadata">

**Author:** ![richcollier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richcollier/32/115035_2.png) [@richcollier](https://discuss.elastic.co/u/richcollier)\
**Post date:** [January 5, 2021, 10:27pm UTC](https://discuss.elastic.co/t/ml-job-error-failed-to-launch-autodetect-for-job/260243/3 "2021-01-05T22:27:14Z")

</div>

Also would be helpful if you were to tell us which version being used and if on cloud, ECE, or standalone nodes.

---

<div class="post-metadata">

**Author:** ![kimi89](https://avatars.discourse-cdn.com/v4/letter/k/e480ec/32.png) [@kimi89](https://discuss.elastic.co/u/kimi89)\
**Post date:** [January 6, 2021, 5:30pm UTC](https://discuss.elastic.co/t/ml-job-error-failed-to-launch-autodetect-for-job/260243/4 "2021-01-06T17:30:37Z")

</div>

org.elasticsearch.ElasticsearchException: Failed to launch autodetect for job JOB\_NAME  
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:532) ~[?:?]  
at org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcessManager.createProcessAndSetRunning(AutodetectProcessManager.java:483) ~[?:?]  
at org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcessManager.access$200(AutodetectProcessManager.java:93) ~[?:?]  
at org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcessManager$2.doRun(AutodetectProcessManager.java:404) ~[?:?]  
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:737) [elasticsearch-7.9.2.jar:7.9.2]  
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-7.9.2.jar:7.9.2]  
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.nio.file.NoSuchFileException: /tmp/elasticsearch-18369412143464210290/limitconfig2690026431943845912.conf  
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:92) ~[?:?]  
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) ~[?:?]  
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?]  
at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:218) ~[?:?]  
at java.nio.file.Files.newByteChannel(Files.java:375) ~[?:?]  
at java.nio.file.Files.createFile(Files.java:652) ~[?:?]  
at java.nio.file.TempFileHelper.create(TempFileHelper.java:137) ~[?:?]  
at java.nio.file.TempFileHelper.createTempFile(TempFileHelper.java:160) ~[?:?]  
at java.nio.file.Files.createTempFile(Files.java:872) ~[?:?]  
at org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectBuilder.buildLimits(AutodetectBuilder.java:271) ~[?:?]  
at org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectBuilder.build(AutodetectBuilder.java:176) ~[?:?]  
at org.elasticsearch.xpack.ml.job.process.autodetect.NativeAutodetectProcessFactory.createNativeProcess(NativeAutodetectProcessFactory.java:129) ~[?:?]

---

<div class="post-metadata">

**Author:** ![kimi89](https://avatars.discourse-cdn.com/v4/letter/k/e480ec/32.png) [@kimi89](https://discuss.elastic.co/u/kimi89)\
**Post date:** [January 6, 2021, 9:17pm UTC](https://discuss.elastic.co/t/ml-job-error-failed-to-launch-autodetect-for-job/260243/5 "2021-01-06T21:17:11Z")

</div>

version : 7.9.2  
standalone nodes

---

<div class="post-metadata">

**Author:** ![kimi89](https://avatars.discourse-cdn.com/v4/letter/k/e480ec/32.png) [@kimi89](https://discuss.elastic.co/u/kimi89)\
**Post date:** [January 6, 2021, 9:18pm UTC](https://discuss.elastic.co/t/ml-job-error-failed-to-launch-autodetect-for-job/260243/6 "2021-01-06T21:18:00Z")

</div>

org.elasticsearch.ElasticsearchException: Failed to launch autodetect for job JOB\_NAME  
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:532) ~[?:?]  
at org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcessManager.createProcessAndSetRunning(AutodetectProcessManager.java:483) ~[?:?]  
at org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcessManager.access$200(AutodetectProcessManager.java:93) ~[?:?]  
at org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcessManager$2.doRun(AutodetectProcessManager.java:404) ~[?:?]  
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:737) [elasticsearch-7.9.2.jar:7.9.2]  
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-7.9.2.jar:7.9.2]  
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.nio.file.NoSuchFileException: /tmp/elasticsearch-18369412143464210290/limitconfig2690026431943845912.conf  
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:92) ~[?:?]  
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) ~[?:?]  
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?]  
at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:218) ~[?:?]  
at java.nio.file.Files.newByteChannel(Files.java:375) ~[?:?]  
at java.nio.file.Files.createFile(Files.java:652) ~[?:?]  
at java.nio.file.TempFileHelper.create(TempFileHelper.java:137) ~[?:?]  
at java.nio.file.TempFileHelper.createTempFile(TempFileHelper.java:160) ~[?:?]  
at java.nio.file.Files.createTempFile(Files.java:872) ~[?:?]  
at org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectBuilder.buildLimits(AutodetectBuilder.java:271) ~[?:?]  
at org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectBuilder.build(AutodetectBuilder.java:176) ~[?:?]  
at org.elasticsearch.xpack.ml.job.process.autodetect.NativeAutodetectProcessFactory.createNativeProcess(NativeAutodetectProcessFactory.java:129) ~[?:?]

---

<div class="post-metadata">

**Author:** ![richcollier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richcollier/32/115035_2.png) [@richcollier](https://discuss.elastic.co/u/richcollier)\
**Post date:** [January 6, 2021, 9:30pm UTC](https://discuss.elastic.co/t/ml-job-error-failed-to-launch-autodetect-for-job/260243/7 "2021-01-06T21:30:00Z")

</div>

Please see this for the possible solution:

> [@Machine Learning: Could not create job](https://discuss.elastic.co/t/machine-learning-could-not-create-job/122037/4):
>
> Communications between the elasticsearch JVM and the autodetect process (which ML runs) is done via named pipes, these pipes are created in /tmp. In the log there is a message that you posted, it mentions that a file in ES\_HOME/tmp cannot be read. This /tmp directory must be readable, if it is mounted with no\_exec then autodetect cannot start. /tmp is the default temporary directory the JVM uses but you can change this with the JVM option: -Djava.io.tmpdir=/var/data/elasticsearch/tmp You cou…

---

<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:** [February 3, 2021, 9:30pm UTC](https://discuss.elastic.co/t/ml-job-error-failed-to-launch-autodetect-for-job/260243/8 "2021-02-03T21:30:08Z")

</div>

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