Broken Elasticsearch after each upgrade

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:

LimitMEMLOCK=infinity

This leads to the following error when restarting after the upgrade:
[1] bootstrap checks failed [1]: 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.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.