更新时间:2025-09-04 GMT+08:00
Elasticsearch集群某一节点分配不到shard
解决方案
- 执行如下命令,查看未分配的shard。
GET _cluster/allocation/explain?pretty
图1 查看未分配的shard - 在集群列表,选择目标集群,单击操作列的“更多 > Cerebro”,登录Cerebro。
- 在Cerebro页面,选择“allocation.enable”,将“none”改为“all”。
- 如果没有Cerebro,也可以执行如下命令处理。
curl -X PUT "http://内网ip:9200/_cluster/settings" -H 'Content-Type: application/json' -d'{"persistent":{"cluster.routing.allocation.enable": "all"}}'
父主题: 功能使用类