Disable swap

(Ravi Shanker Reddy) #1
ERROR: bootstrap checks failed
memory locking requested for elasticsearch process but memory is not locked

I am getting this error while bringing up ES. I am running my ES as user. How to lock the memory while running it as a user???


What I did to get rid of that same error was to add one line to /etc/default/elasticsearch

cat /etc/default/elasticsearch

From the config file

# The maximum number of bytes of memory that may be locked into RAM
# Set to "unlimited" if you use the 'bootstrap.memory_lock: true' option
# in elasticsearch.yml.
# When using Systemd, the LimitMEMLOCK property must be set
# in /usr/lib/systemd/system/elasticsearch.service

Hope that helps.

(Ravi Shanker Reddy) #3
[root@gems14 ~]# cat /etc/default/elasticsearch
cat: /etc/default/elasticsearch: No such file or directory

I installed elasticsearch as a service using rpm (v5.2)

(Mark Walkom) #4

Have a look at https://www.elastic.co/guide/en/elasticsearch/reference/5.3/bootstrap-checks.html

(Ravi Shanker Reddy) #5

Here Its showing that mlockall is thre

      "nodes": {
        "VjsbRxcvTW2zNrDIoGob3Q": {
          "process": {
            "mlockall": true

But in the node stats I am getting 45 MB swap memory.

"swap": {
              "total_in_bytes": 33554423808,
              "free_in_bytes": 33506545664,
              "used_in_bytes": 47878144

Is my ES swap is really disabled???

(Ravi Shanker Reddy) #6

Can anyone help on this???

(Robert Cowart) #7

Swap is in the Operating System section of Node Stats. OS values are for the whole node, not just the Elasticsearch process. The swap usage is likely due to a different process.


(system) #8

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.