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

elasticsearch把network.host:0.0.0.0加上之后启动会报这个错

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

意思是elasticsearch用户拥有的客串建文件描述的权限太低,知道需要65536个

解决:

切换到root用户下面,

vim   /etc/security/limits.conf

在最后添加

* hard nofile 65536

* hard nofile 65536

也就是:

max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]_第1张图片

重新启动elasticsearch,还是无效?

必须重新登录启动elasticsearch的账户才可以,例如我的账户名是elasticsearch,退出重新登录。

另外*也可以换为启动elasticsearch的账户也可以,* 代表所有,其实比较不合适。


启动还会遇到另外一个问题,就是

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

意思是:elasticsearch用户拥有的内存权限太小了,至少需要262114。这个比较简单,也不需要重启,直接执行

sysctl -w vm.max_map_count=262144

就可以了




你可能感兴趣的:(elasticsearch)