# Snashot getting stuck on a shard V2.3.1

**URL:** <https://discuss.elastic.co/t/snashot-getting-stuck-on-a-shard-v2-3-1/82191>\
**Category:** Elasticsearch\
**Created:** [April 12, 2017, 4:03pm UTC](https://discuss.elastic.co/t/snashot-getting-stuck-on-a-shard-v2-3-1/82191 "2017-04-12T16:03:51Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![surekhabalaji](https://avatars.discourse-cdn.com/v4/letter/s/5daacb/32.png) [@surekhabalaji](https://discuss.elastic.co/u/surekhabalaji)\
**Post date:** [April 12, 2017, 4:03pm UTC](https://discuss.elastic.co/t/snashot-getting-stuck-on-a-shard-v2-3-1/82191/1 "2017-04-12T16:03:51Z")

</div>

Elasticsearch version: 2.3.1

Plugins installed: []  
lucene version 5.5.0

JVM version: open jdk 1.8.0

OS version: CentOS

Description of the problem including expected versus actual behavior:

I have setup a cluster with two ElasticSearch servers and have the NFS repo setup on the first server(master) and have the NFS mount setup on these two servers. I created the snapshot repo and was able to take snapshots of individual small indices. When I try to take the snapshot on the entire indices set, the snapshot process gets stuck on a couple of shards in a particular index. I had to stop the Elastic Search servers and restart them to clear the stuck snapshot.  
After restarting, when I tried taking the snapshot, it again got stuck in the same shards. It has been stuck for past 15 hours.

Please see below to see the stuck shards '3' & '4'

"2": {  
"stage": "DONE",  
"stats": {  
"number\_of\_files": 207,  
"processed\_files": 207,  
"total\_size\_in\_bytes": 50471623283,  
"processed\_size\_in\_bytes": 50471623283,  
"start\_time\_in\_millis": 1491948418067,  
"time\_in\_millis": 2135013  
}  
},  
"3": {  
"stage": "STARTED",  
"stats": {  
"number\_of\_files": 204,  
"processed\_files": 190,  
"total\_size\_in\_bytes": 43726103499,  
"processed\_size\_in\_bytes": 32915497923,  
"start\_time\_in\_millis": 1491948498451,  
"time\_in\_millis": 0  
},  
"node": "ohMx7BUXRfyym0YaTlpreQ"  
},  
"4": {  
"stage": "STARTED",  
"stats": {  
"number\_of\_files": 211,  
"processed\_files": 187,  
"total\_size\_in\_bytes": 51847398788,  
"processed\_size\_in\_bytes": 40983724276,  
"start\_time\_in\_millis": 1491948421440,  
"time\_in\_millis": 0  
},  
"node": "inro3uspRw68FigfTxxu3Q"

Provide logs (if relevant):

Describe the feature:

---

<div class="post-metadata">

**Author:** ![abeyad](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@abeyad](https://discuss.elastic.co/u/abeyad)\
**Post date:** [April 12, 2017, 4:09pm UTC](https://discuss.elastic.co/t/snashot-getting-stuck-on-a-shard-v2-3-1/82191/2 "2017-04-12T16:09:32Z")

</div>

@surekhabalaji do you have any relevant messages in the log files for the master node and/or the other node that you can share?

Also, have you tried restarting the NFS daemon on both machines to see if that resolves the problem?

Do the snapshots always get stuck at the same place during snapshotting? For example, for shard 3, does it always get stuck after processing 190 of the 204 files? Is stuck there or just making progress very slowly (e.g. moving to processing 191 of the 204 files after a long while)?

---

<div class="post-metadata">

**Author:** ![surekhabalaji](https://avatars.discourse-cdn.com/v4/letter/s/5daacb/32.png) [@surekhabalaji](https://discuss.elastic.co/u/surekhabalaji)\
**Post date:** [April 12, 2017, 8:44pm UTC](https://discuss.elastic.co/t/snashot-getting-stuck-on-a-shard-v2-3-1/82191/3 "2017-04-12T20:44:48Z")

</div>

@abeyad, Could not find any relevant errors in the log files. When I tried restarting the NFS service first time when this issue happened, it made the ElasticSearch server to be hung as snapshotting was still in progress. As it was hung and I had to restart the node, i coudl not see where exactly it was stuck.

So, now before i could restart NFS daemon, is there a way to release the stuck snapshot?

---

<div class="post-metadata">

**Author:** ![abeyad](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@abeyad](https://discuss.elastic.co/u/abeyad)\
**Post date:** [April 12, 2017, 9:01pm UTC](https://discuss.elastic.co/t/snashot-getting-stuck-on-a-shard-v2-3-1/82191/4 "2017-04-12T21:01:41Z")

</div>

If we aren't seeing any issues in Elasticsearch logs, my guess is the issues are inside NFS. What version of NFS are you on and what version of CentOS? Do you have any system logs that indicate an issue?

> So, now before i could restart NFS daemon, is there a way to release the stuck snapshot?

Yes, delete the snapshot, which should remove it from the "stuck" state.

---

<div class="post-metadata">

**Author:** ![surekhabalaji](https://avatars.discourse-cdn.com/v4/letter/s/5daacb/32.png) [@surekhabalaji](https://discuss.elastic.co/u/surekhabalaji)\
**Post date:** [April 12, 2017, 9:49pm UTC](https://discuss.elastic.co/t/snashot-getting-stuck-on-a-shard-v2-3-1/82191/5 "2017-04-12T21:49:11Z")

</div>

CentOS - Version 7 Linux  
NFS - version 4

I dont see any error logs on the var/log/messages.  
I issued the 'delete' snapshot command and it has been running for an hour now.

---

<div class="post-metadata">

**Author:** ![abeyad](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@abeyad](https://discuss.elastic.co/u/abeyad)\
**Post date:** [April 12, 2017, 10:01pm UTC](https://discuss.elastic.co/t/snashot-getting-stuck-on-a-shard-v2-3-1/82191/6 "2017-04-12T22:01:12Z")

</div>

Strange. Is it possible to share your logs from the two nodes in the cluster with me? You can email it to me, my email is my first name at [elastic.co](http://elastic.co)

---

<div class="post-metadata">

**Author:** ![surekhabalaji](https://avatars.discourse-cdn.com/v4/letter/s/5daacb/32.png) [@surekhabalaji](https://discuss.elastic.co/u/surekhabalaji)\
**Post date:** [April 19, 2017, 2:03pm UTC](https://discuss.elastic.co/t/snashot-getting-stuck-on-a-shard-v2-3-1/82191/7 "2017-04-19T14:03:44Z")

</div>

The issue got resolved after we restarted the nodes and restarted ElasticSearch servers. Thanks for the help. We can close this discussion.

---

<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:** [May 17, 2017, 2:10pm UTC](https://discuss.elastic.co/t/snashot-getting-stuck-on-a-shard-v2-3-1/82191/8 "2017-05-17T14:10:48Z")

</div>

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