ERROR: [2] bootstrap checks failed.You must address the points described in the following [2] lines before starting Elasticsearch.
bootstrap checks failed [1] of [2]: memory locking requested for elasticsearch process but memory is not locked
bootstrap checks failed [1] of [2]: 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 /a/es/logs/my-cluster.log
系统:centos7.6 (vm虚拟机)
软件:java-1.8、elasticsearch-5.6.16-1.noarch
错误信息:
[2019-11-21T00:29:51,557][ERROR][o.e.b.Bootstrap ] [elk-1] node validation exception
[1] bootstrap checks failed
[1]: memory locking requested for elasticsearch process but memory is not locked
解决方法一(关闭bootstrap.memory_lock:,会影响性能):
bootstrap.memory_lock: false
解决方法二(开启bootstrap.memory_lock:):
bootstrap.memory_lock: true
vim /etc/security/limits.conf
* soft nofile 65536
* hard nofile 65536
* soft nproc 32000
* hard nproc 32000
* hard memlock unlimited
* soft memlock unlimited
DefaultLimitNOFILE=65536
DefaultLimitNPROC=32000
DefaultLimitMEMLOCK=infinity
改好后重启下系统。再启动elasticsearch就没报错了 。
vim /etc/sysctl.conf
保存文件并执行以下命令使修改生效:
sysctl -p
es7.13.2启动报错:
bootstrap checks failed [1] of [2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
vim /etc/sysctl.conf
vm.max_map_count=262144
sysctl -p