集群报红问题
来源:21-1 -项目介绍

qq_无妄_3
2018-06-27
集群第一天所有操作没事;第二天创建新的索引报红;重启后问题解决;但是第三天创建新的索引又会报红
6回答
-
这个问题是 shard allocation 失败的问题,那么可以使用以下接口看下失败的原因(注意是在出问题的时候看)
GET _cluster/allocation/explain
https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html
另外再关注下 es 日志里面有无有价值的信息
132018-06-28 -
qq_无妄_3
提问者
2018-06-28
回复 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就恢复了正常012018-06-28 -
qq_无妄_3
提问者
2018-06-27
cluster settings
00 -
qq_无妄_3
提问者
2018-06-27
GET _cluster/settings
{
"persistent": {},
"transient": {}
}00 -
rockybean
2018-06-27
你的集群配置发一下
GET _cluster/settings
012018-06-27 -
qq_无妄_3
提问者
2018-06-27
版本为6.1.3
00
相似问题