Kibana on docker : Discover: connect ECONNREFUSED

(Vincent Touzet) #1

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

Here is the docker-compose services :

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

        - "5601:5601"
        ELASTICSEARCH_URL: http://elasticsearch
        - elasticsearch

When accessing 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
Error: Bad Gateway
at respond (
at checkRespForFailure (
at processQueue (
at Scope.$eval (
at Scope.$digest (
at Scope.$apply (
at done (
at completeRequest (
at XMLHttpRequest.xhr.onload ( 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 "docker-cluster"

# minimum_master_nodes need to be explicitly set when bound on a public IP
# set to 1 to allow single node clusters
# Details:
discovery.zen.minimum_master_nodes: 1


# Default Kibana configuration from kibana-docker. kibana "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 :confused:

(Peter Pisljar) #2

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.

(Vincent Touzet) #3

Thank you it was that !

(system) #4

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