# Unassigned shards because of different elasticsearch version

**URL:** <https://discuss.elastic.co/t/unassigned-shards-because-of-different-elasticsearch-version/299182>\
**Category:** Elasticsearch\
**Created:** [March 9, 2022, 8:15am UTC](https://discuss.elastic.co/t/unassigned-shards-because-of-different-elasticsearch-version/299182 "2022-03-09T08:15:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![aman123](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@aman123](https://discuss.elastic.co/u/aman123)\
**Post date:** [March 9, 2022, 8:15am UTC](https://discuss.elastic.co/t/unassigned-shards-because-of-different-elasticsearch-version/299182/1 "2022-03-09T08:15:35Z")

</div>

Hi All,

Recently I have upgraded the one data node , Node got successfully upgraded but there are some unassigned shards which are not being replicated to other nodes because of below error:

"explanation" : "cannot allocate replica shard to a node with version [7.13.4] since this is older than the primary version [7.16.3]"

Cluster is in yellow state.

Can anybody help me in this ?

---

<div class="post-metadata">

**Author:** ![aman123](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@aman123](https://discuss.elastic.co/u/aman123)\
**Post date:** [March 9, 2022, 8:23am UTC](https://discuss.elastic.co/t/unassigned-shards-because-of-different-elasticsearch-version/299182/2 "2022-03-09T08:23:11Z")

</div>

Is there any way to reassign those replica shards ?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [March 9, 2022, 8:02pm UTC](https://discuss.elastic.co/t/unassigned-shards-because-of-different-elasticsearch-version/299182/3 "2022-03-09T20:02:54Z")

</div>

Yes, you must complete the upgrade. From [the docs](https://www.elastic.co/guide/en/elasticsearch/reference/7.16/rolling-upgrades.html#_preparing_to_upgrade):

> Once you have started to upgrade your cluster to version 7.16.3 you must complete the upgrade.

---

<div class="post-metadata">

**Author:** ![aman123](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@aman123](https://discuss.elastic.co/u/aman123)\
**Post date:** [March 12, 2022, 2:30am UTC](https://discuss.elastic.co/t/unassigned-shards-because-of-different-elasticsearch-version/299182/4 "2022-03-12T02:30:28Z")

</div>

As of now there is no way out to assign those replica shards?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [March 12, 2022, 10:06am UTC](https://discuss.elastic.co/t/unassigned-shards-because-of-different-elasticsearch-version/299182/5 "2022-03-12T10:06:07Z")

</div>

Yes, just carry on with the upgrade.

---

<div class="post-metadata">

**Author:** ![aman123](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@aman123](https://discuss.elastic.co/u/aman123)\
**Post date:** [March 17, 2022, 10:33am UTC](https://discuss.elastic.co/t/unassigned-shards-because-of-different-elasticsearch-version/299182/6 "2022-03-17T10:33:06Z")

</div>

After upgrading the few nodes, I can see logstash service got failed inside the machines. And we are unable to restart the service.

Please refer below logs:  
[2022-03-17T07:44:42,432][ERROR][logstash.outputs.Elasticsearch][main][db1af4057ae53eec4aebe1d43e3d39bc64c27408ff34e47b0e3370f6927d375f] Attempted to send a bulk request but Elasticsearch appears to be unreachable or down {:message=\>"Elasticsearch Unreachable: [[https://logstash\_writer:xxxxxx@elasticsearch.mgmt.aws.uk.tsb:9200/](https://logstash_writer:xxxxxx@elasticsearch.mgmt.aws.uk.tsb:9200/)][Manticore::SocketException] Connection reset by peer (Write failed)", :exception=\>LogStash::Outputs::Elasticsearch::HttpClient::Pool::HostUnreachableError, :will\_retry\_in\_seconds=\>2}

Please help on this.

---

<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:** [April 14, 2022, 10:33am UTC](https://discuss.elastic.co/t/unassigned-shards-because-of-different-elasticsearch-version/299182/7 "2022-04-14T10:33:22Z")

</div>

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