I installed elasticsearch on Ubuntu 16.04.
When I enter sudo service elasticsearch start
, everything works.
But the service is not running on startup. Before starting it manually, sudo service elasticsearch status
gives me:
elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; disabled; vend
Active: inactive (dead)
Docs: http://www.elastic.co
I tried to add it to startup with:
sudo update-rc.d elasticsearch defaults
and sudo update-rc.d elasticsearch enable
, but this changes nothing.
What could be the problem, and how can I debug this?
One way to start Elasticsearch is by extracting the . tar file and entering the bin directory and running the command ./elasticsearch . The other way, if you install it using apt or apt-get is by running systemctl start elasticsearch or systemctl start elasticsearch. service .
The answer to your problem is running this:
sudo systemctl enable elasticsearch.service
Elasticsearch on Ubuntu 16.04 uses SystemD
not System V
anymore.
For some reason when (as of 9th Jan 2016) you install ES 5.1 (not sure if other versions are affected) from APT by default this service does not start.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With