关于elasticsearch boostrap checks failed错误类型整理及解决方法

在安装elasticsearch的时候,很多人安装完成启动之后可能都会报bootstrap checks failed的错误,其中可能有如下几种类型:

[1]: max file descriptors [1024] 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]

[3]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk

[4]: max number of threads [1024] for user [lish] likely too low, increase to at least [2048]

 

针对第一个问题:max file descriptors [1024] for elasticsearch process is too low, increase to at least [4029]

编辑 /etc/security/limits.conf,追加以下内容;
* soft nofile 65536 #具体的值可以按照错误提示中方括号"[ ]"中,提示的值修改
* hard nofile 65536

注:如果编辑重启启动之后还不能消除这个错误,则重登陆用户。

 

针对第二个问题:max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

编辑 /etc/sysctl.conf,追加以下内容:
vm.max_map_count=262144
保存后,执行:

sysctl -p

重新启动,成功。

 

针对第三个问题:system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk

出现错误的原因:是因为centos6.x操作系统不支持SecComp,而elasticsearch 5.5.2默认bootstrap.system_call_filter为true进行检测,所以导致检测失败,失败后直接导致ES不能启动。

在elasticsearch.yml中添加配置项:bootstrap.system_call_filter为false:

bootstrap.memory_lock: false
bootstrap.system_call_filter: false

 

针对第四个问题:max number of threads [1024] for user [wh] likely too low, increase to at least [2048]

vi /etc/security/limits.d/90-nproc.conf 

修改如下内容:

* soft nproc 1024

#修改为

* soft nproc 2048

 

注:以上问题如果编辑重启启动之后还不能消除这个错误,则重登陆用户。

posted @ 2019-12-23 17:06  linzepeng  阅读(5298)  评论(0编辑  收藏  举报