# Unassigned Shards with allocation\_status deciders\_no

**URL:** <https://discuss.elastic.co/t/unassigned-shards-with-allocation-status-deciders-no/83236>\
**Category:** Elasticsearch\
**Created:** [April 21, 2017, 5:18pm UTC](https://discuss.elastic.co/t/unassigned-shards-with-allocation-status-deciders-no/83236 "2017-04-21T17:18:13Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![jspooner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jspooner/32/12984_2.png) [@jspooner](https://discuss.elastic.co/u/jspooner)\
**Post date:** [April 21, 2017, 5:18pm UTC](https://discuss.elastic.co/t/unassigned-shards-with-allocation-status-deciders-no/83236/1 "2017-04-21T17:18:13Z")

</div>

I'm restoring my data from S3 to a different cluster and some of my indexes are stuck in the **UNASSIGNED**  **state** with an **allocation\_status** of **deciders\_no**.

**1. Verify Snapshot**

It appears to be valid and some of the indexes do restore correctly.

**GET /\_snapshot/s3\_repository/for\_production\_4-21e/**

```
{
  "snapshots": [
    {
      "snapshot": "4-21e",
      "uuid": "4s2-PIUaRHKtFUeOKvrZhw",
      "version_id": 5020299,
      "version": "5.2.2",
      "indices": [
        "sightings-2016-02-01",
        "places"
      ],
      "state": "SUCCESS",
      "start_time": "2017-04-21T15:57:54.189Z",
      "start_time_in_millis": 1492790274189,
      "end_time": "2017-04-21T16:01:17.127Z",
      "end_time_in_millis": 1492790477127,
      "duration_in_millis": 202938,
      "failures": [],
      "shards": {
        "total": 395,
        "failed": 0,
        "successful": 395
      }
    }
  ]
}

```

**2. Restoring from S3 to a different cluster**

```
POST /_snapshot/s3_repository/for_production_4-21e/_restore?wait_for_completion=false
{
  "indices": "sightings-2016-02-01,places",
  "ignore_unavailable": true,
  "include_global_state": true,
  "index_settings": {
    "number_of_replicas": 0
  }
}

```

But the master shard for this index is stuck in the unassigned state. The

```
{
  "state": "UNASSIGNED",
  "primary": true,
  "node": null,
  "relocating_node": null,
  "shard": 0,
  "index": "sightings-2016-02-01",
  "recovery_source": {
    "type": "SNAPSHOT",
    "repository": "s3_repository",
    "snapshot": "for_production_4-21e",
    "version": "5.2.2",
    "index": "sightings-2016-02-01"
  },
  "unassigned_info": {
    "reason": "NEW_INDEX_RESTORED",
    "at": "2017-04-21T16:51:26.260Z",
    "delayed": false,
    "details": "restore_source[s3_repository/for_production_4-21e]",
    "allocation_status": "deciders_no"
  }
}

```

**GET /\_cluster/allocation/explain**

Looking at this route shows the index is looking for a node with the \_id of nSGRGqb-RUmgQkW-jbZ7QA OR 82GQkoQ5Q5yftFg\_g4Qpvg. But how do we fix this?

```
"allocate_explanation": "cannot allocate because allocation is not permitted to any of the nodes",
  "node_allocation_decisions": [
    {
      "node_id": "voWCoe9BQuiYxNu-jt1c2A",
      "node_name": "voWCoe9",
      "transport_address": "10.1.189.13:9300",
      "node_decision": "no",
      "weight_ranking": 1,
      "deciders": [
        {
          "decider": "filter",
          "decision": "NO",
          "explanation": """initial allocation of the index is only allowed on nodes [_id:"nSGRGqb-RUmgQkW-jbZ7QA OR 82GQkoQ5Q5yftFg_g4Qpvg"]"""
```

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [April 21, 2017, 5:30pm UTC](https://discuss.elastic.co/t/unassigned-shards-with-allocation-status-deciders-no/83236/2 "2017-04-21T17:30:36Z")

</div>

Does the restored index have any allocation filtering in its settings? It it does you can set the filtering to null or empty string.

---

<div class="post-metadata">

**Author:** ![jspooner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jspooner/32/12984_2.png) [@jspooner](https://discuss.elastic.co/u/jspooner)\
**Post date:** [April 21, 2017, 5:43pm UTC](https://discuss.elastic.co/t/unassigned-shards-with-allocation-status-deciders-no/83236/3 "2017-04-21T17:43:28Z")

</div>

Hi @nik9000,

I tried \_name and \_ip. I'm thinking these indexes are not restoring because they were created with the shrink api.

```
PUT sightings-2016-02-01/_settings
{
  "index.routing.allocation.include._ip": "10.*"
}

```

**GET sightings-2016-02-01/\_settings**

```
{
  "sightings-2016-02-01": {
    "settings": {
      "index": {
        "routing": {
          "allocation": {
            "include": {
              "_ip": "10.*"
            },
            "initial_recovery": {
              "_id": "nSGRGqb-RUmgQkW-jbZ7QA,82GQkoQ5Q5yftFg_g4Qpvg"
            }
          }
        },
        "allocation": {
          "max_retries": "1"
        },
        "number_of_shards": "1",
        "shrink": {
          "source": {
            "name": "bulk-sightings-2016-02-01",
            "uuid": "8arcuERNTlKYE9fEZ9ZNkQ"
          }
        },
        "provided_name": "sightings-2016-02-01",
        "creation_date": "1490916922072",
        "number_of_replicas": "0",
        "uuid": "hmnvNW-eQum3wihXbtRDhw",
        "version": {
          "created": "5020299",
          "upgraded": "5020299"
        }
      }
    }
  }
}
```

---

<div class="post-metadata">

**Author:** ![jspooner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jspooner/32/12984_2.png) [@jspooner](https://discuss.elastic.co/u/jspooner)\
**Post date:** [April 21, 2017, 5:58pm UTC](https://discuss.elastic.co/t/unassigned-shards-with-allocation-status-deciders-no/83236/4 "2017-04-21T17:58:24Z")

</div>

I think the problem is by **allocation.initial\_recovery.\_id** because it was the same value on the previous cluster.

```
"sightings-2016-02-01": {
    "settings": {
      "index": {
        "routing": {
          "allocation": {
            "initial_recovery": {
              "_id": "nSGRGqb-RUmgQkW-jbZ7QA,82GQkoQ5Q5yftFg_g4Qpvg"

```

I've

---

<div class="post-metadata">

**Author:** ![jspooner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jspooner/32/12984_2.png) [@jspooner](https://discuss.elastic.co/u/jspooner)\
**Post date:** [April 21, 2017, 6:01pm UTC](https://discuss.elastic.co/t/unassigned-shards-with-allocation-status-deciders-no/83236/5 "2017-04-21T18:01:24Z")

</div>

```
GET /_cluster/allocation/explain
{
  "index": "sightings-2016-02-01",
  "shard": 0,
  "primary": true
}

```

Response

```
{
  "index": "sightings-2016-02-01",
  "shard": 0,
  "primary": true,
  "current_state": "unassigned",
  "unassigned_info": {
    "reason": "NEW_INDEX_RESTORED",
    "at": "2017-04-21T17:48:23.476Z",
    "details": "restore_source[s3_repository/for_production_4-21e]",
    "last_allocation_status": "no"
  },
  "can_allocate": "no",
  "allocate_explanation": "cannot allocate because allocation is not permitted to any of the nodes",
  "node_allocation_decisions": [
    {
      "node_id": "voWCoe9BQuiYxNu-jt1c2A",
      "node_name": "voWCoe9",
      "transport_address": "10.1.189.13:9300",
      "node_decision": "no",
      "weight_ranking": 1,
      "deciders": [
        {
          "decider": "filter",
          "decision": "NO",
          "explanation": """initial allocation of the index is only allowed on nodes [_id:"nSGRGqb-RUmgQkW-jbZ7QA OR 82GQkoQ5Q5yftFg_g4Qpvg"]"""
        }
      ]
    },
    {
      "node_id": "ZNbmCrO6RoaVFQtsdm-R1w",
      "node_name": "ZNbmCrO",
      "transport_address": "10.1.190.226:9300",
      "node_decision": "no",
      "weight_ranking": 2,
      "deciders": [
        {
          "decider": "filter",
          "decision": "NO",
          "explanation": """initial allocation of the index is only allowed on nodes [_id:"nSGRGqb-RUmgQkW-jbZ7QA OR 82GQkoQ5Q5yftFg_g4Qpvg"]"""
        }
      ]
    },
    {
      "node_id": "ngwroDfyR2urGlJ4UEZvEw",
      "node_name": "ngwroDf",
      "transport_address": "10.1.190.21:9300",
      "node_decision": "no",
      "weight_ranking": 3,
      "deciders": [
        {
          "decider": "filter",
          "decision": "NO",
          "explanation": """initial allocation of the index is only allowed on nodes [_id:"nSGRGqb-RUmgQkW-jbZ7QA OR 82GQkoQ5Q5yftFg_g4Qpvg"]"""
        }
      ]
    },
    {
      "node_id": "u5tXF4qQQb2YZxp0hJsFFg",
      "node_name": "u5tXF4q",
      "transport_address": "10.1.189.248:9300",
      "node_decision": "no",
      "weight_ranking": 4,
      "deciders": [
        {
          "decider": "filter",
          "decision": "NO",
          "explanation": """initial allocation of the index is only allowed on nodes [_id:"nSGRGqb-RUmgQkW-jbZ7QA OR 82GQkoQ5Q5yftFg_g4Qpvg"]"""
        }
      ]
    }
  ]
}
```

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [April 21, 2017, 6:03pm UTC](https://discuss.elastic.co/t/unassigned-shards-with-allocation-status-deciders-no/83236/6 "2017-04-21T18:03:59Z")

</div>

Can you try setting that `initial_recovery` option to null? That should clear it.

---

<div class="post-metadata">

**Author:** ![jspooner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jspooner/32/12984_2.png) [@jspooner](https://discuss.elastic.co/u/jspooner)\
**Post date:** [April 21, 2017, 6:06pm UTC](https://discuss.elastic.co/t/unassigned-shards-with-allocation-status-deciders-no/83236/7 "2017-04-21T18:06:17Z")

</div>

> [@nik9000](#):
>
> Can you try setting that initial\_recovery option to null? That should clear it.

No it returns an error. I've tried setting the parents objects to null as well.

```
PUT sightings-2016-02-01/_settings
{
  "index.routing.allocation.initial_recovery._id": null,
  "index.allocation.max_retries": 5
}

{
  "error": {
    "root_cause": [
      {
        "type": "remote_transport_exception",
        "reason": "[v_Rt1wM][10.1.189.53:9300][indices:admin/settings/update]"
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "unknown setting [index.routing.allocation.initial_recovery._id] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
  },
  "status": 400
}

```

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [April 21, 2017, 6:07pm UTC](https://discuss.elastic.co/t/unassigned-shards-with-allocation-status-deciders-no/83236/8 "2017-04-21T18:07:02Z")

</div>

Let me see if I can reproduce locally. I'll play and get back to you.

---

<div class="post-metadata">

**Author:** ![jspooner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jspooner/32/12984_2.png) [@jspooner](https://discuss.elastic.co/u/jspooner)\
**Post date:** [April 21, 2017, 6:32pm UTC](https://discuss.elastic.co/t/unassigned-shards-with-allocation-status-deciders-no/83236/9 "2017-04-21T18:32:08Z")

</div>

Thanks! I found this issue for [initial\_recover limits replica allocation.] ([https://github.com/elastic/elasticsearch/pull/20589](https://github.com/elastic/elasticsearch/pull/20589))

I guess I'm going to dig through the elasticsearch source code.

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [April 21, 2017, 6:35pm UTC](https://discuss.elastic.co/t/unassigned-shards-with-allocation-status-deciders-no/83236/10 "2017-04-21T18:35:47Z")

</div>

OK - I just reproduced this locally against master. I'm fairly sure you can't restore shrunken indices now.

---

<div class="post-metadata">

**Author:** ![jspooner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jspooner/32/12984_2.png) [@jspooner](https://discuss.elastic.co/u/jspooner)\
**Post date:** [April 21, 2017, 6:39pm UTC](https://discuss.elastic.co/t/unassigned-shards-with-allocation-status-deciders-no/83236/11 "2017-04-21T18:39:56Z")

</div>

What are my options for getting this data from our QA cluster to production cluster? Reindexing isn't an options since we're in the 2TB range.

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [April 21, 2017, 6:44pm UTC](https://discuss.elastic.co/t/unassigned-shards-with-allocation-status-deciders-no/83236/12 "2017-04-21T18:44:11Z")

</div>

I'm not sure! Still investigating. There may not be any good options.

---

<div class="post-metadata">

**Author:** ![jspooner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jspooner/32/12984_2.png) [@jspooner](https://discuss.elastic.co/u/jspooner)\
**Post date:** [April 21, 2017, 6:45pm UTC](https://discuss.elastic.co/t/unassigned-shards-with-allocation-status-deciders-no/83236/13 "2017-04-21T18:45:51Z")

</div>

Are you an elasticsearch employee? I can write an issue in GitHub if you have not already doing it.

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [April 21, 2017, 6:53pm UTC](https://discuss.elastic.co/t/unassigned-shards-with-allocation-status-deciders-no/83236/14 "2017-04-21T18:53:07Z")

</div>

I'm doing it now, yeah. Just getting easy reproduction steps.

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [April 21, 2017, 6:57pm UTC](https://discuss.elastic.co/t/unassigned-shards-with-allocation-status-deciders-no/83236/15 "2017-04-21T18:57:15Z")

</div>

> <https://github.com/elastic/elasticsearch/issues/24257>

---

<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 19, 2017, 7:03pm UTC](https://discuss.elastic.co/t/unassigned-shards-with-allocation-status-deciders-no/83236/16 "2017-05-19T19:03:11Z")

</div>

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