elasticsearch 6.3.2 + Ubuntu16.04 Ubuntu18.04 集群搭建问题一览

配置3个节点的elasticsearch集群,遇到问题如下:

  • 问题一
ERROR: bootstrap checks failed
      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,sudo sysctl -p使修改生效,重启ES

  • 问题二
ERROR: bootstrap checks failed

max file descriptors [4096] for elasticsearch process likely too low, increase to at least [65536]
max number of threads [1024] for user [lishang] likely too low, increase to at least [2048]

解决办法: 修改/etc/security/limits.conf,通过添加:

es soft nofile 65536

es hard nofile 131072

es  soft nproc 2048

es  hard nproc 4096

这里es代表你当前的Ubuntu用户,退出当前登录用户重新登录即可

  • 问题三:
    即使修改了上面的内容但是不生效的问题:
    使用ulimit -a查看修改是否生效,发现没有生效。
    使用ulimit -n 65535修改报ulimit: open files: cannot modify limit: Operation not permitte错误:
    使用如下方法解决:
su - es 进入es用户,
然后 ulimit -a查看修改,此时应该是已生效的状态
以后每次启动节点都需要:su -  es
  • 问题四: es集群启动后:with the same id but is a different node instance

由于node3 是复制node2的配置,需要将node3 es目录下的data目录删掉

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值