【ElasticSearch】异常TOO_MANY_REQUESTS/12/disk usage exceeded flood-stage watermark, index has read-only-allow-delete block

TOO_MANY_REQUESTS/12/disk usage exceeded flood-stage watermark, index has read-only-allow-delete block

磁盘使用量超过洪泛阶段水印,索引具有只读允许删除块

解决:扩充磁盘,重启ES

给磁盘扩容后关闭只读,验证没成功

kibana中
PUT _all/_settings
{
  "index.blocks.read_only_allow_delete": null
}
shell中
curl -XPUT  http://localhost:9200/_all/_settings -H 'Content-Type: application/json' -d '
{
  "index.blocks.read_only_allow_delete": null
}
'

 

如果来不及给Elasticsearch硬盘扩容,可以先关闭磁盘分配保护,让最后仅有的5%的磁盘空间缓冲一点时间,然后再给硬盘扩容。,验证

关闭磁盘分配保护

kibana中
PUT _cluster/settings
{
  "transient": {
    "cluster.routing.allocation.disk.threshold_enabled": false
  }
}
shell中
curl -XPUT  http://localhost:9200/_cluster/settings -H 'Content-Type: application/json' -d '
{
  "transient": {
    "cluster.routing.allocation.disk.threshold_enabled": false
  }
}
'

磁盘扩容完毕后,启用磁盘分配保护

kibana中
PUT _cluster/settings
{
  "transient": {
    "cluster.routing.allocation.disk.threshold_enabled": true
  }
}
shell中
curl -XPUT  http://localhost:9200/_cluster/settings -H 'Content-Type: application/json' -d '
{
  "transient": {
    "cluster.routing.allocation.disk.threshold_enabled": true
  }
}
'

 

参考博文:https://blog.csdn.net/piaoxue820/article/details/123638653

posted @ 2022-07-30 22:16  翠微  阅读(3135)  评论(0编辑  收藏  举报