Elasticsearch not starting on ELK appliance

April 15, 2015 2k views
One-Click Install Apps Logging Monitoring Ubuntu

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.

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.

The DigitalOcean ELK Stack One-Click Application provides you with a quick way to launch a centralized logging server. The ELK Stack is made up of three key pieces of software: Elasticsearch, Logstash, and Kibana. Together they allow you to collect, search, and analyze logs files from across your infrastructure. Logstash collects and parses the incoming logs, Elasticsearch indexes them, and Kibana gives you a powerful web interface to visualize the data.
  • Yea, just after I posted this I saw the ELK tutorials, and the recommended droplet size. Thanks though!

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.

Have another answer? Share your knowledge.