问题描述:
最新版本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-11-8T04:55:45,240][INFO ][o.e.n.Node] [vJDcSkt] stopping ...
[2016-11-8T04:55:45,249][INFO ][o.e.n.Node] [vJDcSkt] stopped
[2016-11-8T04:55:45,249][INFO ][o.e.n.Node] [vJDcSkt] closing ...
[2016-11-8T04:55:45,257][INFO ][o.e.n.Node] [vJDcSkt] closed
解决办法:
问题1:
max file descriptors [4096] for elasticsearch process likely too low, increase to at least [65536]
修改/etc/security/limits.conf文件,添加或修改如下行:
* hard nofile 65536
* soft nofile 65536
问题2:
max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]
使用下面的方法临时使其生效
$ sudo sysctl -w vm.max_map_count=262144
或者修改 /etc/sysctl.conf 文件,添加 “vm.max_map_count”设置
设置后,可以使用
$ sysctl -a