# Kibana on docker : Discover: connect ECONNREFUSED

**URL:** https://discuss.elastic.co/t/kibana-on-docker-discover-connect-econnrefused/112376
**Category:** Kibana
**Created:** [December 19, 2017, 8:39am UTC](https://discuss.elastic.co/t/kibana-on-docker-discover-connect-econnrefused/112376 "2017-12-19T08:39:52Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![vincenttouzet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vincenttouzet/32/25782_2.png) [@vincenttouzet](https://discuss.elastic.co/u/vincenttouzet)
#### Post date: [December 19, 2017, 8:39am UTC](https://discuss.elastic.co/t/kibana-on-docker-discover-connect-econnrefused/112376/1 "2017-12-19T08:39:52Z")

</div>

Hi, I set up an environment with ES 5.6 and Kibana 5.6 under Docker.

Here is the docker-compose services :

```
elasticsearch:
    build: ./docker/elasticsearch
    volumes:
      - es_data:/usr/share/elasticsearch/data
    ports:
        - "9200:9200"
        - "9300:9300"

kibana:
    image: docker.elastic.co/kibana/kibana:5.6.5
    ports:
        - "5601:5601"
    environment:
        ELASTICSEARCH_URL: http://elasticsearch
    links:
        - elasticsearch

```

When accessing [http://127.0.0.1:5601](http://127.0.0.1:5601) I can connect to kibana with elastic / changeme credentials but when trying to launch a discover with '\*' I get the following error message :

```
Discover: connect ECONNREFUSED 172.18.0.7:80
Error: Bad Gateway
at respond (http://127.0.0.1:5601/bundles/kibana.bundle.js?v=15592:12:2730)
at checkRespForFailure (http://127.0.0.1:5601/bundles/kibana.bundle.js?v=15592:12:1959)
at http://127.0.0.1:5601/bundles/kibana.bundle.js?v=15592:1:9692
at processQueue (http://127.0.0.1:5601/bundles/commons.bundle.js?v=15592:38:23621)
at http://127.0.0.1:5601/bundles/commons.bundle.js?v=15592:38:23888
at Scope.$eval (http://127.0.0.1:5601/bundles/commons.bundle.js?v=15592:39:4619)
at Scope.$digest (http://127.0.0.1:5601/bundles/commons.bundle.js?v=15592:39:2359)
at Scope.$apply (http://127.0.0.1:5601/bundles/commons.bundle.js?v=15592:39:5037)
at done (http://127.0.0.1:5601/bundles/commons.bundle.js?v=15592:37:25027)
at completeRequest (http://127.0.0.1:5601/bundles/commons.bundle.js?v=15592:37:28702)
at XMLHttpRequest.xhr.onload (http://127.0.0.1:5601/bundles/commons.bundle.js?v=15592:37:29634)

```

172.18.0.7 is the IP of elasticsearch container. I don't know why Kibana try to connect to port 80 of the elasticsearch container.

The configuration is the default. Didn't made any changes

elasticsearch.yml

```
cluster.name: "docker-cluster"
network.host: 0.0.0.0

# minimum_master_nodes need to be explicitly set when bound on a public IP
# set to 1 to allow single node clusters
# Details: https://github.com/elastic/elasticsearch/pull/17288
discovery.zen.minimum_master_nodes: 1

```

kibana.yml

```
---
# Default Kibana configuration from kibana-docker.

server.name: kibana
server.host: "0"
elasticsearch.url: http://elasticsearch:9200
elasticsearch.username: elastic
elasticsearch.password: changeme
xpack.monitoring.ui.container.elasticsearch.enabled: true

```

Kibana can find an index I've created but I have this error 😕

---

<div class="post-metadata">

### Author: ![ppisljar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ppisljar/32/11588_2.png) [@ppisljar](https://discuss.elastic.co/u/ppisljar)
#### Post date: [December 19, 2017, 1:03pm UTC](https://discuss.elastic.co/t/kibana-on-docker-discover-connect-econnrefused/112376/2 "2017-12-19T13:03:31Z")

</div>

If you look at your `docker-components` the `ELASTICSEARCH_URL` is missing the port (should be `http://elasticsearch:9200`). This value _probably_ overrides the value in your kibana.yml.

let me know if this resolves your problem, if not i'll try to get somebody with more experience with docker to try to help you figure it out.

---

<div class="post-metadata">

### Author: ![vincenttouzet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vincenttouzet/32/25782_2.png) [@vincenttouzet](https://discuss.elastic.co/u/vincenttouzet)
#### Post date: [December 19, 2017, 3:08pm UTC](https://discuss.elastic.co/t/kibana-on-docker-discover-connect-econnrefused/112376/3 "2017-12-19T15:08:27Z")

</div>

Thank you it was that !

---

<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: [January 16, 2018, 3:08pm UTC](https://discuss.elastic.co/t/kibana-on-docker-discover-connect-econnrefused/112376/4 "2018-01-16T15:08:38Z")

</div>

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