Centos 安装Elasticsearch 5.5

安装过程中遇到了一些问题

问题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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值