Elasticsearch遇到的几个问题及解决办法

本文详细介绍了在启动Elasticsearch过程中可能遇到的五个常见错误及其解决方案,包括调整文件描述符、内存锁定、线程数量、虚拟内存区域和系统调用过滤器设置。通过修改配置文件和系统参数,确保Elasticsearch服务稳定运行。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

启动es遇到的问题:
 

ERROR: [5] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
[2]: memory locking requested for elasticsearch process but memory is not locked
[3]: max number of threads [1024] for user [wangxiang] is too low, increase to at least [4096]
[4]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[5]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk

解决办法:
1.修改vi /etc/security/limits.conf文件,增加配置

*               soft    nofile          65536
*               hard    nofile          65536

2.  切换到root用户,编辑vi /etc/security/limits.conf配置文件,添加如下内容: 

* soft memlock unlimited 

* hard memlock unlimited 

备注:* 代表Linux所有用户名称

3. 最大线程个数太低。修改配置文件 vi /etc/security/limits.d/90-nproc.conf

*               soft    nproc           4096
*               hard    nproc           4096

4. 修改/etc/sysctl.conf文件,增加配置

vm.max_map_count=262144

执行命令sysctl -p生效

5. 在elasticsearch.yml中添加配置项

bootstrap.memory_lock: false
bootstrap.system_call_filter: false

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值