ElasticSearch启动报错,报ERROR: [3] bootstrap checks failed [1]: max file descriptors [4096]

安装elasticsearch启动时报错:

ERROR: [3] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
[2]: memory locking requested for elasticsearch process but memory is not locked
[3]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
ERROR: Elasticsearch did not exit normally - check the logs at /usr/local/soft/elasticsearch-7.11.1/logs/wen.log
在这里插入图片描述

报错信息1:

max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
解决办法:
编辑 /etc/security/limits.conf
vi /etc/security/limits.conf,添加下面内容:
* soft nofile 65536
* hard nofile 65536
之后重新登录生效。

报错信息2:

memory locking requested for elasticsearch process but memory is not locked
解决办法:
修改elasticsearch.yml中的配置: bootstrap.memory_lock: false

报错信息3:

max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
解决办法:
在/etc/sysctl.conf文件最后添加一行

vm.max_map_count=262144
执行/sbin/sysctl -p 立即生效
在这里插入图片描述


版权声明:本文为qq_44086320原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。