Elasticsearch启动报错
报错信息一:ERROR: bootstrap checks failed
: max file descriptors for elasticsearch process is too low, increase to at least
: max virtual memory areas vm.max_map_count is too low, increase to at least
解决方法:
# vim /etc/sysctl.conf
添加下面配置:
vm.max_map_count=655360
并执行命令:
# sysctl -p
报错信息二:
ERROR: bootstrap checks failed
: max file descriptors for elasticsearch process is too low, increase to at least
解决方法:
切换到root用户
# ulimit -Hn查看硬限制
# vim /etc/security/limits.conf
##在末尾添加下面设置
* soft nofile 655350
* hard nofile 655350
退出用户重新登录,使配置生效
重新 ulimit -Hn查看硬限制 会发现数值有4096改成65535
# vim /etc/security/limits.d/90-nproc.conf
找到如下内容:
soft nproc 1024
修改为
soft nproc 2048
报错信息三:
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: failed to obtain node locks, tried [] with lock id ; maybe these locations are not writable or multiple nodes were started without increasing (was )?
解决方法:
在开启多个elasticsearch 实例时,config/elasticsearch.yml文件中新增一个配置变量:
$ vim config/elasticsearch.yml
node.max_local_storage_nodes: 256
页:
[1]