Unable to connect to Elasticsearch at http://localhost:9200

is it a version issue or some issues related to firewall.

pls help

can you reach the elasticsearch running on localhost:9200 via curl on that machine? Is there an ES listening on localhost 9200?

Hi Michael ...via curl also its showing connection refused..
what can be possibly wrong in the elasticsearch.yml

Hi Niks,

Have you modified your YML file? If that is the case, you can revert it to a default YML file and then see if it works,

What are the full logs of your elasticsearch instance?

Look in your elasticssearch.yml, what is the setting for network.host:

That is the what elasticsearch is listening on. Try changing the network.host to

network.host: 127.0.0.1

and restarting elasticsearch. You need to get elasticsearch up and running on whatever ip you want it to listen to before fixing kibana. Once you can get to elasticsearch via curl to make sure its working, then you can start to get kibana properly configured. Right now you have an elasticsearch listening on some other ip address

2 Likes

Thanks it Works for me on Centos 7, same issue with elasticsearch
file elasticssearch.yml
find and change line to network.host: 127.0.0.1

I have solved this issue in macOS sierra by starting elasticsearch you can also check your elasticsearch is running or not.
brew services start elasticsearch

I would check to see which IP address port 9200 is bound to then go from there.

I use this command in both OS X and Linux (be aware: there are flags available in linux but not in OS X)

netstat -a -n | grep tcp | grep 9200

  • If nothing shows up, it may mean elasticsearch was not started or failed to start, check the log
  • If something shows up, you can tell which IP it is bound to then test that one with the curl command. If it works, update kibana's configuration file (I think that's what you have in the screenshot)
2 Likes