ES 常见错误

报错 maximum shards open

问题描述

创建索引时,报错显示this action would add [2] total shards, but this cluster currently has [1000]/[1000] maximum shards open。

查看分片数量

GET /_cluster/settings?filter_path=transient.cluster.max_shards_per_node,persistent.cluste.max_shards_per_node

{
  "transient" : {
    "cluster" : {
      "max_shards_per_node" : "1000"
    }
  }
}

问题原因

由于节点shard数量超过最大值限制,ES默认每个节点的shard数量是1000,如果shard数量超过这个值创建索引会报错。

解决方案

  1. 关闭或者删除不用的索引,减少shard数量。

  2. 修改节点的shard数量的限制,这里设置 3000。

或者

文章参考

CSS创建索引报错maximum shards open_云搜索服务 CSS_故障排除_功能使用类 (huaweicloud.com)

报错 org.elasticsearch.action.search.SearchPhaseExecutionException: all shards failed

问题表述描述

如何处理

如果问题持续,考虑删除并重建索引, UI中,重新创建索引

Last updated