es集群重新分片报错Too many open files解决

现象

在这里插入图片描述

查看es集群状态

后面所有操作均在开发工具中操作, 命令行是 curl -XGET -uelastic:password http://ip:9200/_cluster/health

GET _cluster/health
在这里插入图片描述

查看解释

GET /_cluster/allocation/explain
在这里插入图片描述

查看es日志

[WARN ][o.e.c.r.a.AllocationService] [node-2] failing shard [failed shard, shard [hotel-operation-platform-points-pro-2024.08.28][2], node[nbf_TjbDQeqC3kTkcm1Ehw], [P], s[STARTED], a[id=5S3X4mw4TMCbGJR0IO35hA], message [shard failure, reason [index id[dfqXm5EBeV79l1m1taGu] origin[PRIMARY] seq#[106704]]], failure [FileSystemException[/data/elasticsearch/data/nodes/0/indices/QAWmzM4HRV6cBn9tRiJDsg/2/index/_1h_Lucene85FieldsIndexfile_pointers_1.tmp: Too many open files]], markAsStale [true]]
java.nio.file.FileSystemException: /data/elasticsearch/data/nodes/0/indices/QAWmzM4HRV6cBn9tRiJDsg/2/index/_1h_Lucene85FieldsIndexfile_pointers_1.tmp: Too many open files

查看es最大打开文件描述符及使用
GET _nodes/stats/process?filter_path=**.max_file_descriptors
在这里插入图片描述
GET _nodes/stats?pretty 之前open_file_descriptors的值已经非常接近设置的65536
在这里插入图片描述

解决

增加最大打开文件描述符
1、/etc/security/limits.conf
es soft nofile 1024000
es hard nofile 1024000
2、启动脚本添加
LimitNOFILE=1024000
LimitNPROC=1024000
在这里插入图片描述
3、systemctl daemon-reload
4、重启es集群(做好启master节点)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值