Elasticsearch not starting on ELK appliance

Posted April 15, 2015 5.4k views
UbuntuMonitoringDigitalOcean 1-Click Apps MarketplaceLogging

I just spun up a ELK server using the one click installer. When I open Kibana it tells me it’s unable to connect to elastic search. When I ssh into the box and attempt to start elasticsearch (sudo service elasticsearch start) it falls into a loop printing “fail” over and over.

“`root@elk:~# sudo service elasticsearch start

  • Starting Elasticsearch Server …fail! …fail! …fail! …fail! …fail! …fail! …fail! …fail! …fail! …fail!”`

I am completely new to ELK and just wanted to give it a spin. I guess for now I’ll just manually set it up on a Ubuntu Droplet.

Full Disclosure it is a 512MB Droplet.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
3 answers

The ELK stack can be quite memory intensive. We recommend using at least a 2 GB droplet, though some have success with 1 GB ones.

I just ran into a similar problem using a 1GB Droplet. I noticed that the Digital Ocean ELK image does not have swap enabled by default, so I used the guide linked below and rebooted the droplet. It’s working for now, but I’m not sure if this is enough to keep it happy in the long term. I had to use the fast method in the guide to create the swapfile as ELK was using up too much memory for the first method to work.

by Justin Ellingwood
Swap space can be used as an "overflow" area for your system when you run out of RAM. The operating system can store data that would normally be kept in RAM on the hard drive in a specially formatted file. In this guide, we'll demonstrate how to create and use one of these files in Ubuntu 14.04.

I upgraded to Java 8 and it solved this issue for me - I was using the java cookbook as my situation was a Chef implementation. Note that the java cookbook has the option to set the java version you want - it also required that I configure it to use oracle java flavor. That’s all I did and the start/fail problem was gone.