GET /_cluster/allocation/explain?pretty 如下:
{ "index" : "home_page_dynamic_index", "shard" : 3, "primary" : false, "current_state" : "unassigned", "unassigned_info" : { "reason" : "CLUSTER_RECOVERED", "at" : "2018-09-19T04:48:52.410Z", "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" : "Wl9szqEpR2-BsmQhNduIqA", "node_name" : "swhy-node-01", "transport_address" : "172.17.0.1: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 [[home_page_dynamic_index][3], node[Wl9szqEpR2-BsmQhNduIqA], [P], s[STARTED], a[id=pWNm54C6SoOTTsXXvX6PuA]]" } ] } ] }
128机器:
131机器
{ "index" : "home_page_dynamic_index", "shard" : 3, "primary" : false, "current_state" : "unassigned", "unassigned_info" : { "reason" : "CLUSTER_RECOVERED", "at" : "2018-09-19T04:48:52.410Z", "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" : "Wl9szqEpR2-BsmQhNduIqA", "node_name" : "swhy-node-01", "transport_address" : "172.17.0.1: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 [[home_page_dynamic_index][3], node[Wl9szqEpR2-BsmQhNduIqA], [P], s[STARTED], a[id=pWNm54C6SoOTTsXXvX6PuA]]" } ] } ] }
128机器:
131机器
7 个回复
zqc0512 - andy zhou
赞同来自:
这是原因……你有节点挂了?还是自己玩的环境?
qw8613243
赞同来自:
juin - 大数据开发
赞同来自:
rojay - 杭州的一枚90后初入职场的IT男
赞同来自:
yayg2008
赞同来自:
laoyang360 - 《一本书讲透Elasticsearch》作者,Elastic认证工程师 [死磕Elasitcsearch]知识星球地址:http://t.cn/RmwM3N9;微信公众号:铭毅天下; 博客:https://elastic.blog.csdn.net
赞同来自:
1、https://blog.csdn.net/laoyang3 ... 43006
2、https://blog.csdn.net/laoyang3 ... 71491
zqc0512 - andy zhou
赞同来自:
discovery.zen.ping.unicast.hosts:
应该是这玩意错误了。把所有节点都添加进行,不要用9300,只要IP地址。
discovery.zen.ping.unicast.hosts: ["xxxx", "xxxx"]