Getting the following warning from elastic search restarts

Hi All,

when i restart elastic search I am getting the following error.please explain me why I am getting the following error.

2015-05-17 14:12:37,814][WARN ][common.jna ] Unable to lock JVM memory (ENOMEM). This can result in part of the JVM being swapped out. Increase RLIMIT_MEMLOCK (ulimit).

I gave 12 GB RAM for Heap and toatal Memory of my server is 24 GB

Thanks,
Phani

Have you set botstrap.mlockall: true in your elasticsearch.yml?

This can be caused be a resource limit on the Elasticsearch user. They are
simply not allowed to lock that much memory. Have a look at how the deb or
rpm set the limit.

Hi mark

Yes enabled bootstrap property in yml file

Thanks

Phani

Are you on a RHEL distribution with systemd?
It may be https://github.com/elastic/elasticsearch/issues/9357

Hi Mark,

Yes I am using RHEL distribution but i am not using systemd .i will use /etc/init.d/elasticsearch start command to start the server but I am running elasticsearch as root user may be it could be the problem?
if yes please suggest me the procedure how elasticsearch will run as non-root users.

Thanks
phani

If you install the RPM it'll run as the Elasticsearch use by default.