回复 rockybean:定位到了那个命令出来后是这个样子
GET _cluster/allocation/explain
{
"index": "apachelog-2015.05.17",
"shard": 2,
"primary": true,
"current_state": "unassigned",
"unassigned_info": {
"reason": "INDEX_CREATED",
"at": "2018-06-28T02:51:05.736Z",
"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": "zMOX1zjIRqe-AxSbvWxf2A",
"node_name": "ctgegh03",
"transport_address": "134.96.252.88:9300",
"node_decision": "no",
"weight_ranking": 1,
"deciders": [
{
"decider": "enable",
"decision": "NO",
"explanation": "no allocations are allowed due to cluster setting [cluster.routing.allocation.enable=none]"
}
]
},
{
"node_id": "oaperWCYRY2djW_9lYIkFA",
"node_name": "ctgexh01",
"transport_address": "134.96.252.90:9300",
"node_decision": "no",
"weight_ranking": 2,
"deciders": [
{
"decider": "enable",
"decision": "NO",
"explanation": "no allocations are allowed due to cluster setting [cluster.routing.allocation.enable=none]"
}
]
},
{
"node_id": "NDwlNyXlSLO3GI25_iQx6A",
"node_name": "ctgegh04",
"transport_address": "134.96.252.89:9300",
"node_decision": "no",
"weight_ranking": 3,
"deciders": [
{
"decider": "enable",
"decision": "NO",
"explanation": "no allocations are allowed due to cluster setting [cluster.routing.allocation.enable=none]"
}
]
}
]
}
日志是
[2018-06-28T10:52:42,362][DEBUG][o.e.a.a.c.a.TransportClusterAllocationExplainAction] [ctgegh04] explaining the allocation for [ClusterAllocationExplainRequest[useAnyUnassignedShard=true,includeYesDecisions?=false], found shard [[apachelog-2015.05.17][2], node[null], [P], recovery_source[new shard recovery], s[UNASSIGNED], unassigned_info[[reason=INDEX_CREATED], at[2018-06-28T02:51:05.736Z], delayed=false, allocation_status[deciders_no]]]
我开启cluster.routing.allocation.enable=none 为all就恢复了正常