# Allocation Error

**URL:** https://discuss.elastic.co/t/allocation-error/84972
**Category:** Elasticsearch
**Created:** [May 8, 2017, 7:36pm UTC](https://discuss.elastic.co/t/allocation-error/84972 "2017-05-08T19:36:07Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![lrolsen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lrolsen/32/5953_2.png) [@lrolsen](https://discuss.elastic.co/u/lrolsen)
#### Post date: [May 8, 2017, 7:36pm UTC](https://discuss.elastic.co/t/allocation-error/84972/1 "2017-05-08T19:36:08Z")

</div>

Hi,

I have a 2 node cluster with 1 shard per node and no replication. The cluster is used for logging and uses daily indexes. Normally everything runs fine but the index that was created a few days ago turned red half way through the day and stopped accepting data.

If a do a /\_cluster/allocation/explain i get the following error explanation:

_ **cannot allocate because allocation is not permitted to any of the nodes that hold an in-sync shard copy** _

Both nodes are otherwise running fine and accepting data on all other indices. Has anybody got an idea as to what is causing this and what I can do to fix it?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [May 9, 2017, 6:45am UTC](https://discuss.elastic.co/t/allocation-error/84972/2 "2017-05-09T06:45:16Z")

</div>

What version are you on? Can you show us the complete output from the allocation call?

> [@lrolsen](#):
>
> I have a 2 node cluster with 1 shard per node and no replication

That's not an ideal deployment, for many reasons.

---

<div class="post-metadata">

### Author: ![lrolsen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lrolsen/32/5953_2.png) [@lrolsen](https://discuss.elastic.co/u/lrolsen)
#### Post date: [May 9, 2017, 12:04pm UTC](https://discuss.elastic.co/t/allocation-error/84972/3 "2017-05-09T12:04:58Z")

</div>

We are currently on 5.3.0. This is the full error message:

{  
"index": "logstash-2017.05.02",  
"shard": 1,  
"primary": true,  
"current\_state": "unassigned",  
"unassigned\_info": {  
"reason": "ALLOCATION\_FAILED",  
"at": "2017-05-08T19:14:45.122Z",  
"failed\_allocation\_attempts": 5,  
"details": "failed to create shard, failure IOException[failed to obtain in-memory shard lock]; nested: ShardLockObtainFailedException[[logstash-2017.05.02][1]: obtaining shard lock timed out after 5000ms]; ",  
"last\_allocation\_status": "no"  
},  
"can\_allocate": "no",  
"allocate\_explanation": "cannot allocate because allocation is not permitted to any of the nodes that hold an in-sync shard copy",  
"node\_allocation\_decisions": [  
{  
"node\_id": "P06M7-VqSfuHCnz77thsjA",  
"node\_name": "es2-node-2",  
"transport\_address": "192.168.20.245:9300",  
"node\_decision": "no",  
"store": {  
"found": false  
}  
},  
{  
"node\_id": "s4vzlt\_zSFiGBV0VoyOzuA",  
"node\_name": "es2-node-1",  
"transport\_address": "192.168.23.233:9300",  
"node\_decision": "no",  
"store": {  
"in\_sync": true,  
"allocation\_id": "jibPirrbQcSgmjLmFqLIzQ"  
},  
"deciders": [  
{  
"decider": "max\_retry",  
"decision": "NO",  
"explanation": "shard has exceeded the maximum number of retries [5] on failed allocation attempts - manually call [/\_cluster/reroute?retry\_failed=true] to retry, [unassigned\_info[[reason=ALLOCATION\_FAILED], at[2017-05-08T19:14:45.122Z], failed\_attempts[5], delayed=false, details[failed to create shard, failure IOException[failed to obtain in-memory shard lock]; nested: ShardLockObtainFailedException[[logstash-2017.05.02][1]: obtaining shard lock timed out after 5000ms]; ], allocation\_status[deciders\_no]]]"  
}  
]  
}  
]  
}

---

<div class="post-metadata">

### Author: ![Wen-Chih\_Yang](https://avatars.discourse-cdn.com/v4/letter/w/48db29/32.png) [@Wen-Chih\_Yang](https://discuss.elastic.co/u/Wen-Chih_Yang)
#### Post date: [May 22, 2017, 7:04am UTC](https://discuss.elastic.co/t/allocation-error/84972/4 "2017-05-22T07:04:33Z")

</div>

I have similar problem, too. My servers encountered HW crash and ES cluster has many unassigned shards.

`GET /_cluster/allocation/explain`  
"details": "failed to create shard, failure FileSystemException[/data/elasticsearch/data/nodes/0/indices/35ByVBpBTdiFQ\_TLgq4L2w/5/\_state/state-1.st.tmp: Read-only file system]"

I use reroute API to fix those unassigned shards because I see the explanation as below

> "explanation": "shard has exceeded the maximum number of retries [5] on failed allocation attempts - manually call [/\_cluster/reroute?retry\_failed=true] to retry

So, `POST /_cluster/reroute?retry_failed=true` may help you.

---

<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: [June 19, 2017, 7:05am UTC](https://discuss.elastic.co/t/allocation-error/84972/5 "2017-06-19T07:05:08Z")

</div>

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