es启动报错: Native controller process has stopped - no new native processes can be started

主要出现下面三个错误

ERROR: [3] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
[2]: max number of threads [3780] for user [esyonghu] is too low, increase to at least [4096]
[3]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[2018-12-12T21:54:57,353][INFO ][o.e.n.Node               ] [PlbSkhz] stopping ...
[2018-12-12T21:54:57,413][INFO ][o.e.n.Node               ] [PlbSkhz] stopped
[2018-12-12T21:54:57,413][INFO ][o.e.n.Node               ] [PlbSkhz] closing ...
[2018-12-12T21:54:57,473][INFO ][o.e.n.Node               ] [PlbSkhz] closed
[2018-12-12T21:54:57,488][INFO ][o.e.x.m.j.p.NativeController] [PlbSkhz] Native controller process has stopped - no new native processes can be started
解决方法

[root@localhost ~]# vi /etc/security/limits.conf
在文件的末尾加上

esyonghu soft nofile 65536
esyonghu hard nofile 65536
esyonghu soft nproc 4096
esyonghu hard nproc 4096
进入到下面文件夹

[root@localhost ~]# cd /etc/security/limits.d
[root@localhost limits.d]# ll
total 4
-rw-r--r--. 1 root root 191 Nov  6  2016 20-nproc.conf
 
[root@localhost limits.d]# vi 20-nproc.conf 
 
# Default limit for number of user's processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.
 
*          soft    nproc     4096
root       soft    nproc     unlimited
~                                                                                                                            
~  
将上面内容的*号改成用户名

# See rhbz #432903 for reasoning.
 
esyonghu   soft    nproc     4096
root       soft    nproc     unlimited
修改下面文件加上内容

[root@localhost security]# vi /etc/sysctl.conf 
vm.max_map_count = 655360
对于上面的内容让其生效

[root@localhost security]# sysctl -p
vm.max_map_count = 655360
————————————————
版权声明:本文为CSDN博主「zhanghe687」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/zhanghe687/article/details/84979833

你可能感兴趣的:(大数据)