# Docker Kibana: Cannot connect to the Elasticsearch cluster currently configured for Kibana

**URL:** https://discuss.elastic.co/t/docker-kibana-cannot-connect-to-the-elasticsearch-cluster-currently-configured-for-kibana/190961
**Category:** Kibana
**Tags:** docker
**Created:** [July 17, 2019, 10:36am UTC](https://discuss.elastic.co/t/docker-kibana-cannot-connect-to-the-elasticsearch-cluster-currently-configured-for-kibana/190961 "2019-07-17T10:36:07Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Philip\_Colmer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/philip_colmer/32/50355_2.png) [@Philip\_Colmer](https://discuss.elastic.co/u/Philip_Colmer)
#### Post date: [July 17, 2019, 10:36am UTC](https://discuss.elastic.co/t/docker-kibana-cannot-connect-to-the-elasticsearch-cluster-currently-configured-for-kibana/190961/1 "2019-07-17T10:36:07Z")

</div>

I'm using the Docker image for Kibana 7.2.0. I'm trying to connect it to an Elasticsearch Docker container as part of the following docker-compose file:

```
version: "3"
services:
  fess:
    image: codelibs/fess:13.2
    restart: always
    ports:
      - "8080:8080"
    depends_on:
      - elasticsearch
    environment:
      - RUN_ELASTICSEARCH=false
      - "ES_HTTP_URL=http://elasticsearch:9200"
    volumes:
      - /srv/data/fess/config:/opt/fess
    networks:
      - esnet

  elasticsearch:
    image: codelibs/fess:13.2
    restart: always
    environment:
      - RUN_FESS=false
      - "ES_JAVA_OPTS=\"-Xms2g -Xmx2g\""
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - /srv/data/es/data:/var/lib/elasticsearch
    networks:
      - esnet

  kibana:
    image: docker.elastic.co/kibana/kibana:7.2.0
    restart: always
    ports:
      - "5601:5601"
    depends_on:
      - elasticsearch
    networks:
      - esnet

volumes:
  esdata:
    driver: local

networks:
  esnet:
    driver: bridge

```

The fess Docker image provides Elasticsearch 7.2.0 and this is confirmed if I enter the Kibana running container and curl the ES server:

```
bash-4.2$ curl http://elasticsearch:9200
{
  "name" : "9d15b486fb67",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "uJmUqL4ZR7-l2X7zG92Cbw",
  "version" : {
    "number" : "7.2.0",
    "build_flavor" : "oss",
    "build_type" : "deb",
    "build_hash" : "508c38a",
    "build_date" : "2019-06-20T15:54:18.811730Z",
    "build_snapshot" : false,
    "lucene_version" : "8.0.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

```

However, when I try to browse to the Kibana server on port 5601, I get this message:

![image](https://us1.discourse-cdn.com/elastic/original/3X/e/b/ebcddbe6112237969f55005e436d21d308d74213.png)

The kibana.yml file is:

```
#
# **THIS IS AN AUTO-GENERATED FILE**
#

# Default Kibana configuration for docker target
server.name: kibana
server.host: "0"
elasticsearch.hosts: ["http://elasticsearch:9200"]
xpack.monitoring.ui.container.elasticsearch.enabled: true

```

Any suggestions as to what I need to do in order to get Kibana successfully connecting to ES?

Thanks.

---

<div class="post-metadata">

### Author: ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)
#### Post date: [July 18, 2019, 4:41pm UTC](https://discuss.elastic.co/t/docker-kibana-cannot-connect-to-the-elasticsearch-cluster-currently-configured-for-kibana/190961/2 "2019-07-18T16:41:28Z")

</div>

As far as I remember you also need to connect(or link for the legacy term) both docker containers to the same network for it to work.

---

<div class="post-metadata">

### Author: ![Philip\_Colmer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/philip_colmer/32/50355_2.png) [@Philip\_Colmer](https://discuss.elastic.co/u/Philip_Colmer)
#### Post date: [July 19, 2019, 6:47am UTC](https://discuss.elastic.co/t/docker-kibana-cannot-connect-to-the-elasticsearch-cluster-currently-configured-for-kibana/190961/3 "2019-07-19T06:47:51Z")

</div>

Thank you. The author of the docker-compose file I was using has updated it to get Kibana working correctly with ES.

---

<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: [August 16, 2019, 6:48am UTC](https://discuss.elastic.co/t/docker-kibana-cannot-connect-to-the-elasticsearch-cluster-currently-configured-for-kibana/190961/4 "2019-08-16T06:48:11Z")

</div>

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