1
votes

I have setup Elasticsearch and Kibana in Amazon VPC, where two Elasticsearch instances (forming a cluster) stay in the private subnet and other node having Kibana/nginx sitting in public subnet. I can check the cluster health and it is good -

{
  "cluster_name" : "es-cluster",
  "status" : "green",
  "timed_out" : false,
  "number_of_nodes" : 2,
  "number_of_data_nodes" : 2,
  "active_primary_shards" : 0,
  "active_shards" : 0,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 0
}

When I do curl -XGET http://es_node1:9200 and curl -XGET http://es_node2:9200 from kibana node, it works fine, where es_node1 and es_node2 are two nodes of elasticsearch cluster. But when I open the Kibana dashboard in browser, I get -

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

In config.js file of Kibana, I've tried putting private IP or private DNS name of the elasticsearch instance, but it doesn't work. Please note that elasticsearch nodes are accessible from Kibana node using curl from command line.

When I do the same setting outside a VPC everything works fine. I suspect the issue is that until and unless elasticsearch cluster is made public (i.e. put in public subnet), Kibana would keep showing that error.

1

1 Answers

1
votes

Yeah, your suspicion is correct.

Kibana is a completely client side application. The implication is that client side (ie, end users browser) needs to be able to access the elasticsearch cluster.