# Elastic Docker Replica Error

**URL:** <https://discuss.elastic.co/t/elastic-docker-replica-error/110256>\
**Category:** Elasticsearch\
**Created:** [December 5, 2017, 6:18am UTC](https://discuss.elastic.co/t/elastic-docker-replica-error/110256 "2017-12-05T06:18:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ronak\_Agrawal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ronak_agrawal/32/25019_2.png) [@Ronak\_Agrawal](https://discuss.elastic.co/u/Ronak_Agrawal)\
**Post date:** [December 5, 2017, 6:18am UTC](https://discuss.elastic.co/t/elastic-docker-replica-error/110256/1 "2017-12-05T06:18:06Z")

</div>

I am trying to test the elastic docker. I want to create 2 node cluster (One master and the other replica). However, I am unable to create the replica node. Replica node throws an exception saying unable to connect master.  
Can you help me on this. . Docker-Compose file is as follow:

version: '3'  
services:  
elasticsearch:  
image: [docker.elastic.co/elasticsearch/elasticsearch:5.6.4](http://docker.elastic.co/elasticsearch/elasticsearch:5.6.4)  
container\_name: elasticsearch  
environment:  
- cluster.name=metripping  
- bootstrap.memory\_lock=true  
- "ES\_JAVA\_OPTS=-Xms512m -Xmx512m"  
- network.host=0.0.0.0  
- discovery.zen.minimum\_master\_nodes=1  
- http.compression=true  
- node.data=true  
- discovery.zen.ping.unicast.hosts=172.1.1.1:9200,172.1.1.2:9200  
ulimits:  
memlock:  
soft: -1  
hard: -1  
nofile:  
soft: 65536  
hard: 65536  
volumes:  
- /home/ubuntu/es/data:/usr/share/elasticsearch/data  
- /home/ubuntu/es/logs:/usr/share/elasticsearch/logs  
ports:  
- 9200:9200  
- 9300:9300  
- 9000-9999:9000-9999  
networks:  
- esnet

networks:  
esnet:  
driver: bridge

---

<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 2, 2018, 6:18am UTC](https://discuss.elastic.co/t/elastic-docker-replica-error/110256/2 "2018-01-02T06:18:08Z")

</div>

Closed on January 2, 2018, 6:18am UTC

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