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

问题:

[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 ~]# vim /etc/security/limits.conf
在文件的末尾加上
elasticsearch soft nofile 65536
elasticsearch hard nofile 65536
elasticsearch soft nproc 4096
elasticsearch hard nproc 4096

注:elasticsearch 为启动es的用户名

[root@localhost ~]# cd /etc/security/limits.d
[root@localhost limits.d]# ll
total 4
-rw-r--r--. 1 root root 191 Nov  6  2019 90-nproc.conf
[root@localhost limits.d]# vim 90-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

~                                                                                                                            

~  

 

将上面内容的*号改成启动es的用户名

# See rhbz #432903 for reasoning.

 

elasticsearch 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

 

你可能感兴趣的:(elasticsearch启动报错: Native controller process has stopped - no new native processes can be started)