# Workaround when ES hangs on stale NFS mount?

**URL:** <https://discuss.elastic.co/t/workaround-when-es-hangs-on-stale-nfs-mount/92669>\
**Category:** Elasticsearch\
**Created:** [July 11, 2017, 2:21pm UTC](https://discuss.elastic.co/t/workaround-when-es-hangs-on-stale-nfs-mount/92669 "2017-07-11T14:21:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abid\_Hussain](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@Abid\_Hussain](https://discuss.elastic.co/u/Abid_Hussain)\
**Post date:** [July 11, 2017, 2:21pm UTC](https://discuss.elastic.co/t/workaround-when-es-hangs-on-stale-nfs-mount/92669/1 "2017-07-11T14:21:11Z")

</div>

Hi all,

it is a known issue that ES hangs on startup for a couple of minutes when there is a stale NFS mount on the system: [https://github.com/elastic/elasticsearch/pull/24402](https://github.com/elastic/elasticsearch/pull/24402)

This is particularly a problem as also the client hangs when PreBuildTransportClient is used in our webapp.

So i wonder how to fix this issue. The following options come to my mind:

- We "fix" this directly by modifying source code in org.apache.lucene.util.IOUtils
- We use ES 6.0.0-alpha2 in which this issue is solved AFAIK

Is there any other way to get rid of this issue?

Can 6.0.0-alpha2 be used in a productive environment as a single node cluster with quite simple queries running? When is 6.0.0 released?

Any help would be appreciated...

Regards,

Abid

---

<div class="post-metadata">

**Author:** ![Abid\_Hussain](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@Abid\_Hussain](https://discuss.elastic.co/u/Abid_Hussain)\
**Post date:** [July 12, 2017, 11:19am UTC](https://discuss.elastic.co/t/workaround-when-es-hangs-on-stale-nfs-mount/92669/2 "2017-07-12T11:19:15Z")

</div>

I "solved" the issue by placing a hack in org.apache.lucene.util.IOUtils

- Download sources from [https://github.com/apache/lucene-solr](https://github.com/apache/lucene-solr) (switch to the tagged release branch according to the lucence-core version)
- Modify org.apache.lucene.util.IOUtils.spins(Path) so that it always returns true (we are not using SSDs)
- Build lucene-core and replace the old one in classpath ($_ELASTICSEARCH\_HOME_$/lib with the modified one

This seems to work.

---

<div class="post-metadata">

**Author:** ![Abid\_Hussain](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@Abid\_Hussain](https://discuss.elastic.co/u/Abid_Hussain)\
**Post date:** [July 13, 2017, 2:49pm UTC](https://discuss.elastic.co/t/workaround-when-es-hangs-on-stale-nfs-mount/92669/3 "2017-07-13T14:49:25Z")

</div>

I unfortunately have to say that this did not solve the issue in the end.

As mentioned in [https://github.com/elastic/elasticsearch/issues/24390](https://github.com/elastic/elasticsearch/issues/24390), the problem is that ES iterates over all file stores on startup. So I do not have an idea how to fix this apart from waiting for release 6.0.0.

If there is any known workaround please let me know.

Avoiding stale nfs mounts is NOT possible in our environment.

---

<div class="post-metadata">

**Author:** ![Abid\_Hussain](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@Abid\_Hussain](https://discuss.elastic.co/u/Abid_Hussain)\
**Post date:** [July 14, 2017, 3:10pm UTC](https://discuss.elastic.co/t/workaround-when-es-hangs-on-stale-nfs-mount/92669/4 "2017-07-14T15:10:09Z")

</div>

Finally, it seems that we could at least avoid the hangup behaviour at client side.

We did this by modifiying the static initializer in org.elasticsearch.env.Environment. Instead of iterating on all filestores it simply creates an array containing only one filestore - the one behind the current directory. We assume that on client side the file store has no relevance as there is no data to be stored.

Just for curiosity I would like to know, **what for ES needs all the file stores**. E.g, when the data directory is located elsewhere than the installation directory?

---

<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:** [August 11, 2017, 3:10pm UTC](https://discuss.elastic.co/t/workaround-when-es-hangs-on-stale-nfs-mount/92669/5 "2017-08-11T15:10:26Z")

</div>

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