# 2 instances of ElasticSearch deployed with docker can't see each other

**URL:** https://discuss.elastic.co/t/2-instances-of-elasticsearch-deployed-with-docker-cant-see-each-other/31351
**Category:** Elasticsearch
**Created:** [September 29, 2015, 5:03pm UTC](https://discuss.elastic.co/t/2-instances-of-elasticsearch-deployed-with-docker-cant-see-each-other/31351 "2015-09-29T17:03:47Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![cruizpollino](https://avatars.discourse-cdn.com/v4/letter/c/6a8cbe/32.png) [@cruizpollino](https://discuss.elastic.co/u/cruizpollino)
#### Post date: [September 29, 2015, 5:03pm UTC](https://discuss.elastic.co/t/2-instances-of-elasticsearch-deployed-with-docker-cant-see-each-other/31351/1 "2015-09-29T17:03:47Z")

</div>

Good evening,

I've started two instances of elasticsearch on two hosts as docker containers

the issue now is the elasticsearch instances are not able to see each other

does anyone know what configuration changes or command parameters shall be used in order to have these two instances working together as a cluster?

Thanks in advance

Kind Regards

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [September 30, 2015, 6:28am UTC](https://discuss.elastic.co/t/2-instances-of-elasticsearch-deployed-with-docker-cant-see-each-other/31351/2 "2015-09-30T06:28:34Z")

</div>

Are you using multicast or unicast discovery?

---

<div class="post-metadata">

### Author: ![cruizpollino](https://avatars.discourse-cdn.com/v4/letter/c/6a8cbe/32.png) [@cruizpollino](https://discuss.elastic.co/u/cruizpollino)
#### Post date: [September 30, 2015, 6:56am UTC](https://discuss.elastic.co/t/2-instances-of-elasticsearch-deployed-with-docker-cant-see-each-other/31351/3 "2015-09-30T06:56:44Z")

</div>

good morning,

i have not set any special discovery option when i started the containers

docker run -d -p 9200:9200 -p 9300:9300 elasticsearch

is the command used to start the container on each node

regards

Enviado desde mi iPhone

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [September 30, 2015, 7:33am UTC](https://discuss.elastic.co/t/2-instances-of-elasticsearch-deployed-with-docker-cant-see-each-other/31351/4 "2015-09-30T07:33:46Z")

</div>

Okay, but what does the elasticsearch container come from?

---

<div class="post-metadata">

### Author: ![cruizpollino](https://avatars.discourse-cdn.com/v4/letter/c/6a8cbe/32.png) [@cruizpollino](https://discuss.elastic.co/u/cruizpollino)
#### Post date: [September 30, 2015, 8:06am UTC](https://discuss.elastic.co/t/2-instances-of-elasticsearch-deployed-with-docker-cant-see-each-other/31351/5 "2015-09-30T08:06:54Z")

</div>

sorry magnus,

But I don't really understand your last question, I'm using the official  
elasticsearch container available in the docker hub page

I've deployed one instance on compute1 server and the second one compute2  
one, and the issue is that the containers can't see each other so up to now  
i've two clusters with one node each

regards

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [September 30, 2015, 8:25am UTC](https://discuss.elastic.co/t/2-instances-of-elasticsearch-deployed-with-docker-cant-see-each-other/31351/6 "2015-09-30T08:25:16Z")

</div>

> But I don't really understand your last question, I'm using the official elasticsearch container available in the docker hub page

Thanks, that's exactly the missing piece of information. And it's version 1.7 you're using, i.e. the one currently with the "latest" tag?

I'm pretty sure this is an issue with Docker and multicast (which ES uses as its default discovery mechanism). See [github.com/docker/docker/issue #3043](https://github.com/docker/docker/issues/3043).

It's often recommended to use unicast discovery instead of multicast, so that could be something to explore. You could build your own Docker image with a custom elasticsearch.yml that disables multicast and references both ES hosts so that they can contact each other.

---

<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: [July 5, 2017, 11:47pm UTC](https://discuss.elastic.co/t/2-instances-of-elasticsearch-deployed-with-docker-cant-see-each-other/31351/7 "2017-07-05T23:47:27Z")

</div>


