http://blog.csdn.net/kongxx/article/details/52993057


CentOS7上elasticsearch5.0启动失败

问题描述:

最新版本5.0release了,想着装上试试,结果一上来就报了两个错,然后就退出了,如下:

$ ./elasticsearch
...
ERROR: bootstrap checks failed
max file descriptors [4096] for elasticsearch process likely too low, increase to at least [65536]
max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]
[2016-10-31T04:55:45,240][INFO ][o.e.n.Node ] [vJDcSkt] stopping ...
[2016-10-31T04:55:45,249][INFO ][o.e.n.Node ] [vJDcSkt] stopped
[2016-10-31T04:55:45,249][INFO ][o.e.n.Node ] [vJDcSkt] closing ...
[2016-10-31T04:55:45,257][INFO ][o.e.n.Node ] [vJDcSkt] closed
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

解决办法:

问题1:

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

修改/etc/security/limits.conf文件,添加或修改如下行:

* hard    nofile           65536
* soft    nofile           65536
  • 1
  • 2

问题2:

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

使用下面的方法临时使其生效

$ sudo sysctl -w vm.max_map_count=262144
  • 1

或者修改 /etc/sysctl.conf 文件,添加 “vm.max_map_count”设置

设置后,可以使用

$ sysctl -a
  • 1

转载请以链接形式标明本文链接 
本文链接:http://blog.csdn.net/kongxx/article/details/52993057