赞
踩
问题:
systemctl status elasticsearch
Active: failed (Result: exit-code) since Fri 2020-07-10 17:44:56 CST; 10s ago
启动失败
查看原因:
tail -f /var/log/elasticsearch/elasticsearch.log
[1] bootstrap checks failed
[1]: memory locking requested for elasticsearch process but memory is not locked
锁定内存失败
解决方案:
官方解决方案
https://www.elastic.co/guide/en/elasticsearch/reference/6.4/setup-configuration-memory.html
https://www.elastic.co/guide/en/elasticsearch/reference/6.4/setting-system-settings.html#sysconfig
### 修改启动配置文件
cd /etc/elasticsearch/
systemctl edit elasticsearch
### 增加如下参数
[Service]
LimitMEMLOCK=infinity
### 重新启动
systemctl daemon-reload
systemctl restart elasticsearch
systemctl status elasticsearch
Active: active (running) since Fri 2020-07-10 17:46:50 CST; 393ms ago
启动成功
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。