elasticsearch Unable to lock JVM Memory: error=12, reason=Cannot allocate memory

  sre
[2019-01-16T02:59:32,062][WARN ][o.e.b.JNANatives         ] [node_48] Unable to lock JVM Memory: error=12, reason=Cannot allocate memory
[2019-01-16T02:59:32,064][WARN ][o.e.b.JNANatives         ] [node_48] This can result in part of the JVM being swapped out.
[2019-01-16T02:59:32,064][WARN ][o.e.b.JNANatives         ] [node_48] Increase RLIMIT_MEMLOCK, soft limit: 65536, hard limit: 65536
[2019-01-16T02:59:32,065][WARN ][o.e.b.JNANatives         ] [node_48] These can be adjusted by modifying /etc/security/limits.conf, for example: 

解决:切换到root用户,编辑limits.conf 添加类似如下内容
vi /etc/security/limits.conf 
添加如下内容:
* soft nofile 65536
* hard nofile 131072
* soft nproc 2048
* hard nproc 4096

LEAVE A COMMENT

Captcha Code