安装过程中遇到了一些问题
问题1:ERROR: bootstrap checks failed
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]
- 1
- 2
- 3
解决:切换到root用户,编辑limits.conf 添加类似如下内容
vi /etc/security/limits.conf
- 1
添加如下内容:
* soft nofile 65536
* hard nofile 131072
* soft nproc 2048
* hard nproc 4096
让配置文件生效:
sysctl -p /etc/limits.conf
- 1
- 2
- 3
- 4
问题2:max number of threads [1024] for user [lish] likely too low, increase to at least [2048]
vi /etc/security/limits.d/90-nproc.conf
- 1
修改如下内容:
* soft nproc 1024
- 1
修改为:
* soft nproc 2048
- 1
问题3:max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]
解决:切换到root用户修改配置sysctl.conf
vi /etc/sysctl.conf
- 1
添加下面配置:
vm.max_map_count=655360
- 1
让配置文件生效:
sysctl -p /etc/sysctl.conf
并执行命令:
sysctl -p
- 1
然后,重新启动 Elasticsearch
ElasticSearch后台启动命令
./bin/elasticsearch -d
- 1
再次启动如果还报同样的错误,最后重启系统
修改完以上信息重启系统发现又报如下错误
ERROR: bootstrap checks failed
system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk
原因是我在Centos6.5系统下安装Elasticsearch,而Centos6不支持SecComp,再次检查
/usr/local/elasticsearch-6.0.0/config/elasticsearch.yml中bootstrap.system_call_filter为true进行检测,所以导致检测失败,失败后直接导致ES不能启动。
修改为如下
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
查看后台命令是否启动成功
ps aux|grep elasticsearch