在配置完elasticsearch,启动程序会包如下错误:
[elk@localhost bin]$ ./elasticsearch
... ... ERROR: [3] bootstrap checks failed
[1]: max file descriptors [65535] for elasticsearch process is too low, increase to at least [65536]
[2]: max number of threads [1024] for user [elk] is too low, increase to at least [2048]
[3]: max virtual memory areas vm.max_map_count [256000] is too low, increase to at least [262144]
[4]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk ... ...
1、针对错误[1]、[2],可以采取如下方式:
修改/etc/security/limits.conf配置文件:
[root@yqtrack-elk03 /]# vim /etc/security/limits.conf 添加如下配置项: * - nproc 65535
* - nofile 409600
elastic - memlock unlimited
修改/etc/security/limits.d/90-nproc.conf配置文件:
[root@yqtrack-elk03 /]# vim /etc/security/limits.d/90-nproc.conf 修改如下配置项目: * soft nproc unlimited
root soft nproc unlimited
修改完成后,重新登录elk账户,查看设置是否生效。
[elk@yqtrack-elk03 /]$ ulimit -n
409600
[elk@yqtrack-elk03 /]$ ulimit -u
65535
2、针对错误[3],可以采取如下方式:
修改/etc/sysctl.conf文件配置项:
[root@localhost /]# vim /etc/sysctl.conf # 一个进程可以拥有的VMA(虚拟内存区域)的数量:
vm.max_map_count=262144 # 调用虚拟内存的阈值数:
vm.swappiness=1 #禁用IPv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1 [root@localhost /]# sysctl -p
3、针对错误[4],可以采取如下方式:
出现错误的原因:是因为centos6.x操作系统不支持SecComp,而elasticsearch 5.5.2默认bootstrap.system_call_filter为true进行检测,所以导致检测失败,失败后直接导致ES不能启动。
在elasticsearch.yml中添加配置项:bootstrap.system_call_filter为false:
# ----------------------------------- Memory -----------------------------------
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
重新启动程序,问题顺利解决!
[THE END]