Below is the cat of my /etc/security/limits.conf file
#* soft core 0
#* hard rss 10000
#@student hard nproc 20
#@faculty soft nproc 20
#@faculty hard nproc 50
#ftp hard nproc 0
#@student - maxlogins 4
* hard nofile 262144
* hard nproc 2048
* hard as unlimited
but I am getting the following error when I start elasticsearch
ERROR: bootstrap checks failed
max number of threads [1024] for user [user1] likely too low, increase to at least [2048]
max virtual memory areas vm.max_map_count [65536] likely too low, increase to at least [262144]
Check Redhat Linux / Centos 6.6. documentation. There you can find that using * (wildcard user) in /etc/security/limits.conf does work, but with mixed results, because settings can be overridden by configurations in /etc/security/limits.d/*.conf
So, the safest and preferable way is always to use the user name in the lines of /etc/security/limits.conf
Also, in order for the modified limits to be picked up, make sure you log out and log back in with the user that is running elasticsearch (seems to be user1 in your case, not the default elasticsearch user?). You can cat /proc/$$/limits before logging out and logging in again to see if the new limits where picked up.
Thank you all guys, the settings came active after a restart and I have set username instead of * for all rules. Also I have set the rules for root too. This solved the issue.
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.