# Elasticsearch 6 official Docker image won't boot with memory\_lock

**URL:** <https://discuss.elastic.co/t/elasticsearch-6-official-docker-image-wont-boot-with-memory-lock/108631>\
**Category:** Elasticsearch\
**Created:** [November 22, 2017, 1:29am UTC](https://discuss.elastic.co/t/elasticsearch-6-official-docker-image-wont-boot-with-memory-lock/108631 "2017-11-22T01:29:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xrl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xrl/32/3556_2.png) [@xrl](https://discuss.elastic.co/u/xrl)\
**Post date:** [November 22, 2017, 1:29am UTC](https://discuss.elastic.co/t/elasticsearch-6-official-docker-image-wont-boot-with-memory-lock/108631/1 "2017-11-22T01:29:23Z")

</div>

Docker image: `docker.elastic.co/elasticsearch/elasticsearch:6.0.0`  
Operating system: (docker info and docker inspect of a running container) [https://gist.github.com/xrl/0f84c5f44d201b518ae52baafc00a513](https://gist.github.com/xrl/0f84c5f44d201b518ae52baafc00a513)

My kubernetes statefulset: [https://gist.github.com/xrl/0f84c5f44d201b518ae52baafc00a513#file-es-deployment-yml](https://gist.github.com/xrl/0f84c5f44d201b518ae52baafc00a513#file-es-deployment-yml)

## Bug Description

I want to use the `-Ebootstrap.memory_lock=true` flag to get memory lock but my boot shows:

```auto
root $ docker-entrypoint.sh bin/elasticsearch -Ecluster.name=logs -Enode.master=true -Enode.data=true -Ebootstrap.memory_lock=true -Ediscovery.zen.minimum_master_nodes=1
[2017-11-22T01:17:35,816][WARN][o.e.b.JNANatives] Unable to lock JVM Memory: error=12, reason=Cannot allocate memory
[2017-11-22T01:17:35,817][WARN][o.e.b.JNANatives] This can result in part of the JVM being swapped out.
[2017-11-22T01:17:35,817][WARN][o.e.b.JNANatives] Increase RLIMIT_MEMLOCK, soft limit: 65536, hard limit: 65536
[2017-11-22T01:17:35,817][WARN][o.e.b.JNANatives] These can be adjusted by modifying /etc/security/limits.conf, for example:
	# allow user 'elasticsearch' mlockall
	elasticsearch soft memlock unlimited
	elasticsearch hard memlock unlimited
[[[SNIP]]]
ERROR: [1] bootstrap checks failed
[1]: memory locking requested for elasticsearch process but memory is not locked

```

The container does have the security.conf setup:

```auto
[root@es-logs-0 elasticsearch]# cat /etc/security/limits.conf | grep elastic
elasticsearch - nofile 65536
elasticsearch soft memlock unlimited
elasticsearch hard memlock unlimited
elasticsearch soft nproc 16385
elasticsearch hard nproc 16385

```

I have a ES 5.6 cluster running with memory\_lock turned on, and I have confirmed with the cluster it has the lock. What has changed between the docker library ES 5.6 and the elastic official ES 6 images?

---

<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:** [December 20, 2017, 1:29am UTC](https://discuss.elastic.co/t/elasticsearch-6-official-docker-image-wont-boot-with-memory-lock/108631/2 "2017-12-20T01:29:25Z")

</div>

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