当前位置:网站首页>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
边栏推荐
- Cesium 已知一点经纬度和距离求另一个点的经纬度
- ndk初学习(一)
- 【网络安全】sql注入语法汇总
- Codes de non - retour à zéro inversés, codes Manchester et codes Manchester différentiels couramment utilisés pour le codage des signaux numériques
- CVPR2022 | 医学图像分析中基于频率注入的后门攻击
- 请问,如图,pyhon云函数提示使用了 pymysql模块,这个是怎么回事?
- SAKT方法部分介绍
- Hangdian oj2092 integer solution
- Use day JS let time (displayed as minutes, hours, days, months, and so on)
- Differences between cookies and sessions
猜你喜欢
Parsing of XML files
UML 顺序图(时序图)
[Reading stereo matching papers] [III] ints
手把手教会:XML建模
Transferring files between VMware and host
Wired network IP address of VMware shared host
LeetCode 648. 单词替换
Horizontal of libsgm_ path_ Interpretation of aggregation program
js 获取当前时间 年月日,uniapp定位 小程序打开地图选择地点
常用数字信号编码之反向不归零码码、曼彻斯特编码、差分曼彻斯特编码
随机推荐
Démontage de la fonction du système multi - Merchant Mall 01 - architecture du produit
[network security] SQL injection syntax summary
docker部署oracle
一个程序员的水平能差到什么程度?尼玛,都是人才呀...
The longest ascending subsequence model acwing 1012 Sister cities
Reading and understanding of eventbus source code
Mmkv use and principle
call undefined function openssl_ cipher_ iv_ length
wpf dataGrid 实现单行某个数据变化 ui 界面随之响应
请问,PTS对数据库压测有好方案么?
Environment configuration
Excuse me, as shown in the figure, the python cloud function prompt uses the pymysql module. What's the matter?
Excellent open source system recommendation of ThinkPHP framework
Use case diagram
搜索引擎接口
When FC connects to the database, do you have to use a custom domain name to access it outside?
用例图
【立体匹配论文阅读】【三】INTS
今日睡眠质量记录78分
請問,在使用flink sql sink數據到kafka的時候出現執行成功,但是kafka裏面沒有數