Kibana does not connect to ES on localhost when running without internet connection

Hi Team

I am seeing a strange issue in Kibana 5.1.1.

Problem Statement:- Kibana does not listen to elasticsearch when not connected to Internet. Elasticsearch.url is specified as localhost:9200.

Solution:- However, after changing Elasticsearch.url from localhost to and restarting Kibana works. Now Kibana runs and connects to ES without Internet connection as well.

But this is something which is misleading and shouldn't happen.

Any help on fixing it will be appreciated?

1 Like

Hi Yuvraj,

By default, for security reasons, both Elasticsearch and Kibana default configuration only listens for connections on localhost. But with both Elasticsearch and Kibana on the same host, this should work fine without changing anything. Are you saying this isn't working for you? If so, what OS are you on?

Kibana doesn't actually listen to Elasticsearch. It's the other way around.
Elasticsearch listens for connections (from Kibana or anybody else) on port 9200.
Kibana listens for connections (from users browsers) on port 5601.

Its a fairly common security practice to have a default configuration that only listens on localhost until ready for production.


Thanks for your response.
Let me re-phrase it:-

Let's take a scenario wherein we have a system wherein we have Installed Elasticsearch 5.1.1 & Kibana 5.1.1. Now as we will be using the both as locally, let's disconnect the Internet.
Now run Elasticsearch & Kibana.

Now what happens is Elasticsearch runs at localhost:9200 [Can be verified by hitting the URL & fetching basic Info] & when Kibana is run by going to localhost:5601 it does not run. Kibana console where we ran mentiones that it is unable to connect to ES at localhost:9200. Therefore Kibana does not run when mentioning url as localhost:5601.

You can reproduce this scenario as it is reproducible as mentioned above.
Saw the issue both in Ubuntu 14.04 & Windows 10.

Hi Yuvraj,

Is this a bare metal machine and you're physically disconnecting the network cable from the back? Or are you disabling the network some other way?


I am disconnecting the wifi/ethernet which was earlier connected.

Hi Yuvraj,

It's working for me with Kibana 5.1.1 on my Windows laptop. I can disconnect from my WiFi, start Elasticsearch and Kibana, and both are working OK.

What OS are you on?

Can you check your Elasticsearch log and look for the line like this;
publish_address {}, bound_addresses {}, {[::1]:9200}

On my Windows machine, it shows that Elasticsearch has resolved the name localhost to be the loopback ip address If yours is not logging this there might be an issue with your network configuration?


You can also try pinging localhost to make sure it resolves to;

# ping localhost
PING localhost ( 56(84) bytes of data.


I have checked on Ubuntu 14.04.
Seeing the above message as you are seeing. Also ping gives me exact output as received by you still I am unable to run Kibana with same error.

It maybe due to an issue with network configuration as it may not be able to lookup localhost with {Not sure aboout it though}

Thanks for your patience & time :slight_smile:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.