Disable swap

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
MAX_LOCKED_MEMORY=unlimited

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
#MAX_LOCKED_MEMORY=unlimited

Hope that helps.

[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)

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

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???

Can anyone help on this???

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.

Rob

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