ELK报错,索引变成只读状态。

问题描述

今天发现当天的索引在ES中并没有创建,logstash中不停的报错:

2021-05-24T05:47:51,904INFO logstash.outputs.elasticsearch retrying failed action with response code: 403 ({"type"=>"cluster_block_exception", "reason"=>"blocked by: FORBIDDEN/12/index read-only / allow delete (api);"})

2021-05-24T05:47:51,904INFO logstash.outputs.elasticsearch Retrying individual bulk actions that failed or were rejected by the previous bulk request. {:count=>1}

索引变成了只读:

原因

一旦在存储超过95%的磁盘中的节点上分配了一个或多个分片的任何索引,该索引将被强制进入只读模式

解决办法

经过分析,发现是因为ES所在服务器磁盘空间太低引起,具体解决办法如下:

第一种办法:在kibana开发控制台执行下面语句:

c 复制代码
PUT _settings
{
  "index": {
    "blocks": {
      "read_only_allow_delete": null
    }
  }
}

第二种办法:在es节点服务器上执行:

c 复制代码
curl -XPUT -H 'Content-Type: application/json' http://localhost:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'
相关推荐
summerkissyou19876 小时前
Android - 摄像头 - hal - 开发教程,例子,常见问题,分析方法,解决方案
android
summerkissyou19877 小时前
Android 16 架构图
android
神龙天舞20018 小时前
MySQL 备库为什么会延迟好几个小时
android·数据库·mysql
码农coding11 小时前
android12 systemUI 之锁屏
android
圆山猫11 小时前
[Virtualization](三):RISC-V H-extension 与 Guest 执行模式
android·java·risc-v
爱笑鱼11 小时前
Binder(七):getCallingUid() 读到的是谁?clearCallingIdentity() 又清掉了什么?
android
2501_9159090617 小时前
iOS 应用反调试技详解术 检测调试器的原理与防护实践
android·ios·小程序·https·uni-app·iphone·webview
Lvan的前端笔记17 小时前
AndroidX 完全入门指南
android·androidx
帅次18 小时前
Android 应用高级面试:Window 近1年高频追问 18 题
android·面试·职场和发展
总捣什么乱118 小时前
MySQL MySQL是怎么保证主备一致的?
android·mysql·adb