当前位置:   article > 正文

Elastic7 相关问题处理_master not discovered or elected yet, an election

master not discovered or elected yet, an election requires at least 2 nodes

1. es启动失败问题

上班发现es7系统奔溃了,无法使用,启动了好多次都无法启动成功。

主要的报警关键字包含如下:

master not discovered or elected yet, an election requires at least 2 nodes with ids from

由于es7是用rpm安装的,检查启动服务日志发现:

systemctl status elasticsearch

elasticsearch.service start operation timed out. Terminating.

然后检查相关服务相关配置

systemctl show elasticsearch | grep -i timeout

发现默认是1分30秒,进程直接中断,而后修改es启动脚本。

添加 TimeoutStartSec=900 ,而后启动成功。

 

2. es报too many open files

由于es是rpm安装的,启动es的命令是service。

rhel7对于资源的限制为limits.conf,但是注释中会提到 It does not affect resource limits of the system services.

故需要在专门的地方设置限制

# cat /etc/systemd/system/elasticsearch.service.d/override.conf

[Service]

LimitMEMLOCK=infinity

LimitNOFILE=infinity

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/634980
推荐阅读
相关标签
  

闽ICP备14008679号