# \_\_es\_\_.tmp

**URL:** <https://discuss.elastic.co/t/--es---tmp/50751>\
**Category:** Elasticsearch\
**Created:** [May 23, 2016, 6:15pm UTC](https://discuss.elastic.co/t/--es---tmp/50751 "2016-05-23T18:15:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michael1/32/29279_2.png) [@Michael1](https://discuss.elastic.co/u/Michael1)\
**Post date:** [May 23, 2016, 6:15pm UTC](https://discuss.elastic.co/t/--es---tmp/50751/1 "2016-05-23T18:15:48Z")

</div>

Quite often I notice 'Service Unavailable' for Elasticsearch when accessing Kibana. I SSH into all of the nodes and start investigating logs.

Most frequently, it is a result of this file " **es**.tmp"

The error in the logs is as follows ::

Exception in thread "main" java.nio.file.FileAlreadyExistsException: /data/elasticsearch\_data/TrainingProd/nodes/0/ **es**.tmp  
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)  
at java.nio.file.Files.createFile(Files.java:632)  
at org.elasticsearch.env.NodeEnvironment.ensureAtomicMoveSupported(NodeEnvironment.java:794)  
at org.elasticsearch.gateway.GatewayMetaState.(GatewayMetaState.java:82)  
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)  
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)  
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)  
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)  
at \<\<\>\>  
at org.elasticsearch.node.Node.(Node.java:200)  
at org.elasticsearch.node.Node.(Node.java:128)  
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:145)  
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:178)  
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:285)  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)

To fix this, I have to rename that file to something else, such as adding .old to the end. Then I restart Elasticsearch and the stack is fine again and accessible.

Does anyone know anything about this?? Is this a known ES bug?

Version of ES :: 2.2.1

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [May 24, 2016, 10:51am UTC](https://discuss.elastic.co/t/--es---tmp/50751/2 "2016-05-24T10:51:40Z")

</div>

Hi @Michael1,

I dug around in the code and I think this is a bug. I am just not sure were the problem occurs exactly.

If this problem happens again, can you please check whether there is also a file called ` __es__.final`? Can you also check whether there is any related exception trace before this one (e.g. that a file could not be deleted)?

It would be great if you could look up this information and open a ticket on Github then.

Daniel

---

<div class="post-metadata">

**Author:** ![Michael1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michael1/32/29279_2.png) [@Michael1](https://discuss.elastic.co/u/Michael1)\
**Post date:** [May 24, 2016, 2:17pm UTC](https://discuss.elastic.co/t/--es---tmp/50751/3 "2016-05-24T14:17:11Z")

</div>

I can check the next time it happens. Is the information I provided above enough to open an issue on Git?

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [May 24, 2016, 2:48pm UTC](https://discuss.elastic.co/t/--es---tmp/50751/4 "2016-05-24T14:48:50Z")

</div>

Hi,

it would help greatly if we know ` __es__.final` also exists and also if there are any exception traces before the one you have provided (it is possible that either file deletion failed before or the problem occured when ` __es__.final` was first referenced).

Daniel

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [June 28, 2016, 2:32pm UTC](https://discuss.elastic.co/t/--es---tmp/50751/5 "2016-06-28T14:32:35Z")

</div>

@Michael1: Somebody opened a similar ticket today on Github: [https://github.com/elastic/elasticsearch/issues/19036](https://github.com/elastic/elasticsearch/issues/19036)

---

<div class="post-metadata">

**Author:** ![Andres\_Benavides](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andres_benavides/32/12415_2.png) [@Andres\_Benavides](https://discuss.elastic.co/u/Andres_Benavides)\
**Post date:** [January 31, 2017, 5:26pm UTC](https://discuss.elastic.co/t/--es---tmp/50751/6 "2017-01-31T17:26:24Z")

</div>

Do you know if this continue happens with elasticsearch 2.4.1. Because I have the same problem with elasticsearch 2.4.1:  
bash-4.1# service elasticsearch start  
Starting elasticsearch: Exception in thread "main" java.nio.file.FileAlreadyExistsException: /data/elasticsearch/marta/nodes/0/ **es**.tmp  
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)  
at java.nio.file.Files.createFile(Files.java:632)  
at org.elasticsearch.env.NodeEnvironment.ensureAtomicMoveSupported(NodeEnvironment.java:794)  
at org.elasticsearch.gateway.GatewayMetaState.(GatewayMetaState.java:82)  
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)  
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)  
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)  
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)

---

<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 5, 2017, 10:03pm UTC](https://discuss.elastic.co/t/--es---tmp/50751/7 "2017-07-05T22:03:41Z")

</div>


