this cluster currently has [1946]/[1000] maximum shards open

Elasticsearch報錯:

this cluster currently has [1946]/[1000] maximum shards open

原因:

ElasticSearch 7.x 如果沒有配置 cluster.max_shards_per_node ,默認的分片數是1000。

 

方法:

1、控制檯

PUT /_cluster/settings
{
  "transient": {
    "cluster": {
      "max_shards_per_node":10000
    }
  }
}

2、修改配置文件

# vim elasticsearch.yml
cluster.max_shards_per_node: 10000

 

3、shell命令

curl -XPUT -H"Content-Type:application/json"  -d'{"transient":{"cluster":{"max_shards_per_node":10000}}}'  -u elastic:xxoo  'http://localhost:9200/_cluster/settings'

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章