ElasticSearch not running on localhost:9200 after apt-get install ElasticSearch not running on localhost:9200 after apt-get install elasticsearch elasticsearch

ElasticSearch not running on localhost:9200 after apt-get install


Elasticsearch is not started automatically after installation. You need to enable elasticsearch explicitely, see https://www.elastic.co/guide/en/elasticsearch/reference/5.5/deb.html


Run systemctl status elasticsearch if you're not getting any logs in /var/log/elasticsearch. You can scroll through this output via f (for forward) and b (for backward) as necessary.

It's possible that you don't have enough memory (RAM) available.


From a clean ubuntu 16 (in vagrant) I have success starting elastic search doing the next steps:

apt install elasticsearch

uncomment in /etc/default/elasticsearch the line

START_DAEMON=true

And this is the important one:

systemctl restart elasticsearch

Note that start won't work because elasticsearch comes disabled by default but systemd consider it started (it is something like "started in disabled state") so after change the defaults file you must restart the service

more info on: https://discuss.elastic.co/t/cant-start-elasticsearch-with-ubuntu-16-04/48730