问题:
[2020-05-25T15:47:56,016][ERROR][o.e.b.Bootstrap ] [node-1] node validation exception
[2] bootstrap checks failed
[1]: max file descriptors [4096] 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]
[2020-05-25T15:47:56,018][INFO ][o.e.n.Node ] [node-1] stopping ...
[2020-05-25T15:47:56,034][INFO ][o.e.n.Node ] [node-1] stopped
[2020-05-25T15:47:56,034][INFO ][o.e.n.Node ] [node-1] closing ...
[2020-05-25T15:47:56,049][INFO ][o.e.n.Node ] [node-1] closed
解决:
1. max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
使用ulimit 命令可以分别查看软限制和硬限制,方法实在查看的参数前加 S 或 H。例如,查看打开文件数限制
ulimit -Sn
查看的是软限制
ulimit -Hn
查看的是硬限制
修改/etc/security/limits.conf文件,
增加配置,如下图:
2. max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
修改/etc/sysctl.conf文件,
增加配置,如下图:
执行命令sysctl -p生效