ES Validation Failed: 1: this action would add [1] shards, but this cluster currently has [1000]/[1000] maximum normal shards open;

[2024-05-01T08:56:52,606][ERROR][o.e.x.i.IndexLifecycleRunner] [tools] policy [ilm-history-ilm-policy] for index [.ds-ilm-history-5-2024.03.28-000001] failed on step [{"phase":"hot","action":"rollover","name":"attempt-rollover"}]. Moving to ERROR step
org.elasticsearch.common.ValidationException: Validation Failed: 1: this action would add [1] shards, but this cluster currently has [1000]/[1000] maximum normal shards open;

复制代码
 

# 查看当前集群的最大分片数可以使用以下API:
GET /_cluster/settings?include_defaults=true

#如果你需要调整最大分片数 PUT
/_cluster/settings { "persistent": { "cluster.max_shards_per_node": "10000" } }
复制代码

也可以调整 ES 的yaml 文件进行调整

以下是如何在elasticsearch.yml中新增cluster.max_shards_per_node参数的步骤:

  1. 打开elasticsearch.yml文件,该文件通常位于Elasticsearch安装目录的config文件夹中。

  2. 在文件中找到类似# ======================== Elasticsearch Configuration =========================的注释行,这通常标志着配置文件的开始。

  3. 在该注释行之后,添加你的新配置。对于cluster.max_shards_per_node,你可以这样添加:

    yamlcluster.max_shards_per_node: 10000

    其中10000是你想要设置的最大分片数。

  4. 保存并关闭elasticsearch.yml文件。

  5. 重启Elasticsearch集群,使新的配置生效。

posted @   不会游泳的鱼丶  阅读(426)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
点击右上角即可分享
微信分享提示