# Not able to connect to ElasticSearch Cluster in AWS from Kibana

**URL:** https://discuss.elastic.co/t/not-able-to-connect-to-elasticsearch-cluster-in-aws-from-kibana/218071
**Category:** Kibana
**Created:** [February 6, 2020, 12:29am UTC](https://discuss.elastic.co/t/not-able-to-connect-to-elasticsearch-cluster-in-aws-from-kibana/218071 "2020-02-06T00:29:28Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![chilakala](https://avatars.discourse-cdn.com/v4/letter/c/90ced4/32.png) [@chilakala](https://discuss.elastic.co/u/chilakala)
#### Post date: [February 6, 2020, 12:29am UTC](https://discuss.elastic.co/t/not-able-to-connect-to-elasticsearch-cluster-in-aws-from-kibana/218071/1 "2020-02-06T00:29:29Z")

</div>

Hi All,

I have setup a Elastic search cluster in AWS using the ec2 discovery plugin.  
I have 2 Nodes, one as master and another as data node.  
They are able to discover automatically and i see the 2 Nodes on the master

**Im not able to connect my Kibana to the elasticsearch master.**. Can someone help me.

I have made a curl connection from kibana to the elasticsearch server and its working fine

curl [http://172-31-13-233:9200](http://172-31-13-233:9200)

Kibana.yml: **Only enabled the below 3 values**  
server.port: 5601  
server.host: 172.31.5.33  
elasticsearch.hosts: ["[http://172.31.13.233:9200](http://172.31.13.233:9200)"]

**What additonal values i need to enable on Kibana.yml to have my kibana connect to elasticsearch**

Error message:  
ubuntu@ip-172-31-5-33:~/kibana-7.5.2-linux-x86\_64/bin$ ./kibana  
log [00:11:47.975] [info][plugins-system] Setting up [15] plugins: [security,licensing,code,timelion,features,spaces,translations,uiActions,newsfeed,inspector,embeddable,advancedUiActions,expressions,eui\_utils,data]  
log [00:11:47.983] [info][plugins][security] Setting up plugin  
log [00:11:47.984] [warning][config][plugins][security] Generating a random key for xpack.security.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.security.encryptionKey in kibana.yml  
log [00:11:47.985] [warning][config][plugins][security] Session cookies will be transmitted over insecure connections. This is not recommended.  
log [00:11:47.999] [info][licensing][plugins] Setting up plugin  
log [00:11:48.002] [info][code][plugins] Setting up plugin  
log [00:11:48.003] [info][plugins][timelion] Setting up plugin  
log [00:11:48.004] [info][features][plugins] Setting up plugin  
log [00:11:48.005] [info][plugins][spaces] Setting up plugin  
log [00:11:48.009] [info][plugins][translations] Setting up plugin  
log [00:11:48.010] [info][data][plugins] Setting up plugin  
log [00:11:51.248] [info][licensing][plugins] Imported changed license information from Elasticsearch for the [data] cluster: type: basic | status: active  
log [00:11:51.502] [warning][legacy-plugins] Skipping non-plugin directory at /home/ubuntu/kibana-7.5.2-linux-x86\_64/src/legacy/core\_plugins/visualizations  
log [00:11:52.243] [info][plugins-system] Starting [8] plugins: [security,licensing,code,timelion,features,spaces,translations,data]  
log [00:11:52.259] [info][migrations] Creating index .kibana\_task\_manager\_1.  
log [00:11:52.261] [info][migrations] Creating index .kibana\_1.  
**log [00:11:52.266] [warning][migrations] Unable to connect to Elasticsearch. Error: [resource\_already\_exists\_exception] index [.kibana\_task\_manager\_1/LRtbT1CvQMid9yX6fsvVLw] already exists, with { index\_uuid="LRtbT1CvQMid9yX6fsvVLw" & index=".kibana\_task\_manager\_1" }**

**ElasticSearch Cluster Health:**  
ubuntu@ip-172-31-13-233:~$ curl -XGET [http://172.31.13.233:9200/\_cluster/health](http://172.31.13.233:9200/_cluster/health) |jq  
{  
"cluster\_name": "es-demo",  
"status": "red",  
"timed\_out": false,  
"number\_of\_nodes": 2,  
"number\_of\_data\_nodes": 1,  
"active\_primary\_shards": 0,

---

<div class="post-metadata">

### Author: ![mikecote](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mikecote/32/58549_2.png) [@mikecote](https://discuss.elastic.co/u/mikecote)
#### Post date: [February 7, 2020, 3:22pm UTC](https://discuss.elastic.co/t/not-able-to-connect-to-elasticsearch-cluster-in-aws-from-kibana/218071/2 "2020-02-07T15:22:03Z")

</div>

Hi @chilakala,

If this is a new environment, can you try deleting a few indices to see if it helps: `.kibana_task_manager*` and `.kibana*` where `*` means anything following that. You may have to delete some aliases as well if there's one for `.kibana` or `.kibana_task_manager` [https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-alias.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-alias.html).

Hope this helps,  
Mike

---

<div class="post-metadata">

### Author: ![chilakala](https://avatars.discourse-cdn.com/v4/letter/c/90ced4/32.png) [@chilakala](https://discuss.elastic.co/u/chilakala)
#### Post date: [February 7, 2020, 8:41pm UTC](https://discuss.elastic.co/t/not-able-to-connect-to-elasticsearch-cluster-in-aws-from-kibana/218071/3 "2020-02-07T20:41:08Z")

</div>

Thanks for your reply mike.

Yes, this is a new environment.

I have tried deleting the kibana indices couple of times, and it did not solve the problem.

What should be IP in AWS for Kibana to discover the elastic search.

Do i need to do any additional setup for kibana when elasticsearch is using ec2 discovery plugin.

---

<div class="post-metadata">

### Author: ![mikecote](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mikecote/32/58549_2.png) [@mikecote](https://discuss.elastic.co/u/mikecote)
#### Post date: [February 10, 2020, 8:05pm UTC](https://discuss.elastic.co/t/not-able-to-connect-to-elasticsearch-cluster-in-aws-from-kibana/218071/4 "2020-02-10T20:05:49Z")

</div>

Can you provide, if possible, the logs for both Elasticsearch nodes? There may be something wrong on the Elasticsearch side. The fact that the Elasticsearch cluster health shows red with no primary shards is interesting.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [March 9, 2020, 8:05pm UTC](https://discuss.elastic.co/t/not-able-to-connect-to-elasticsearch-cluster-in-aws-from-kibana/218071/5 "2020-03-09T20:05:55Z")

</div>

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