# Replicas remains unassigned

**URL:** <https://discuss.elastic.co/t/replicas-remains-unassigned/167171>\
**Category:** Elasticsearch\
**Created:** [February 5, 2019, 5:48pm UTC](https://discuss.elastic.co/t/replicas-remains-unassigned/167171 "2019-02-05T17:48:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hari\_Prasad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hari_prasad/32/56784_2.png) [@Hari\_Prasad](https://discuss.elastic.co/u/Hari_Prasad)\
**Post date:** [February 5, 2019, 5:48pm UTC](https://discuss.elastic.co/t/replicas-remains-unassigned/167171/1 "2019-02-05T17:48:14Z")

</div>

Hi I am currently in 6.4.2 version and I have lot of replica shards in "unassigned" state.

Below is the result That I get when I run query

```
GET /_cluster/allocation/explain
{
  "index": "log-2019.01.29",
  "shard": 0,
  "primary": false
}

"index": "log-2019.01.29",
  "shard": 0,
  "primary": false,
  "current_state": "unassigned",
  "unassigned_info": {
"reason": "ALLOCATION_FAILED",
"at": "2019-02-05T17:27:34.293Z",
"failed_allocation_attempts": 5,
"details": "failed shard on node [nusIaGG7SRWtv0Dw50KtiQ]: failed to update mapping for index, failure MapperParsingException[Failed to parse mapping [doc]: Root mapping definition has unsupported parameters: [_size : {enabled=true}]]; nested: MapperParsingException[Root mapping definition has unsupported parameters: [_size : {enabled=true}]]; ",
"last_allocation_status": "no_attempt"
  },
  "can_allocate": "no",
  "allocate_explanation": "cannot allocate because allocation is not permitted to any of the nodes"

```

I have already tried the `POST /_cluster/reroute?retry_failed` but still the same result

Below is the template that I have in logstash

```
{
    "template": "log",
    "index_patterns": ["log*"],
    "settings" : {
        "number_of_shards" : 5
    },
    "mappings":{
      "doc":{
         "_size": {
            "enabled": true
         }
      }
    }
}

```

PS: I have mapper size plugin enabled on all the nodes and this exception on only replicas seems confusing

Thank you

---

<div class="post-metadata">

**Author:** ![Hari\_Prasad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hari_prasad/32/56784_2.png) [@Hari\_Prasad](https://discuss.elastic.co/u/Hari_Prasad)\
**Post date:** [February 6, 2019, 1:01pm UTC](https://discuss.elastic.co/t/replicas-remains-unassigned/167171/2 "2019-02-06T13:01:14Z")

</div>

This was my caused by my mistake. The mapper size plugin was not installed on all the Elasticsearch nodes.  
Once this was corrected the replicas started getting assigned.

---

<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:** [March 6, 2019, 1:01pm UTC](https://discuss.elastic.co/t/replicas-remains-unassigned/167171/3 "2019-03-06T13:01:17Z")

</div>

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