错误信息:

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

问题原因:

es高版本对资源要求较高,linux系统默认配置不能满足它的要求,所以需要单独配置

解决方法:

[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]

修改vi /etc/security/limits.conf 文件,加入配置

* hard nofile 65535  # *可以是es启动用户
* soft nofile 65535

[2]: max number of threads [3795] for user [es] is too low, increase to at least [4096]

修改vi /etc/security/limits.conf 文件,加入配置

es - nproc 4096 # es是我的启动用户

上面两个配置项改完后,es启动用户重新登录就会生效;

[3]:max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

修改/etc/sysctl.config文件,加入下面配置

vi /etc/sysctl.conf 

vm.max_map_count=262144

执行命令,立即生效

/sbin/sysctl -p
vm.max_map_count = 262144

​

启动成功

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐