elasticsearch 启动报错:[1]: max file descriptors [65535] for elasticsearch process is too low, increase to at least [65536] [2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

elasticsearch 启动报错:

ERROR: [3] bootstrap checks failed  
[1]: max file descriptors [65535] for elasticsearch process is too low, increase to at least [65536]  
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144] 

1 个解决方案

AllenJiang
中间件研发,关注微信公众号 : 小哈学Java, 回复"666", 即可免费领取10G学习&面试资料

第一步:修改 /etc/security/limits.conf,修改到提示值即可

[root@centos7.4-64 ~]# vim /etc/security/limits.conf  
* hard nofile 65536  

注意:如果不生效,可能和命令行的缓存有关,关闭命令行重新打开,再启动 elasticsearch

第二步:修改 /etc/sysctl.conf

添加配置:vm.max_map_count=262144,然后执行命令 sysctl -p