基于es做日志的存储,对于历史index(没有新数据写入)会做replica数量调整,副本数从0调整为1。但是经常会发现部分index,replica shard不能assign。
调用 /_cluster/allocation/explain 接口,发现unassign状态的shard都是可以被分配的。
例如:
调用 /_cluster/allocation/explain 接口,发现unassign状态的shard都是可以被分配的。
例如:
{
"index": "billions-bplus-alarm-dynamic-biz-sketch-dao-@2018.02.24",
"shard": 8,
"primary": false,
"current_state": "unassigned",
"unassigned_info": {
"reason": "REPLICA_ADDED",
"at": "2018-02-26T17:30:04.428Z",
"last_allocation_status": "no_attempt"
},
"can_allocate": "yes",
"allocate_explanation": "can allocate the shard",
"target_node": {
"id": "Bp7Dya1_TDG6e79NkR99fQ",
"name": "hzxs-billions-es-03-datanode_stale",
"transport_address": "172.19.20.221:9301",
"attributes": {
"box_type": "stale"
}
},
"node_allocation_decisions": [
{
"node_id": "DGiC5DK1SMK4cqew3iWvpA",
"node_name": "hzxs-billions-es-18-datanode_stale",
"transport_address": "172.19.20.236:9301",
"node_attributes": {
"box_type": "stale"
},
"node_decision": "yes",
"weight_ranking": 23
},
{
"node_id": "LLVHrovaRiek8A4cYqtjfQ",
"node_name": "hzxs-billions-es-19-datanode_stale",
"transport_address": "172.19.20.237:9301",
"node_attributes": {
"box_type": "stale"
},
"node_decision": "yes",
"weight_ranking": 24
},
{
"node_id": "Bp7Dya1_TDG6e79NkR99fQ",
"node_name": "hzxs-billions-es-03-datanode_stale",
"transport_address": "172.19.20.221:9301",
"node_attributes": {
"box_type": "stale"
},
"node_decision": "yes",
"weight_ranking": 25
},
这个unassign状态一直持续,不能恢复。 es的版本是5.4.3, 大家有遇到过类似的问题吗?
2 个回复
illbehere - 80后it男
赞同来自:
http://www.fanjunyue.com/index ... jing/
laoyang360 - 《一本书讲透Elasticsearch》作者,Elastic认证工程师 [死磕Elasitcsearch]知识星球地址:http://t.cn/RmwM3N9;微信公众号:铭毅天下; 博客:https://elastic.blog.csdn.net
赞同来自: