错误信息:

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

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐