# Restored from snapshoots 2 master nodes but several indecies are in unassigned state

**URL:** <https://discuss.elastic.co/t/restored-from-snapshoots-2-master-nodes-but-several-indecies-are-in-unassigned-state/322113>\
**Category:** Elasticsearch\
**Created:** [December 28, 2022, 4:34pm UTC](https://discuss.elastic.co/t/restored-from-snapshoots-2-master-nodes-but-several-indecies-are-in-unassigned-state/322113 "2022-12-28T16:34:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dimitry\_Feigin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dimitry_feigin/32/106190_2.png) [@Dimitry\_Feigin](https://discuss.elastic.co/u/Dimitry_Feigin)\
**Post date:** [December 28, 2022, 4:34pm UTC](https://discuss.elastic.co/t/restored-from-snapshoots-2-master-nodes-but-several-indecies-are-in-unassigned-state/322113/1 "2022-12-28T16:34:03Z")

</div>

We had 3 node cluster where all nodes were masters. We accidently deleted 2 master nodes. We restore them from snapshots. However we have several indecies in unassign state:|

```auto
externalkeyhandler-000005 4 p STARTED 0 208b 100.68.100.6 node2
externalkeyhandler-000005 1 p STARTED 0 208b 100.68.100.6 node2
externalkeyhandler-000005 2 p UNASSIGNED
externalkeyhandler-000005 3 p STARTED 0 208b 100.68.100.6 node2
externalkeyhandler-000005 0 p STARTED 0 208b 100.68.100.6 node2

```

The description is:

```auto
  "primary" : true,
  "current_state" : "unassigned",
  "unassigned_info" : {
    "reason" : "CLUSTER_RECOVERED",
    "at" : "2022-12-28T11:05:45.500Z",
    "last_allocation_status" : "no_valid_shard_copy"
  },
  "can_allocate" : "no_valid_shard_copy",
  "allocate_explanation" : "cannot allocate because a previous copy of the primary shard existed but can no longer be found on the nodes in the cluster",

```

What should we do?

```auto

```

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 28, 2022, 4:50pm UTC](https://discuss.elastic.co/t/restored-from-snapshoots-2-master-nodes-but-several-indecies-are-in-unassigned-state/322113/2 "2022-12-28T16:50:02Z")

</div>

Which version of Elasticsearch are you using? What is in the Elasticsearch logs?

---

<div class="post-metadata">

**Author:** ![Dimitry\_Feigin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dimitry_feigin/32/106190_2.png) [@Dimitry\_Feigin](https://discuss.elastic.co/u/Dimitry_Feigin)\
**Post date:** [December 28, 2022, 4:51pm UTC](https://discuss.elastic.co/t/restored-from-snapshoots-2-master-nodes-but-several-indecies-are-in-unassigned-state/322113/3 "2022-12-28T16:51:28Z")

</div>

It was 7.13.2 and we try to upgarde to 7.17.1

---

<div class="post-metadata">

**Author:** ![Dimitry\_Feigin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dimitry_feigin/32/106190_2.png) [@Dimitry\_Feigin](https://discuss.elastic.co/u/Dimitry_Feigin)\
**Post date:** [December 28, 2022, 4:57pm UTC](https://discuss.elastic.co/t/restored-from-snapshoots-2-master-nodes-but-several-indecies-are-in-unassigned-state/322113/4 "2022-12-28T16:57:03Z")

</div>

Sorry. Forgot log:

```auto
[2022-12-28T15:43:19,823][DEBUG][o.e.a.s.TransportSearchAction] [node3] [_na_][production$syncissue][0]: Failed to execute [SearchRequest{searchType=QUERY_THEN_FETCH, indices=[production$customruletemplate, production$characteristicslist, searchconfiguration$contextlocking, production$businessentity, production$contextmapper, production$priceevent, production$message, production$mergedruleaction, production$distributioninfo, production$businessrequest, production$stackablepromotiongroup, production$entityconfiguration, production$contextmapperindex, production$auxiliaryobjectmethod, production$genericelement, production$workflow, production$ruletemplate, production$qualificationcriterion, production$entitymethod, production$pricingitemtype, production$productofferingcategory, production$productofferingrelationship, production$uirulemetadata, production$mergedcontextmapper, production$mergedruletemplate, production$price, production$productspecification, production$pricequalificationrule, production$businessentitytype, production$auxiliarytype, production$elementarytypemethod, production$productofferinggroup, production$promotiongroup, production$pricingcharacteristic, production$variantgroup, production$pricepolicy, production$productofferingtermpolicy, production$mergedruleactionwithpopulatedrefs, production$operator, production$mergedcontextmapperindex, production$syncissue, production$rulecontextmodel, production$discount, production$genericentityspecification, production$metadata, production$category, production$auxiliaryobject, production$productspectype, production$priceversion, production$customcontextmapper, production$qualificationcriteria, production$propertytype, production$customcontextmapperindex, production$compositeprice, production$policy, production$mergedcontextwithnonpopulatedrefs, production$ruleskeleton, production$externalrecord, production$customoperator, production$elementarytype, production$ruleaction, production$pseudoattribute, production$customrulecontextmodel, production$event, production$pricegroup, production$productoffering, production$informationelement, production$mergedoperator, production$genericelemententry, production$buildingblock, production$metadatatype, production$businessrule, production$productofferingtype, production$mergedcontextwithpopulatedrefs, production$population_, production$pricegroupversion, production$promotion], indicesOptions=IndicesOptions[ignore_unavailable=false, allow_no_indices=true, expand_wildcards_open=true, expand_wildcards_closed=false, expand_wildcards_hidden=false, allow_aliases_to_multiple_indices=true, forbid_closed_indices=true, ignore_aliases=false, ignore_throttled=true], types=[], routing='null', preference='null', requestCache=null, scroll=null, maxConcurrentShardRequests=5, batchedReduceSize=512, preFilterShardSize=null, allowPartialSearchResults=true, localClusterAlias=null, getOrCreateAbsoluteStartMillis=-1, ccsMinimizeRoundtrips=true, source={"size":3,"query":{"match_all":{"boost":1.0}}}}] lastShard [true]
org.elasticsearch.action.NoShardAvailableActionException: null
        at org.elasticsearch.action.search.AbstractSearchAsyncAction.performPhaseOnShard(AbstractSearchAsyncAction.java:292) [elasticsearch-7.13.2.jar:7.13.2]

```

---

<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:** [January 25, 2023, 4:58pm UTC](https://discuss.elastic.co/t/restored-from-snapshoots-2-master-nodes-but-several-indecies-are-in-unassigned-state/322113/5 "2023-01-25T16:58:03Z")

</div>

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