memory locking requested for elasticsearch process but memory is not locked

故障背景:自定义配置文件后

在/etc/Elasticsearch/elasticsearch.yml 这个文件做了如下配置

[root@db01 ~]# grep "^[a-z]" /etc/elasticsearch/elasticsearch.yml 
node.name: node-1
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
bootstrap.memory_lock: true
network.host: 10.0.0.51,127.0.0.1
http.port: 9200

重启服务
systemctl restart elasticsearch 
发现elasticsearch 未启动

 

排查过程:

查看elasticsearch日志
cat /var/log/elasticsearch/elasticsearch.log

查看日志发现提示内存锁定失败
tail -f /var/log/elasticsearch/elasticsearch.log 
[2019-12-04T10:27:42,136][ERROR][o.e.b.Bootstrap          ] [node-1] node validation exception
[1] bootstrap checks failed
[1]: memory locking requested for elasticsearch process but memory is not locked

 

解决方案:
官方有两种结局方案,这是其中一种
添加新的配置文件信息
systemctl edit elasticsearch

[Service]
LimitMEMLOCK=infinity

重启服务
systemctl daemon-reload
systemctl restart elasticsearch

 

官方解决方案
https://www.elastic.co/guide/en/elasticsearch/reference/6.6/_memory_lock_check.html
https://www.elastic.co/guide/en/elasticsearch/reference/6.6/_memory_lock_check.html
https://www.elastic.co/guide/en/elasticsearch/reference/6.6/setting-system-settings.html#systemd
赞赏

微信赞赏支付宝赞赏

故障案例

zabbix_get:Check access restrictions in Zabbix agent configuration

2019-11-7 9:24:18

故障案例

Nginx日志报错an upstream response is buffered to a temporary file

2019-12-12 9:32:00

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
有新消息 消息中心
搜索