当前位置:   article > 正文

elaticsearch学习遇到的问题1--Active: failed (Result: exit-code) since...

active: failed (result: exit-code)

问题:

systemctl status elasticsearch
Active: failed (Result: exit-code) since Fri 2020-07-10 17:44:56 CST; 10s ago
启动失败
  • 1
  • 2
  • 3

查看原因:

tail -f /var/log/elasticsearch/elasticsearch.log
[1] bootstrap checks failed
[1]: memory locking requested for elasticsearch process but memory is not locked
 锁定内存失败
  • 1
  • 2
  • 3
  • 4

解决方案:

官方解决方案
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
启动成功
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/155468
推荐阅读
相关标签
  

闽ICP备14008679号