# SOLVED: Memory Locking not working DEB/5.3.0

**URL:** <https://discuss.elastic.co/t/solved-memory-locking-not-working-deb-5-3-0/82429>\
**Category:** Elasticsearch\
**Created:** [April 14, 2017, 3:51pm UTC](https://discuss.elastic.co/t/solved-memory-locking-not-working-deb-5-3-0/82429 "2017-04-14T15:51:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![adamrdrew](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adamrdrew/32/17386_2.png) [@adamrdrew](https://discuss.elastic.co/u/adamrdrew)\
**Post date:** [April 14, 2017, 3:51pm UTC](https://discuss.elastic.co/t/solved-memory-locking-not-working-deb-5-3-0/82429/1 "2017-04-14T15:51:30Z")

</div>

Installed 5.3.0 via DEB on Debian Stretch. I believe I have everything set right but I still get bootstrap failure for memlock:

```
root@stretch:~# grep memory /etc/elasticsearch/elasticsearch.yml
bootstrap.memory_lock: true
root@stretch:~# cat /etc/systemd/system/elasticsearch.service.d/elasticsearch.conf
[Service]
LimitMEMLOCK=infinity
root@stretch:~# grep elasticsearch /etc/security/limits.conf
elasticsearch soft memlock unlimited
elasticsearch hard memlock unlimited

```

but on start I get:

```
[2017-04-14T11:08:37,463][ERROR][o.e.b.Bootstrap] [kcs_test_vm_node] node validation exception
bootstrap checks failed
memory locking requested for elasticsearch process but memory is not locked

```

I tried systemctl daemon-reload just to make sure it was picking up LimitMEMLOCK from the elasticsearch.conf file for the unit, but that didn't change anything.

I assume I've either got some dumb syntax error somewhere or I'm forgetting something. Went over

[https://www.elastic.co/guide/en/elasticsearch/reference/current/setting-system-settings.html#systemd](https://www.elastic.co/guide/en/elasticsearch/reference/current/setting-system-settings.html#systemd)

a dozen times and checked threads on here. What am I messing up?

---

<div class="post-metadata">

**Author:** ![adamrdrew](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adamrdrew/32/17386_2.png) [@adamrdrew](https://discuss.elastic.co/u/adamrdrew)\
**Post date:** [April 14, 2017, 3:59pm UTC](https://discuss.elastic.co/t/solved-memory-locking-not-working-deb-5-3-0/82429/2 "2017-04-14T15:59:04Z")

</div>

Aaaaaaaand it was OOM Killer. Someone revoke my nerd card. Turns out you can't lock 2GB of RAM on a VM with 2 GB.

So, move along, nothing to see here.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 12, 2017, 4:05pm UTC](https://discuss.elastic.co/t/solved-memory-locking-not-working-deb-5-3-0/82429/3 "2017-05-12T16:05:15Z")

</div>

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