# Kibana docker image does not start correctly

**URL:** https://discuss.elastic.co/t/kibana-docker-image-does-not-start-correctly/141064
**Category:** Kibana
**Created:** [July 23, 2018, 1:59am UTC](https://discuss.elastic.co/t/kibana-docker-image-does-not-start-correctly/141064 "2018-07-23T01:59:28Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Bo\_Qiang](https://avatars.discourse-cdn.com/v4/letter/b/c68b51/32.png) [@Bo\_Qiang](https://discuss.elastic.co/u/Bo_Qiang)
#### Post date: [July 23, 2018, 1:59am UTC](https://discuss.elastic.co/t/kibana-docker-image-does-not-start-correctly/141064/1 "2018-07-23T01:59:28Z")

</div>

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](http://docker.elastic.co/elasticsearch/elasticsearch:6.3.1)  
docker pull [docker.elastic.co/kibana/kibana:6.3.1](http://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](http://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](http://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](http://10.23.138.26:9200).

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

---

<div class="post-metadata">

### Author: ![gil](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gil/32/41911_2.png) [@gil](https://discuss.elastic.co/u/gil)
#### Post date: [July 23, 2018, 2:58pm UTC](https://discuss.elastic.co/t/kibana-docker-image-does-not-start-correctly/141064/2 "2018-07-23T14:58:15Z")

</div>

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
```

---

<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 13, 2018, 10:58am UTC](https://discuss.elastic.co/t/kibana-docker-image-does-not-start-correctly/141064/3 "2018-08-13T10:58:16Z")

</div>

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