1
votes

'Error Could not contact Elasticsearch at http://localhost:9200. Please ensure that Elasticsearch is reachable from your system.'

Currently I am following http://packetbeat.com/getstarted

I installed

  1. elastic search - running on localhost:9200 - returns the json, 2.packetbeat - running,
  2. Kibana on port 8000

Now, I change my kibana/config.js file - enter ,

elasticsearch: "http://"localhost":9200",

under elasticsearch. I get a plain white page with {{dashboard.current.title}} on top.

If I comment out elasticsearch: "http://"localhost":9200",

I get Error Could not contact Elasticsearch at http://localhost:9200. Please ensure that Elasticsearch is reachable from your system.

If I also enter it as elasticsearch: "http://localhost:9200",, I get the same error that it could not contact elasticsearch.

So, I am assuming elasticsearch: "http://"localhost":9200", is right, but it should render something. perhaps a UI

4
Sounds silly, but can you try localhost:9200 in your browser?Jettro Coenradie

4 Answers

1
votes

put hostname instead of localhost
for example http://bilal:9200 (here bilal is my hostname) if you dont know your hostname goto cmd or terminal type hostname

1
votes

this works for me.. instead of localhost set your public ip or public dns for elasticsearch: "http://public_dns:80",

and set the port forwarding from 80 to 9200.

0
votes

Have Kibana auto-detect the ElasticSearch URL by using

elasticsearch: "http://"+window.location.hostname+":9200",

instead of elasticsearch: "http://"localhost":9200"

0
votes

Dont change anything, for default elasticsearch is in port 9200:

The Elasticsearch instance to use for all your queries.

elasticsearch.url: "http://localhost:9200"

The problem is that perhaps you must put elasticsearch.url and you only put elasticsearch: "http://localhost:9200".