elasticsearch群集在添加节点后不重新平衡(elasticsearch Cluster not rebalancing after adding nodes)

编程入门 行业动态 更新时间:2024-10-14 22:17:08
elasticsearch群集在添加节点后不重新平衡(elasticsearch Cluster not rebalancing after adding nodes)

我有一个包含2个节点的集群,我添加了3个加入集群的节点。 我可以向他们发送请求并获得结果。 但是,当我检查他们没有任何文件。 我有一个5分片索引,我期待每个节点都会收到一个分片?

{ cluster_name: "es-poc", status: "green", timed_out: false, number_of_nodes: 5, number_of_data_nodes: 5, active_primary_shards: 5, active_shards: 10, relocating_shards: 0, initializing_shards: 0, unassigned_shards: 0, delayed_unassigned_shards: 0, number_of_pending_tasks: 0, number_of_in_flight_fetch: 0, task_max_waiting_in_queue_millis: 0, active_shards_percent_as_number: 100 }

I have a cluster with 2 nodes, I added 3 more nodes which joined the cluster. I am able to send request to them and get results. however when i check they dont have any documents. I have a 5 shard index and i was expecting that each node would receive a shard?

{ cluster_name: "es-poc", status: "green", timed_out: false, number_of_nodes: 5, number_of_data_nodes: 5, active_primary_shards: 5, active_shards: 10, relocating_shards: 0, initializing_shards: 0, unassigned_shards: 0, delayed_unassigned_shards: 0, number_of_pending_tasks: 0, number_of_in_flight_fetch: 0, task_max_waiting_in_queue_millis: 0, active_shards_percent_as_number: 100 }

最满意答案

感谢您的回复,问题是所有节点上的版本不一样,现有成员有2.3.4,而新成员有2.3.3。

通过这样做我发现了这个:

POST _cluster/reroute?explain { "commands": [ { "move" : { "index" : "event4", "shard" : 0, "from_node" : "Toad", "to_node" : "Amelia Voght" } } ] }

在回答中,我在解释部分看到了这一点

{ "decider": "node_version", "decision": "NO", "explanation": "target node version [2.3.3] is older than source node version [2.3.4]" },

Thanks for the responses, the issue was that the versions where not the same on all the nodes, the existing members had 2.3.4, while the new members had 2.3.3.

i found this out by doing:

POST _cluster/reroute?explain { "commands": [ { "move" : { "index" : "event4", "shard" : 0, "from_node" : "Toad", "to_node" : "Amelia Voght" } } ] }

in the response i saw this in the explain section

{ "decider": "node_version", "decision": "NO", "explanation": "target node version [2.3.3] is older than source node version [2.3.4]" },

更多推荐

本文发布于:2023-08-07 00:58:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1459430.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:节点   Cluster   elasticsearch   nodes   adding

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!