# FileAlreadyExistsException .es\_temp\_file

**URL:** https://discuss.elastic.co/t/filealreadyexistsexception-es-temp-file/104719
**Category:** Elasticsearch
**Created:** [October 20, 2017, 2:30pm UTC](https://discuss.elastic.co/t/filealreadyexistsexception-es-temp-file/104719 "2017-10-20T14:30:51Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![vsevolodk](https://avatars.discourse-cdn.com/v4/letter/v/34f0e0/32.png) [@vsevolodk](https://discuss.elastic.co/u/vsevolodk)
#### Post date: [October 20, 2017, 2:30pm UTC](https://discuss.elastic.co/t/filealreadyexistsexception-es-temp-file/104719/1 "2017-10-20T14:30:51Z")

</div>

Hi.  
I have elasticsearch 5.1.2 and I faced with

```auto
Caused by: java.nio.file.FileAlreadyExistsException: /usr/share/elasticsearch/data/nodes/0/indices/K1KZ1kgpRTCczI5rm03Q1g/1/.es_temp_file
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:88) ~[?:?]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[?:?]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[?:?]
at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214) ~[?:?]
at java.nio.file.Files.newByteChannel(Files.java:361) ~[?:1.8.0_111]
at java.nio.file.Files.createFile(Files.java:632) ~[?:1.8.0_111]
at org.elasticsearch.env.NodeEnvironment.tryWriteTempFile(NodeEnvironment.java:1033) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.env.NodeEnvironment.assertCanWrite(NodeEnvironment.java:1020) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:276) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.node.Node.<init>(Node.java:249) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.node.Node.<init>(Node.java:229) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Bootstrap$6.<init>(Bootstrap.java:214) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:214) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:306) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) ~[elasticsearch-5.1.2.jar:5.1.2]

```

Also I found known issue which was fixed in 5.1.1

> <https://github.com/elastic/elasticsearch/pull/21007>

  
Please tell me what issue can be else in my case?

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [October 20, 2017, 3:14pm UTC](https://discuss.elastic.co/t/filealreadyexistsexception-es-temp-file/104719/2 "2017-10-20T15:14:35Z")

</div>

I think this has been fixed in 5.6.0 with

> <https://github.com/elastic/elasticsearch/pull/21210>

---

<div class="post-metadata">

### Author: ![vsevolodk](https://avatars.discourse-cdn.com/v4/letter/v/34f0e0/32.png) [@vsevolodk](https://discuss.elastic.co/u/vsevolodk)
#### Post date: [October 21, 2017, 5:27pm UTC](https://discuss.elastic.co/t/filealreadyexistsexception-es-temp-file/104719/3 "2017-10-21T17:27:39Z")

</div>

I read not attentively history of first MR.  
Thank you for information

---

<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: [November 18, 2017, 5:27pm UTC](https://discuss.elastic.co/t/filealreadyexistsexception-es-temp-file/104719/4 "2017-11-18T17:27:49Z")

</div>

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