# ES 6.2.1 Unable to reindex due to unavailable\_shards\_exception

**URL:** <https://discuss.elastic.co/t/es-6-2-1-unable-to-reindex-due-to-unavailable-shards-exception/121859>\
**Category:** Elasticsearch\
**Created:** [February 28, 2018, 1:36pm UTC](https://discuss.elastic.co/t/es-6-2-1-unable-to-reindex-due-to-unavailable-shards-exception/121859 "2018-02-28T13:36:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ld\_pvl](https://avatars.discourse-cdn.com/v4/letter/l/cdc98d/32.png) [@ld\_pvl](https://discuss.elastic.co/u/ld_pvl)\
**Post date:** [February 28, 2018, 1:36pm UTC](https://discuss.elastic.co/t/es-6-2-1-unable-to-reindex-due-to-unavailable-shards-exception/121859/1 "2018-02-28T13:36:32Z")

</div>

Hi Team,

I am trying to reindex from a source "A" index to dest "B" index - this has worked before but suddenly it throws me the unavailable\_shards\_exception exception now and am not sure why.

The cluster health is green. I am able to search the old index for that particular doc ID. The cluster is not hitting any disk space watermarks. Below is an example error for a doc:

```
{
  "index" : "my_old_index_A",
  "type" : "metrics",
  "id" : "mydocid-1515747420",
  "cause" : {
    "type" : "unavailable_shards_exception",
    "reason" : "[my_new_index_B][0] primary shard is not active Timeout: [1m], request: [BulkShardRequest [[my_new_index_B][0]] containing [1000] requests]"
  },
  "status" : 503
},

```

The new index B gets created but no docs are being saved and the cluster just turns to Red, all I can see in the logs is:

```
... creating index, cause [auto(bulk api)], templates [some templates], shards [1]/[1], mappings [metrics]
... Cluster health status changed from [YELLOW] to [RED] (reason: [index [my_new_index_B] created]).

```

The body of the reindex request is fairly simple:

```
{
  "source": {
    "index": "my_old_index_A"
  },
  "dest": {
    "index": "my_new_index_B"
  },
  "script": {
    "lang": "painless",
    "source": "some nicely looking painless script here"
  }
}

```

Please help 😩

---

<div class="post-metadata">

**Author:** ![ld\_pvl](https://avatars.discourse-cdn.com/v4/letter/l/cdc98d/32.png) [@ld\_pvl](https://discuss.elastic.co/u/ld_pvl)\
**Post date:** [February 28, 2018, 3:14pm UTC](https://discuss.elastic.co/t/es-6-2-1-unable-to-reindex-due-to-unavailable-shards-exception/121859/2 "2018-02-28T15:14:36Z")

</div>

I got it I think.

My index B reqiures a node of a certain type which I have not spun up yet.

I bamboozled myself again.

---

<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 28, 2018, 3:14pm UTC](https://discuss.elastic.co/t/es-6-2-1-unable-to-reindex-due-to-unavailable-shards-exception/121859/3 "2018-03-28T15:14:41Z")

</div>

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