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 127.0.0.1 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.
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.
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.
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 {127.0.0.1:9200}, bound_addresses {127.0.0.1:9200}, {[::1]:9200}
On my Windows machine, it shows that Elasticsearch has resolved the name localhost to be the loopback ip address 127.0.0.1. If yours is not logging this there might be an issue with your network configuration?
Regards,
Lee
You can also try pinging localhost to make sure it resolves to 127.0.0.1;
# ping localhost
PING localhost (127.0.0.1) 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 127.0.0.1. {Not sure aboout it though}
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.