5
votes

I have installed Elasticsearch, Logstash, Kibana and Nginx following this guide,

https://www.digitalocean.com/community/tutorials/how-to-install-elasticsearch-logstash-and-kibana-elk-stack-on-ubuntu-14-04

Elasticsearch is running on 9200

But running

curl http://localhost:5601

returns this:

curl: (7) Failed to connect to localhost port 5601: Connection refused

In kibana.yml file I configured

server.port: 5601

server.host: "127.0.0.1"

Here I also checked with localhost and aws private ip address.

And while checking the port running this:

netstat -anp | grep 5601

I am getting:

(No info could be read for "-p": geteuid()=1000 but you should be root.)

I can start kibana running:

sudo service kibana start

But while checking status using:

sudo service kibana status

I get:

kibana is not running

I haven't setup firewall and running

sudo ufw status

Returns:

Status : Inactive

I am confused, why is the kibana port not listening?

5
I think configuration only the problem, change your server.host to your IP addressBilal Usean
check this URL 127.0.0.1:5601Bilal Usean
Try running Kibana in the foreground: which kibana or whereis kibana and run the Kibana binary. Then look at the output.Loek van Gool

5 Answers

4
votes

You can check Kibana logs for why it is not starting at all. You may find things like kibana unable to connect elasticsearch at given url.

3
votes

Its running now. When I checked kibana log (vi /var/log/kibana/kibana.stderr)

Error: EACCES, permission denied '/opt/kibana/optimize/.babelcache.json'

So I changed permission for the file .babelcache.json

sudo chown -R kibana:root /opt/kibana/optimize/.babelcache.json

Then restarted kibana , and this solved the issue.

1
votes

Obviously the problem is that Kibana is not running. There are several things that you could try to resolve this:

  • Try to reinstall Kibana.
  • The default settings in kibana.yml should be enough to get Kibana up and running. Just be sure that you uncomment the elasticsearch.url entry and let it point to "http://localhost:9200".
  • The other thing you could check is the Elasticsearch and Kibana version compatibility. To check if you are using the right version for them please go to this link, click on product compatibility and read the details under Supported Kibana Versions.
1
votes

This is an old question but if by any chance you are here because you are having this same situation:

I can start kibana running:

sudo service kibana start

But while checking status using:

sudo service kibana status I get:

kibana is not running

And you get the Kibana server is not ready yet with an error on Kibana logs that states: FATAL Error: Port 5601 is already in use. Another instance of Kibana may be running!

You need to check this part of documentation

For example, if you run

ps -p 1

And it gives you systemctl, you shouldn´t try to run Kibana service with sudo service kibana start.

So, first run sudo service kibana stop and then sudo systemctl start kibana.

I know this might be really obvious to some, specially with the documentation addressing the situation, yet i have been found on this situation by human oversight and hope the experience will help someone out there.