ElasticSearch请求锁住内存失败

具体错误信息:

[2020-04-18T21:40:31,571][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

解决思路:
(1)调整JVM内存为物理机内存大小的50%,官方推荐,配置文件/etc/sysconfig/elasticsearch

ES_JAVA_OPTS="-Xms4g -Xmx4g" 
MAX_LOCKED_MEMORY=unlimited

(2)修改/etc/security/limits.conf文的件内容,取消限制

elasticsearch soft memlock unlimited
elasticsearch hard memlock unlimited

(3)在/etc/systemd/system/elasticsearch.service.d目录下创建一个文件override.conf,并添加下列内容。
这个elasticsearch.service.d也需要创建一下:

[Service]
LimitMEMLOCK=infinity

(4) 重启服务

systemctl daemon-reload
service elasticsearch restart

  • 我的微信
  • 这是我的微信扫一扫
  • weinxin
  • 我的微信公众号
  • 我的微信公众号扫一扫
  • weinxin
avatar

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: