当前位置:网站首页>ES日志报错赏析-- allow delete
ES日志报错赏析-- allow delete
2022-07-07 12:37:00 【ES小助理】
报错现象
[o.e.x.w.e.ExecutionService] [16142xxxxxx20932] could not store triggered watch with id [xxxxx4-2022-07-07T04:04:33.872Z]: [ClusterBlockException[blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];]]报错解析
当磁盘使用率超过85%,或者达到100%,会导致 Elasticsearch 集群或 Kibana 无法正常提供服务,可能会出现以下几种问题场景:
- 在进行索引请求时,返回类似
{[FORBIDDEN/12/index read-only/allow delete(api)];","type":"cluster_block_exception"}的报错。 - 在对集群进行操作时,返回类似
[FORBIDDEN/13/cluster read-only / allow delete (api)]的报错。 - 集群处于 Red 状态,严重情况下存在节点未加入集群的情况(可通过
GET _cat/allocation?v命令查看),并且存在未分配的分片(可通过GET _cat/allocation?v命令查看)。 - 通过 Elasticsearch 控制台的节点监控页面,集群节点磁盘使用率曾达到或者接近100%。
上述问题是由于磁盘使用率过高所导致。数据节点的磁盘使用率存在以下三个水位线,超过水位线可能会影响 Elasticsearch 或 Kibana 服务。
- 当集群磁盘使用率超过85%:会导致新的分片无法分配。
- 当集群磁盘使用率超过90%:Elasticsearch 会尝试将对应节点中的分片迁移到其他磁盘使用率比较低的数据节点中。
- 当集群磁盘使用率超过95%:系统会对 Elasticsearch 集群中对应节点里每个索引强制设置 read_only_allow_delete 属性,此时该节点上的所有索引将无法写入数据,只能读取和删除对应索引。
解决方案
清理集群过期数据
用户可以通过访问【Kibana】>【Dev Tools】删除过期索引释放磁盘空间。步骤如下:警告: 数据删除后将无法恢复,请谨慎操作。您也可以选择保留数据,但需进行磁盘扩容。
第一步:开启集群索引批量操作权限。
PUT _cluster/settings { "persistent": { "action.destructive_requires_name": "false" } }
第二步:删除数据,例如 DELETE NginxLog-12*。
DELETE index-name-*- 执行完上述步骤后,如果用户腾讯云 Elasticsearch 的版本是7.5.1以前的版本,还需要在 Kibana 界面的【Dev Tools】中执行如下命令:
关闭索引只读状态,执行如下命令:
PUT _all/_settings { "index.blocks.read_only_allow_delete": null }关闭集群只读状态,执行如下命令:
PUT _cluster/settings { "persistent": { "cluster.blocks.read_only_allow_delete": null } }- 查看集群索引是否依然为
read_only状态,索引写入是否恢复正常。 - 若集群是否依然为 Red 状态,执行以下命令,查看集群中是否存在未分配的分片。 GET /_cluster/allocation/explain
- 等待分片下发完成后,查看集群状态。如果集群状态依然为 Red,请通过 售后支持 联系腾讯云技术支持。
- 为避免磁盘使用率过高影响 Elasticsearch 服务,建议开启磁盘使用率监控报警,及时查收报警短信,提前做好防御措施,具体可参考 监控告警配置建议。
扩容云硬盘参考:
https://cloud.tencent.com/document/product/845/56276
边栏推荐
- oracle 非自动提交解决
- 请问,我kafka 3个分区,flinksql 任务中 写了 join操作,,我怎么单独给join
- 股票开户首选,炒股交易开户佣金最低网上开户安全吗
- wpf dataGrid 实现单行某个数据变化 ui 界面随之响应
- Reading and understanding of eventbus source code
- C # use TCP protocol to establish connection
- Use case diagram
- Data flow diagram, data dictionary
- Excuse me, why is it that there are no consumption messages in redis and they are all piled up in redis? Cerely is used.
- Selenium库
猜你喜欢

AutoCAD - how to input angle dimensions and CAD diameter symbols greater than 180 degrees?

多商户商城系统功能拆解01讲-产品架构

Beginner JSP

数据流图,数据字典

The longest ascending subsequence model acwing 1014 Mountaineering

Substance Painter笔记:多显示器且多分辨率显示器时的设置

LeetCode每日一题(636. Exclusive Time of Functions)
![Verilog implementation of a simple legv8 processor [4] [explanation of basic knowledge and module design of single cycle implementation]](/img/d3/20674983717d829489149b4d3bfedf.png)
Verilog implementation of a simple legv8 processor [4] [explanation of basic knowledge and module design of single cycle implementation]

MRS离线数据分析:通过Flink作业处理OBS数据

【历史上的今天】7 月 7 日:C# 发布;Chrome OS 问世;《仙剑奇侠传》发行
随机推荐
JS get the current time, month, day, year, and the uniapp location applet opens the map to select the location
Pert diagram (engineering network diagram)
Million data document access of course design
2022PAGC 金帆奖 | 融云荣膺「年度杰出产品技术服务商」
Equipment failure prediction machine failure early warning mechanical equipment vibration monitoring machine failure early warning CNC vibration wireless monitoring equipment abnormal early warning
UML state diagram
常用数字信号编码之反向不归零码码、曼彻斯特编码、差分曼彻斯特编码
The meaning of variables starting with underscores in PHP
AutoCAD - how to input angle dimensions and CAD diameter symbols greater than 180 degrees?
c#通过frame 和 page 切换页面
一个程序员的水平能差到什么程度?尼玛,都是人才呀...
The difference between memory overflow and memory leak
Seven propagation behaviors of transactions
Data flow diagram, data dictionary
Vmware共享主机的有线网络IP地址
搜索引擎接口
Analysis of arouter
Parameter keywords final, flags, internal, mapping keywords internal
Differences between cookies and sessions
Arm cortex-a9, mcimx6u7cvm08ad processor application