Unable to lock JVM Memory: error=12, reason=Cannot allocate memory
Increase RLIMIT_MEMLOCK, soft limit: 65536, hard limit: unlimited
memory locking requested for elasticsearch process but memory is not locked
I tried to reproduce your problem on a fresh install of Fedora but it worked fine for me. Here is what I did:
sudo dnf install java-1.8.0-openjdk.x86_64
sudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
# add the following contents with sudo vim /etc/yum.repos.d/elasticsearch.repo
[elasticsearch-5.x]
name=Elasticsearch repository for 5.x packages
baseurl=https://artifacts.elastic.co/packages/5.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md
sudo dnf install elasticsearch
# Now change all config files that you've mentioned in your initial post (not reproducing it here again for brevity)
sudo systemctl daemon-reload
sudo systemctl enable elasticsearch.service
sudo systemctl start elasticsearch.service
I checked the logs and no warnings showed up. Next I checked via the API:
That's really strange. I've tried rebooting the machine and setting the ulimit by hand on the current session too and it works to no avail. If I remove the mlockall it starts up just fine but when I try to enable it then elasticsearch fails.
one more possibility is that your tmp directory is mounted with noexec so you can try set a different tmp directory for Elasticsearch by adding this to config/jvm.options:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.