I tried to install 6.1 on my cluster which was running originally on 5.6.3. I got the same error as here.
What was new to me was this statement:
Yet in the elasticsearch.service file itself this was mentioned. Specifies the maximum number of bytes of memory that may be locked into RAM Set to "infinity" if you use the 'bootstrap.memory_lock: true' option in elasticsearch.yml and 'MAX_LOCKED_MEMORY=unlimited' in /etc/sysconfig/elasticsearch
LimitMEMLOCK=infinity
So I did change this file. And as pointed out this file was not changed when I upgraded from 5.2.2 to 5.6.3 as this line at the end of current file shows Built for distribution-5.2.2 (distribution)
After upgrade I think it should have been 5.6.3.
The error I see in /var/log/messages after install of 6.1
is Failed at step EXEC spawning /usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec: No such file or directory
What are the options I have now?
Is there any place I can copy the Unit file for 6.1 or is there a better way to deal with this?
I think you have same problem with me. You modified usr/lib/systemd/system/elasticsearch.service before, so when you run upgrade with rpm package, it can't replace new file startup for ES 6.1.
Now, u can open usr/lib/systemd/system/elasticsearch.service and replace content with:
@tatdat I plan to go thorough all the *.rmpnew files created by upgrade/install process. I will ideally like these files to be in sync content wise corresponding to the release. *.rpmsave is ok as it is copy of old settings but *.rpmnew is something I have to account for.
In case someone is stuck with this error, the best way is to hunt for the *.rpmnew file which the installer leaves behind (It will not replace the the file which has user modifications).
Migrate your changes from the old /usr/lib/systemd/system/elasticsearch.service
to the /usr/lib/systemd/system/elasticsearch.service.rpmnew
In my case it was just adding this variable LimitMEMLOCK=infinity
Then take a backup of the old elasticsearch.service file and copy the contents of /usr/lib/systemd/system/elasticsearch.service.rpmnew
to /usr/lib/systemd/system/elasticsearch.service
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.