user1383029
user1383029

Reputation: 2125

Elasticsearch service does not run at statup on Ubuntu 16.04

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?

Upvotes: 7

Views: 2611

Answers (2)

Tom Raganowicz
Tom Raganowicz

Reputation: 2470

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.

Upvotes: 8

user1383029
user1383029

Reputation: 2125

Did not find the error. Just reinstalled it with dpkg. Works, and the data and config hasn`t been overwritten.

Upvotes: -2

Related Questions