• flood stage disk watermark [95%] exceeded ... all indices on this node will be marked readonly


    最近遇到了一个问题,想登录测试环境的kibana查看一下近期的日志情况,但是发现近一周并没有日志显示,查看elasticsearch的日志时发现了以下报错:

    [node-1] flood stage disk watermark [95%] exceeded on [JI43BoeFR8G8Q5oUYW2uXg][node-1][/usr/local/elasticsearch-7.1.0/data/nodes/0] free: 7.7gb[4.9%], all indices on this node will be marked read-only
    

    这是说磁盘使用率超过阈值95%,所以es索引模式变成只读,无法写入数据,从而导致kibana没有数据显示。

    针对该问题,有两种解决办法:

    • 1.清理磁盘空间
      因为elasticsearch会对磁盘空间进行监控,当磁盘剩余空间达到了flood stage阈值,会将所有的相关索引强制设置为只读。需要清理磁盘空间后,才能写入数据。
      具体的清理办法可以参考我的这篇博客:https://www.cnblogs.com/even160941/p/16313449.html

    • 2.调整elasticsearch的默认阈值
      /config/elasticsearch.yml文件中增加如下配置:

    cluster.routing.allocation.disk.watermark.low: 90%
    cluster.routing.allocation.disk.watermark.high: 95%
    cluster.routing.allocation.disk.watermark.flood_stage: 97%
    

    cluster.routing.allocation.disk.watermark.low: 100gb
    cluster.routing.allocation.disk.watermark.high: 50gb
    cluster.routing.allocation.disk.watermark.flood_stage: 10gb
    

    其中:

    cluster.routing.allocation.disk.watermark.low,默认85%,用于控制磁盘的最小使用率;cluster.routing.allocation.disk.watermark.high,默认90%,用于控制磁盘的最大使用率;cluster.routing.allocation.disk.watermark.flood_stage,默认95%,超过此值时,Elasticsearch 变成只读模式,无法写入数据。
    

    注:上述配置必须同时设为百分比,或具体字节值,不能混用。

  • 相关阅读:
    Java中如何更换jar包中的.class文件并重新打包
    IIS环境配置和项目部署
    C#中Invoke与BeginInvoke区别
    Windows编程 网络编程基础
    Windows编程 网络编程常见结构体
    什么是OpenGL中的深度、深度缓存、深度测试
    三维场景的渲染优化
    矢量数据转换成栅格数据
    vs2010 c# 配置项问题
    宝宝小时候竟然是近视?
  • 原文地址:https://www.cnblogs.com/even160941/p/16315259.html
Copyright © 2020-2023  润新知