We are running Elasticsearch on Debian 9. Everytime we upgrade the elasticsearch package using the elastic.co repo, the installation is broken. The reason is, that the systemd file is replaced against the vendor version (without asking) and that file (
/usr/lib/systemd/system/elasticsearch.service) is missing a configuration entry. This one:
This leads to the following error when restarting after the upgrade:
 bootstrap checks failed : memory locking requested for elasticsearch process but memory is not locked
After adding the option above and doing a 'systemctl daemon-reload' elasticsearch is starting again.
This is really annoying, I can't belive that this is an issue everyone has which is using the Debian repo. Does somebody have an idea why this is happening.