ES7.4安装遇到坑

在安装过程中只配置了cluster.initial_master_nodes 属性,没有配置discovery.seed_hosts

启动的时候遇到如下俩个错误:

[1]: memory locking requested for elasticsearch process but memory is not locked

[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

解决办法:

1.在 /etc/security/limits.conf加入一下配置:

es hard memlock unlimited
es soft memlock unlimited

其中es为我启动的es的用户,这个根据实际情况修改

2.运行此命令修改vm限制:sysctl -w  vm.max_map_count=262144

启动无误后,看日志出现以下警告:

master not discovered yet, this node has not previously joined a bootstrapped (v7+) cluster, and this node must discover master-eligible node

意思就是找不到master节点,每个节点以local模式启动,此问题找了半天,最后发现是因为没有在discovery.seed_hosts中配置master nodes的hosts.

猜你喜欢

转载自blog.csdn.net/sujins5288/article/details/103268745