ES启动报错 max file descriptors [4096] for elasticsearch process is too low,increase to at least [65536]

es启动出现下面错误:

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

解决方法

1. 修改limits.conf

vim /etc/security/limits.conf

在文件后面添加

* soft nofile 65536
* hard nofile 65536
* soft nproc 4096
* hard nproc 4096

注:*后面有空格,操作必须切换到root用户

2. 重启es,错误解决