ERROR: [2] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
解决方法:
# vim /etc/sysctl.conf
添加下面配置:
vm.max_map_count=655360
并执行命令:
# sysctl -p
报错信息二:
ERROR: [1] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
解决方法:
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: failed to obtain node locks, tried [[/data/elasticsearch/data/elasticsearch]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])?
解决方法:
在开启多个elasticsearch 实例时,config/elasticsearch.yml文件中新增一个配置变量:
[elsearch@Elk_Server elasticsearch]$ vim config/elasticsearch.yml
node.max_local_storage_nodes: 256