# Replica shards not being assigned to nodes

**URL:** https://discuss.elastic.co/t/replica-shards-not-being-assigned-to-nodes/45833
**Category:** Elasticsearch
**Created:** [March 30, 2016, 5:46pm UTC](https://discuss.elastic.co/t/replica-shards-not-being-assigned-to-nodes/45833 "2016-03-30T17:46:23Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![stecino](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@stecino](https://discuss.elastic.co/u/stecino)
#### Post date: [March 30, 2016, 5:46pm UTC](https://discuss.elastic.co/t/replica-shards-not-being-assigned-to-nodes/45833/1 "2016-03-30T17:46:24Z")

</div>

Hello,

I have this issue that started happening for a few days now.

When an index is generated, primary shards are assigned, but not the replica shards. They show as un-assigned. So after I run this command where my script populates the variables

```
   curl -XPOST 'localhost:9200/_cluster/reroute' -d '{
      "commands": [
         {
             "allocate": {
                 "index": "'$INDEX'",
                 "shard": '$SHARD',
                 "node": "'$NODE'",
                 "allow_primary": true
           }
         }
     ]
   }'

```

replica shards are allocated.

This is my cluster settings. Disable\_allocation or disable\_replica\_allocation if were applied I wouldn't be able to allocate any shards, correct? I can update this false, I think enable: all what matters. But I am not sure.

{  
"persistent" : { },  
"transient" : {  
"cluster" : {  
"routing" : {  
"allocation" : {  
**"disable\_allocation" : "true",**  
**"disable\_replica\_allocation" : "true",**  
"enable" : "all"  
}  
}  
}  
}  
}

---

<div class="post-metadata">

### Author: ![stecino](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@stecino](https://discuss.elastic.co/u/stecino)
#### Post date: [March 30, 2016, 8:37pm UTC](https://discuss.elastic.co/t/replica-shards-not-being-assigned-to-nodes/45833/2 "2016-03-30T20:37:19Z")

</div>

I went ahead and set the settings to false. I can now allocate the replica shards.

---

<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, 11:03pm UTC](https://discuss.elastic.co/t/replica-shards-not-being-assigned-to-nodes/45833/3 "2017-07-05T23:03:53Z")

</div>


