Elasticsearch Unable to revive connection

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". 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/ => 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/
    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.
    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
    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/
    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/
    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/
    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/
    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" 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" showed "couldn't connect to host"

  4. here r my configs
    es config:
    cluster.name=myes
    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.......

What is the full output of the Elasticsearch cluster health API?

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
}

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 to see why the shards have not been allocated.

{
"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
}
}
]
}

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

{
"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...

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

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

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

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

my ultimate purpose is to be familiar with ELK. ^____^

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