Skip to content

memory locking requested for elasticsearch process but memory is not locked #9

@recepkabatas

Description

@recepkabatas

Hello,
I have 4 VM Server (4 different physical server) and i've docker swarm. it's working all good.
i just changed version and persistent volume on stack-elastic.yml

but i'm having this error.

[2020-10-23T07:30:45,386][INFO ][o.e.t.TransportService ] [es-coordination] publish_address {10.0.3.59:9300}, bound_addresses {0.0.0.0:9300}
[2020-10-23T07:30:45,391][INFO ][o.e.b.BootstrapChecks ] [es-coordination] bound or publishing to a non-loopback address, enforcing bootstrap checks
ERROR: [1] bootstrap checks failed
[1]: memory locking requested for elasticsearch process but memory is not locked
[2020-10-23T07:30:45,608][INFO ][o.e.n.Node ] [es-coordination] stopping ...
[2020-10-23T07:30:45,637][INFO ][o.e.n.Node ] [es-coordination] stopped
[2020-10-23T07:30:45,637][INFO ][o.e.n.Node ] [es-coordination] closing ...
[2020-10-23T07:30:45,643][INFO ][o.e.n.Node ] [es-coordination] closed
[2020-10-23T07:30:45,645][INFO ][o.e.x.m.p.NativeController] [es-coordination] Native controller process has stopped - no new native processes can be started

Make sure to tune your VM to run Elasticsearch cluster by executing on each server:

sudo sysctl -w vm.max_map_count=262144

add --default-ulimit memlock=-1 to Dockerd

You can manage that by executing this command on each server consiting Swarm cluter:

sudo "sed -i '/ExecStart=/usr/bin/dockerd/ s/$/--default-ulimit memlock=-1/' /etc/systemd/system/docker.service.d/10-machine.conf"

i have only understant and run this command

sudo sysctl -w vm.max_map_count=262144

and i research a little bit and tried this commands;
echo -e "[Service]\nLimitMEMLOCK=infinity" | SYSTEMD_EDITOR=tee systemctl edit docker.service
systemctl daemon-reload
systemctl restart docker

First question how can i use your methods on my CENTOS7 VM machine and i have a lot of ram on VM what's memory is not locked means ?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions