Kibana docker image does not start correctly

Hi,

When I run kibana docker image, the container cannot recognize the elastic search running in a separate container. Here are the steps I followed.

  1. pulled the docker images for both elasticsearch and kibana though:

docker pull docker.elastic.co/elasticsearch/elasticsearch:6.3.1
docker pull docker.elastic.co/kibana/kibana:6.3.1

  1. start elasticsearch container:

docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:6.3.1

I can do: curl -XGET 10.23.138.26:9200 and result looks fine.

  1. start kibana:

docker container run -p 5601:5601 -e SERVER_NAME=test -e ELASTICSEARCH_URL=http://10.23.138.26:9200 docker.elastic.co/kibana/kibana:6.3.1

Then I got the following error messages:

"Unable to connect to Elasticsearch at http://10.23.138.26:9200.

It seems kibana cannot connect to elasticsearch. Is there anything I can do to fix this? Thanks!

You'll need to link your containers together directly to get this working. For example, adjust your elasticsearch startup to include a name:

docker run --name elasticsearch -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:6.3.1

and then direct kibana to use that name to find the elasticsearch instance:

docker run -p 5601:5601 -e SERVER_NAME=test -e ELASTICSEARCH_URL=http://elasticsearch:9200 docker.elastic.co/kibana/kibana:6.3.1

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