[2021-01-16T15:30:18,018][WARN ][o.e.b.JNANatives ] [Centos7] Unable to lock JVM Memory: error=12, reason=Cannot allocate memory[2021-01-16T15:30:18,021][WARN ][o.e.b.JNANatives ] [Centos7] This can result in part of the JVM being swapped out.[2021-01-16T15:30:18,021][WARN ][o.e.b.JNANatives ] [Centos7] Increase RLIMIT_MEMLOCK, soft limit: 65536, hard limit: 65536[2021-01-16T15:30:18,022][WARN ][o.e.b.JNANatives ] [Centos7] These can be adjusted by modifying /etc/security/limits.conf, for example: # allow user 'elasticsearch' mlockall elasticsearch soft memlock unlimited elasticsearch hard memlock unlimited[2021-01-16T15:30:18,022][WARN ][o.e.b.JNANatives ] [Centos7] If you are logged in interactively, you will have to re-login for the new limits to take effect. . . . . . . . . . [2021-01-16T15:30:27,246][ERROR][o.e.b.Bootstrap ] [Centos7] node validation exception[1] bootstrap checks failed[1]: memory locking requested for elasticsearch process but memory is not locked
Configuring system settings
Where to configure systems settings depends on which package you have used to install Elasticsearch, and which operating system you are using.
When using the .zip
or .tar.gz
packages, system settings can be configured:
- temporarily with
ulimit
, or - permanently in
/etc/security/limits.conf
.
When using the RPM or Debian packages, most system settings are set in the system configuration file. However, systems which use systemd require that system limits are specified in a systemd configuration file.
Systemd configuration
When using the RPM or Debian packages on systems that use systemd, system limits must be specified via systemd.
The systemd service file (/usr/lib/systemd/system/elasticsearch.service
) contains the limits that are applied by default.
To override them, add a file called /etc/systemd/system/elasticsearch.service.d/override.conf
(alternatively, you may run sudo systemctl edit elasticsearch
which opens the file automatically inside your default editor). Set any changes in this file, such as:
[Service] LimitMEMLOCK=infinity
Once finished, run the following command to reload units:
sudo systemctl daemon-reload
댓글 없음:
댓글 쓰기