I have a fresh installation of Ubuntu 16.04 and I installed elasticsearch 5 on it. Now when I try to start elasticsearch using

/etc/init.d/elasticsearch start

After a few seconds in the log file I read:

[2016-11-19T08:47:31,442][ERROR][o.e.b.Bootstrap          ] [shooter-1] node validation exception
bootstrap checks failed
max number of threads [1891] for user [elasticsearch] likely too low, increase to at least [2048]

After some googling, I came to the conclusion that I had to add the following line to /etc/security/limits.conf:

elasticsearch    -       nproc           2048

However, even after this change, I still get the same error.

I found a suggestion to uncomment the line

session    required   pam_limits.so

in /etc/pam.d/su, but that line was already uncommented.

What am I missing?


Ok, I finally found it. The key was in this blogpost: https://fredrikaverpil.github.io/2016/04/27/systemd-and-resource-limits/

The solution was to edit the file /usr/lib/systemd/system/elasticsearch.service and add the line

  • hmm.. this is already set. but im still facing the error. – Srikanth Jeeva Sep 15 '17 at 19:21

We ran into this issue also and it turned out to be a systemd service override file that we likely created when originally setting up elasticsearch.

The override file is referenced here in the docs: https://www.elastic.co/guide/en/elasticsearch/reference/current/setting-system-settings.html#systemd

Check /etc/systemd/system/elasticsearch.service.d/ for any conf files and either remove them or update them with the correct LimitNPROC= for your elasticsearch version.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.