I’ve been using elasticsearch for about a month now and having good results. I noticed that the service doesn’t restart automatically after the system reboots like the solr service used to. How can I change this, so that I don’t have to SSH and restart the service after reboot?
If this is the case, then you will have to take look at the elasticsearch logs. This smells a bit like a permissions issue. If you can manually start elasticsearch using servicectl start elasticsearch, check which user runs elasticsearch afterwards. Then, check the startup script if it also runs as this user.
For now, I have reverted to snapshot so everything is back the way it was beforehand. Elastic search works fine, it just doesn’t start up automatically when the system reboots.
looking through the elastic search logs, there are a couple of warnings involving memory usage, trouble indexing particular files, that sort of thing.
I am unsure of how to check or change what account a service runs under, so I will investigate this next.
I think you may be on to something: /etc/init.d/elasticsearch is owned by root. when looking at it in nano, the first lines state
if [ `id -u` -ne 0 ]; then
echo "You need root privileges to run this script"
exit 1
fi
In the log I posted above, you can see it exited with error code 1, indicating this may be the root of the problem. Should I chown the file to www-data?