Since there are 207 unassigned shrads, my cluster status became yellow. I ran the API "_cluster/allocation/explain" and got below results.
{
"index": "en_y_29",
"shard": 1,
"primary": false,
"current_state": "unassigned",
"unassigned_info": {
"reason": "CLUSTER_RECOVERED",
"at": "2020-03-31T12:10:04.627Z",
"last_allocation_status": "no_attempt"
},
"can_allocate": "no",
"allocate_explanation": "cannot allocate because allocation is not permitted to any of the nodes",
"node_allocation_decisions": [
{
"node_id": "BD6tAWxMQwGUf6rab6DBIg",
"node_name": "elk-denmod-1",
"transport_address": "168.124.183.229:9300",
"node_decision": "no",
"deciders": [
{
"decider": "same_shard",
"decision": "NO",
"explanation": "the shard cannot be allocated to the same node on which a copy of the shard already exists [[en_y_29][1], node[BD6tAWxMQwGUf6rab6DBIg], [P], s[STARTED], a[id=YdGSMhPKROS0x1hiZEhJ5w]]"
}
]
}
]
}
is it because that we didn't select any value for setting "cluster.routing.allication.enable"? what should i do now to allocate all the unassined shrads now?
Replicas can never be allocated to the same node as the primary so what you are seeing is expected and not a problem. You can get them green by setting the number of replicas to 0 for all indices.
We have two master nodes in our cluster. if we change the one of the master nodes as both master and data node, will it allocate the replica shrads in that node automatically?
you mean hardware specification? if i change all the nodes as master/data, will the replica shrads allocate automatically or do i need to allocate it manually?
Do you mean hardware specification in the above reply should be same for all the three nodes? Once i changed all the nodes as both master\data, do i need to restart the Elasticsearch service? or should i stop the service before making changes?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.