# Multi instance configuration

**URL:** <https://discuss.elastic.co/t/multi-instance-configuration/51702>\
**Category:** Elasticsearch\
**Created:** [June 2, 2016, 1:36pm UTC](https://discuss.elastic.co/t/multi-instance-configuration/51702 "2016-06-02T13:36:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gphadke](https://avatars.discourse-cdn.com/v4/letter/g/ecc23a/32.png) [@gphadke](https://discuss.elastic.co/u/gphadke)\
**Post date:** [June 2, 2016, 1:36pm UTC](https://discuss.elastic.co/t/multi-instance-configuration/51702/1 "2016-06-02T13:36:43Z")

</div>

Hello

I am trying to setup multiple instances running on same physical box.  
Among the multiple instances I would like to set 1 as master and others as data only.

I was planning to have the data nodes 1,2 listen on ports 9201 and 9202 respectively and always. I want to give the connections settings of data nodes only to the es clients.

I have the below config

Master  
http.port: 9200  
transport.tcp.port: 9300  
network.host: ["192.168.100.102", _local_]  
discovery.zen.ping.timeout: 3s  
discovery.zen.ping.multicast.enabled: true  
discovery.zen.ping.unicast.hosts: ["192.168.100.102"]

cloud-2:  
node.master: false  
node.data: true  
node.master: true  
node.data: false  
http.port: 9201  
transport.tcp.port: 9301  
network.host: ["192.168.100.102", _local_]  
discovery.zen.ping.timeout: 3s  
discovery.zen.ping.multicast.enabled: true  
discovery.zen.ping.unicast.hosts: ["192.168.100.102"]

cloud-3:  
node.master: false  
node.data: true  
http.port: 9202  
transport.tcp.port: 9302  
network.host: ["192.168.100.102", _local_]  
discovery.zen.ping.timeout: 3s  
discovery.zen.ping.multicast.enabled: true  
discovery.zen.ping.unicast.hosts: ["192.168.100.102"]

What I see is with these settings for the data only nodes (cloud-2 and cloud-3), It fails to discover the master running on 9300. The cloud-3 instance seems to be pinging its own self. Same with cloud-2

If I comment out http.port and transport.tcp.port, the discovery seems to work, but the instances select first available ports in the range.

How can I set pre-defined ports for http and transport through yml as I am configuring these as connection variables in other ES clients.

[discovery.zen.ping.unicast] [cloud-3] [1] sending to {cloud-3}{VJtxMqsxSYCCvTRDCjHxLQ}{192.168.100.102}{192.168.100.102:9302}{rack\_id=cloud, master=false}  
[2016-06-02 13:26:09,514][TRACE][discovery.zen.ping.unicast] [cloud-3] [1] received response from {cloud-3}{VJtxMqsxSYCCvTRDCjHxLQ}{192.168.100.102}{192.168.100.102:9302}{rack\_id=cloud, master=false}: [ping\_response{node [{cloud-3}{VJtxMqsxSYCCvTRDCjHxLQ}{192.168.100.102}{192.168.100.102:9302}{rack\_id=cloud, master=false}], id[1], master [null], hasJoinedOnce [false], cluster\_name[vagrant\_low\_profile]}, ping\_response{node [{cloud-3}{VJtxMqsxSYCCvTRDCjHxLQ}{192.168.100.102}{192.168.100.102:9302}{rack\_id=cloud, master=false}], id[2], master [null], hasJoinedOnce [false], cluster\_name[vagrant\_low\_profile]}]

I am using elasticsearch 2.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:** [July 5, 2017, 10:46pm UTC](https://discuss.elastic.co/t/multi-instance-configuration/51702/2 "2017-07-05T22:46:52Z")

</div>


