Kibana Unable to revive connection. No living connections

Im trying to host Kibana and Elasticearch on my docker. So far I have Elasticsearch up and running but the Kibana shows me "Kibana server is not ready yet" error on my browser and following log on my console

kibana_1         | {"type":"log","@timestamp":"2019-01-25T10:04:11Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"Unable to revive connection: http://localhost:9200/"}
kibana_1         | {"type":"log","@timestamp":"2019-01-25T10:04:11Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"No living connections"}
kibana_1         | {"type":"log","@timestamp":"2019-01-25T10:04:13Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"Unable to revive connection: http://localhost:9200/"}
kibana_1         | {"type":"log","@timestamp":"2019-01-25T10:04:13Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"No living connections"}

Here is my Docker code

version: '3.1'
services:
  elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.5.4
container_name: elasticsearch
environment:
- cluster.name=docker-cluster
ports:
- 9200:9200
- 9300:9300
  kibana:
image: docker.elastic.co/kibana/kibana:6.5.4
environment:
  SERVER_HOST: 0.0.0.0
  ELASTICSEARCH_URL: http://localhost:9300
ports:
- "9201:5601"

Here is my elasticsearch log

{
"_nodes": {
    "total": 1,
    "successful": 1,
    "failed": 0
},
"cluster_name": "docker-cluster",
"nodes": {
    "6o2s9Q-oRvCXxDjWCqFKlA": {
        "name": "6o2s9Q-",
        "transport_address": "172.23.0.5:9300",
        "host": "172.23.0.5",
        "ip": "172.23.0.5",
        "version": "6.5.4",
        "build_flavor": "default",
        "build_type": "tar",
        "build_hash": "d2ef93d",
        "roles": [
            "master",
            "data",
            "ingest"
        ],
        "attributes": {
            "ml.machine_memory": "2076532736",
            "xpack.installed": "true",
            "ml.max_open_jobs": "20",
            "ml.enabled": "true"
        },
        "http": {
            "bound_address": [
                "0.0.0.0:9200"
            ],
            "publish_address": "172.23.0.5:9200",
            "max_content_length_in_bytes": 104857600
        }
    }
}

}

I can assure that elastic search is running fine and im already connecting at localhost:9300 and creating indices and putting templates on it. So it's working fine but kibana just doest connects.

Any Help will be appreciated.
Thanks

@jarpy - any help here ?

Thanks
Rashmi

Kibana is pointing at localhost but since this is a container environment, localhost in this context is the Kibana container, not the Docker host.

I recommend declaring a network for the containers and having them refer to each other by name, like:

ELASTICSEARCH_URL: http://elasticsearch:9300

Also, please check the indentation of you docker-compose.yml, I think it was pasted incorrectly and all the indentation is messed up. Since YAML is whitespace sensitive, I can't be sure exactly what your docker-compose.yml contains.

@jarpy Thanks for the reply.
I replaced the localhost with elasticsearch but still no luck.
And the indentation is correct on my side, it just got messed up while pasting. Sorry for that. Here is my updated yml

 version: '3.1'
services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:6.5.4
    container_name: elasticsearch
    environment:
    - cluster.name=docker-cluster
    ports:
    - 9200:9200
    - 9300:9300
  kibana:
    image: docker.elastic.co/kibana/kibana:6.5.4
    environment:
      SERVER_HOST: 0.0.0.0
      ELASTICSEARCH_URL: http://elasticsearch:9300
    ports:
    - "9201:5601"

Thanks. That's much nicer!

You also need to declare a network for the containers to talk on, like in this example.

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