22

ElasticSearch请求锁住内存失败-爱吃糖的蓝胖子

 4 years ago
source link: https://blog.51cto.com/xvjunjie/2488450
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

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

最后重启机器,就好了。

©著作权归作者所有:来自51CTO博客作者BlueMiaomiao的原创作品,如需转载,请注明出处,否则将追究法律责任

" 能吃鸡腿吗 "

0人进行了赞赏支持


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK