# Failed to execute operation for shard NoSuchFileException

**URL:** <https://discuss.elastic.co/t/failed-to-execute-operation-for-shard-nosuchfileexception/54676>\
**Category:** Elasticsearch\
**Created:** [July 4, 2016, 9:46pm UTC](https://discuss.elastic.co/t/failed-to-execute-operation-for-shard-nosuchfileexception/54676 "2016-07-04T21:46:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ben.gnoinski](https://avatars.discourse-cdn.com/v4/letter/b/ecccb3/32.png) [@ben.gnoinski](https://discuss.elastic.co/u/ben.gnoinski)\
**Post date:** [July 4, 2016, 9:46pm UTC](https://discuss.elastic.co/t/failed-to-execute-operation-for-shard-nosuchfileexception/54676/1 "2016-07-04T21:46:38Z")

</div>

I have a 2 node ES cluster (2.3.3 on ubuntu) which shows green, and I am getting the below spamming my logfiles 6.8GB daily. The date of the shard varies between 2015 and 2016.

I have checked \_cat/shards/ and the referenced shard logstash-2016.01.19 does not appear, nor does any reference to logstash at all.  
I have checked \_cat/indices/ and all of the indices show up as green, and again no reference to logstash in at all.  
On the filesystem in /var/lib/elasticsearch/Clustername/nodes/ the 1 folder does not exist on either of the nodes.

Any help finding out why Elasticsearch thinks there are shards that don't exist would be greatly appreciated.

[2016-07-04 17:35:03,317][DEBUG][action.admin.indices.stats] [server] [indices:monitor/stats] failed to execute operation for shard [[logstash-2016.01.19][3], node[2fEASGQ-SGaNeflA0WoTeA], [P], v[14], s[STARTED], a[id=3JuxCZj3SKqu7Efo26VaxQ]]  
ElasticsearchException[failed to refresh store stats]; nested: NoSuchFileException[/var/lib/elasticsearch/Clustername/nodes/1/indices/logstash-2016.01.19/3/index];  
at org.elasticsearch.index.store.Store$StoreStatsCache.refresh(Store.java:1534)  
at org.elasticsearch.index.store.Store$StoreStatsCache.refresh(Store.java:1519)  
at org.elasticsearch.common.util.SingleObjectCache.getOrRefresh(SingleObjectCache.java:55)  
at org.elasticsearch.index.store.Store.stats(Store.java:293)  
at org.elasticsearch.index.shard.IndexShard.storeStats(IndexShard.java:665)  
at org.elasticsearch.action.admin.indices.stats.CommonStats.(CommonStats.java:134)  
at org.elasticsearch.action.admin.indices.stats.TransportIndicesStatsAction.shardOperation(TransportIndicesStatsAction.java:165)  
at org.elasticsearch.action.admin.indices.stats.TransportIndicesStatsAction.shardOperation(TransportIndicesStatsAction.java:47)  
at org.elasticsearch.action.support.broadcast.node.TransportBroadcastByNodeAction$BroadcastByNodeTransportRequestHandler.onShardOperation(TransportBroadcastByNodeAction.java:409)  
at org.elasticsearch.action.support.broadcast.node.TransportBroadcastByNodeAction$BroadcastByNodeTransportRequestHandler.messageReceived(TransportBroadcastByNodeAction.java:388)  
at org.elasticsearch.action.support.broadcast.node.TransportBroadcastByNodeAction$BroadcastByNodeTransportRequestHandler.messageReceived(TransportBroadcastByNodeAction.java:375)  
at org.elasticsearch.transport.TransportService$4.doRun(TransportService.java:350)  
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)  
at java.lang.Thread.run(Thread.java:745)  
Caused by: java.nio.file.NoSuchFileException: /var/lib/elasticsearch/Clustername/nodes/1/indices/logstash-2016.01.19/3/index  
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)  
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)  
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)  
at sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemProvider.java:427)  
at java.nio.file.Files.newDirectoryStream(Files.java:457)  
at org.apache.lucene.store.FSDirectory.listAll(FSDirectory.java:190)  
at org.apache.lucene.store.FSDirectory.listAll(FSDirectory.java:202)  
at org.elasticsearch.index.store.FsDirectoryService$1.listAll(FsDirectoryService.java:127)  
at org.apache.lucene.store.FilterDirectory.listAll(FilterDirectory.java:57)  
at org.apache.lucene.store.FilterDirectory.listAll(FilterDirectory.java:57)  
at org.elasticsearch.index.store.Store$StoreStatsCache.estimateSize(Store.java:1540)  
at org.elasticsearch.index.store.Store$StoreStatsCache.refresh(Store.java:1532)  
... 15 more

---

<div class="post-metadata">

**Author:** ![premier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/premier/32/14938_2.png) [@premier](https://discuss.elastic.co/u/premier)\
**Post date:** [January 27, 2017, 4:15pm UTC](https://discuss.elastic.co/t/failed-to-execute-operation-for-shard-nosuchfileexception/54676/2 "2017-01-27T16:15:31Z")

</div>

I'm have the same problem in our production elastic cluster and have opened another ticket. [Failed to execute operation for shard - NoSuchFileException](https://discuss.elastic.co/t/failed-to-execute-operation-for-shard-nosuchfileexception/72926)  
So far no replies.

---

<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/failed-to-execute-operation-for-shard-nosuchfileexception/54676/3 "2017-07-05T22:03:49Z")

</div>


