# Elasticsearch Unable to revive connection

**URL:** <https://discuss.elastic.co/t/elasticsearch-unable-to-revive-connection/109055>\
**Category:** Kibana\
**Created:** [November 24, 2017, 4:09pm UTC](https://discuss.elastic.co/t/elasticsearch-unable-to-revive-connection/109055 "2017-11-24T16:09:59Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![AskingBoy](https://avatars.discourse-cdn.com/v4/letter/a/2bfe46/32.png) [@AskingBoy](https://discuss.elastic.co/u/AskingBoy)\
**Post date:** [November 24, 2017, 4:10pm UTC](https://discuss.elastic.co/t/elasticsearch-unable-to-revive-connection/109055/1 "2017-11-24T16:10:00Z")

</div>

Here the hole is what i am running into

1. i tried to resolve the issue with "elasticsearch plugin is red". Then i thought the index .kibana still there, so i remove it by "curl -XDELETE [http://localhost:9200/.kibana](http://localhost:9200/.kibana)". i thought it may work.

2. then i restart kibana. that is how i get unable to revive connection.  
log [15:34:56.681] [info][status][plugin:kibana@6.0.0] Status changed from uninitialized to green - Ready  
log [15:34:56.733] [info][status][plugin:elasticsearch@6.0.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch  
log [15:34:56.764] [error][admin][elasticsearch] Request error, retrying  
HEAD [http://xxx.xxx.xxx.0:9200/](http://xxx.xxx.xxx.0:9200/) =\> connect ECONNREFUSED xxx.xxx.xxx.0:9200  
log [15:34:56.770] [warning][admin][elasticsearch] Unable to revive connection: [http://xxx.xxx.xxx.0:9200/](http://xxx.xxx.xxx.0:9200/)  
log [15:34:56.771] [warning][admin][elasticsearch] No living connections  
log [15:34:56.774] [info][status][plugin:console@6.0.0] Status changed from uninitialized to green - Ready  
log [15:34:56.778] [error][status][plugin:elasticsearch@6.0.0] Status changed from yellow to red - Unable to connect to Elasticsearch at [http://xxx.xxx.xxx.0:9200](http://xxx.xxx.xxx.0:9200).  
log [15:34:56.789] [info][status][plugin:metrics@6.0.0] Status changed from uninitialized to green - Ready  
log [15:34:56.976] [info][status][plugin:timelion@6.0.0] Status changed from uninitialized to green - Ready  
log [15:34:56.981] [info][listening] Server running at [http://xxx.xxx.xxx.0:5600](http://xxx.xxx.xxx.0:5600)  
log [15:34:56.982] [error][status][ui settings] Status changed from uninitialized to red - Elasticsearch plugin is red  
log [15:34:59.285] [warning][admin][elasticsearch] Unable to revive connection: [http://xxx.xxx.xxx.0:9200/](http://xxx.xxx.xxx.0:9200/)  
log [15:34:59.285] [warning][admin][elasticsearch] No living connections  
log [15:35:01.790] [warning][admin][elasticsearch] Unable to revive connection: [http://xxx.xxx.xxx.0:9200/](http://xxx.xxx.xxx.0:9200/)  
log [15:35:01.792] [warning][admin][elasticsearch] No living connections  
log [15:35:04.302] [warning][admin][elasticsearch] Unable to revive connection: [http://xxx.xxx.xxx.0:9200/](http://xxx.xxx.xxx.0:9200/)  
log [15:35:04.303] [warning][admin][elasticsearch] No living connections  
log [15:35:06.808] [warning][admin][elasticsearch] Unable to revive connection: [http://xxx.xxx.xxx.0:9200/](http://xxx.xxx.xxx.0:9200/)  
log [15:35:06.809] [warning][admin][elasticsearch] No living connections

3. i tried to solve the stuff. then i tested if es is running normally, "curl [http://localhost:9200](http://localhost:9200)" gave me a positive result showing it's running good. However, the url with ip:port is what i hvnt tried. Interesting thing happened that "curl [http://xxx.xxx.xxx.0:9200](http://xxx.xxx.xxx.0:9200)" showed "couldn't connect to host"

4. here r my configs  
es config:  
cluster.name=myes  
[node.name](http://node.name): mynode-1  
path.data:/data/es  
network.host:127.0.0.1  
http.port: 9200  
discovery.zen.ping.unicast.hosts: ["127.0.0.1", "xxx.xx.xx.xx"]  
discovery.zen.minimum\_master\_nodes: 1

kibana config:  
server.port: 5600  
server.host: "localhost"  
elasticsearch.preserveHost: true  
kibana.index: ".kibana"  
kibana.defaultAppId: "discover"  
elasticsearch.username: "es"  
elasticsearch.password: "es123"  
pid.file: /var/run/kibana.pid

1. how can i get kibana and es to run and cooperate perfectly? Do appreciate any help from u masters.......

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [November 25, 2017, 2:46pm UTC](https://discuss.elastic.co/t/elasticsearch-unable-to-revive-connection/109055/2 "2017-11-25T14:46:47Z")

</div>

What is the full output of the Elasticsearch [cluster health API](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html)?

---

<div class="post-metadata">

**Author:** ![AskingBoy](https://avatars.discourse-cdn.com/v4/letter/a/2bfe46/32.png) [@AskingBoy](https://discuss.elastic.co/u/AskingBoy)\
**Post date:** [November 26, 2017, 10:00am UTC](https://discuss.elastic.co/t/elasticsearch-unable-to-revive-connection/109055/3 "2017-11-26T10:00:18Z")

</div>

this should be the output

{  
"cluster\_name":"my-es",  
"status":"red",  
"timed\_out":false,  
"number\_of\_nodes":1,  
"number\_of\_data\_nodes":1,  
"active\_primary\_shards":0,  
"active\_shards":0,  
"relocating\_shards":0,  
"initializing\_shards":0,  
"unassigned\_shards":2,  
"delayed\_unassigned\_shards":0,  
"number\_of\_pending\_tasks":0,  
"number\_of\_in\_flight\_fetch":0,  
"task\_max\_waiting\_in\_queue\_millis":0,  
"active\_shards\_percent\_as\_number":0  
}

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [November 26, 2017, 10:10am UTC](https://discuss.elastic.co/t/elasticsearch-unable-to-revive-connection/109055/4 "2017-11-26T10:10:14Z")

</div>

You do not have any shards assigned, which is why the cluster is red. Check the Elasticsearch logs and/or use the [cluster allocation explain API](https://www.elastic.co/guide/en/elasticsearch/reference/6.0/cluster-allocation-explain.html) to see why the shards have not been allocated.

---

<div class="post-metadata">

**Author:** ![AskingBoy](https://avatars.discourse-cdn.com/v4/letter/a/2bfe46/32.png) [@AskingBoy](https://discuss.elastic.co/u/AskingBoy)\
**Post date:** [November 26, 2017, 10:26am UTC](https://discuss.elastic.co/t/elasticsearch-unable-to-revive-connection/109055/5 "2017-11-26T10:26:56Z")

</div>

{  
"index":".kibana",  
"shard":0,  
"primary":true,  
"current\_state":"unassigned",  
"unassigned\_info":{  
"reason":"CLUSTER\_RECOVERED",  
"at":"2017-11-24T18:42:04.346Z",  
"last\_allocation\_status":"no\_valid\_shard\_copy"  
},  
"can\_allocate":"no\_valid\_shard\_copy",  
"allocate\_explanation":"cannot allocate because a previous copy of the primary shard existed but can no longer be found on the nodes in the cluster",  
"node\_allocation\_decisions":[  
{  
"node\_id":"\_9ho5poZR5Kg143d0QIoHg",  
"node\_name":"my-node-1",  
"transport\_address":"xxx.xxx.xxx.0:9300",  
"node\_decision":"no",  
"store":{  
"found":false  
}  
}  
]  
}

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [November 26, 2017, 10:29am UTC](https://discuss.elastic.co/t/elasticsearch-unable-to-revive-connection/109055/6 "2017-11-26T10:29:45Z")

</div>

You might try deleting the `.kibana` index and see if that helps, as Kibana will create a new one.

---

<div class="post-metadata">

**Author:** ![AskingBoy](https://avatars.discourse-cdn.com/v4/letter/a/2bfe46/32.png) [@AskingBoy](https://discuss.elastic.co/u/AskingBoy)\
**Post date:** [November 26, 2017, 10:40am UTC](https://discuss.elastic.co/t/elasticsearch-unable-to-revive-connection/109055/7 "2017-11-26T10:40:48Z")

</div>

{  
"error":{  
"root\_cause":[  
{  
"type":"security\_exception",  
"reason":"missing authentication token for REST request [/\_cluster/health]",  
"header":{  
"WWW-Authenticate":"Basic realm="security" charset="UTF-8""  
}  
}  
],  
"type":"security\_exception",  
"reason":"missing authentication token for REST request [/\_cluster/health]",  
"header":{  
"WWW-Authenticate":"Basic realm="security" charset="UTF-8""  
}  
},  
"status":401  
}

this is right after i delete .kibana and restart elasticsearch, then i check health again...

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [November 26, 2017, 10:43am UTC](https://discuss.elastic.co/t/elasticsearch-unable-to-revive-connection/109055/8 "2017-11-26T10:43:10Z")

</div>

How have you set up the cluster? How are you securing it?

---

<div class="post-metadata">

**Author:** ![AskingBoy](https://avatars.discourse-cdn.com/v4/letter/a/2bfe46/32.png) [@AskingBoy](https://discuss.elastic.co/u/AskingBoy)\
**Post date:** [November 26, 2017, 10:45am UTC](https://discuss.elastic.co/t/elasticsearch-unable-to-revive-connection/109055/9 "2017-11-26T10:45:22Z")

</div>

i just followed the instruction to install es. hvnt noticed if i set up the cluster yet. Was it with config file elasticsearch.yml? if that, i already hv done that. Otherwise, hv no idea how to do so

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [November 26, 2017, 10:55am UTC](https://discuss.elastic.co/t/elasticsearch-unable-to-revive-connection/109055/10 "2017-11-26T10:55:24Z")

</div>

Which guide did you follow? Is Kibana deployed on the same host as Elasticsearch?

---

<div class="post-metadata">

**Author:** ![AskingBoy](https://avatars.discourse-cdn.com/v4/letter/a/2bfe46/32.png) [@AskingBoy](https://discuss.elastic.co/u/AskingBoy)\
**Post date:** [November 26, 2017, 10:56am UTC](https://discuss.elastic.co/t/elasticsearch-unable-to-revive-connection/109055/11 "2017-11-26T10:56:51Z")

</div>

yes sir. this should be the official instruction to follow.

---

<div class="post-metadata">

**Author:** ![AskingBoy](https://avatars.discourse-cdn.com/v4/letter/a/2bfe46/32.png) [@AskingBoy](https://discuss.elastic.co/u/AskingBoy)\
**Post date:** [November 26, 2017, 10:59am UTC](https://discuss.elastic.co/t/elasticsearch-unable-to-revive-connection/109055/12 "2017-11-26T10:59:21Z")

</div>

my ultimate purpose is to be familiar with ELK. ^\_\_\_\_^

---

<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:** [December 24, 2017, 10:59am UTC](https://discuss.elastic.co/t/elasticsearch-unable-to-revive-connection/109055/13 "2017-12-24T10:59:38Z")

</div>

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