# "Static IP:port" for the master of the cluster

**URL:** <https://discuss.elastic.co/t/static-ip-port-for-the-master-of-the-cluster/48536>\
**Category:** Elasticsearch\
**Created:** [April 27, 2016, 10:11am UTC](https://discuss.elastic.co/t/static-ip-port-for-the-master-of-the-cluster/48536 "2016-04-27T10:11:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dinushan\_m](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dinushan_m/32/8095_2.png) [@dinushan\_m](https://discuss.elastic.co/u/dinushan_m)\
**Post date:** [April 27, 2016, 10:11am UTC](https://discuss.elastic.co/t/static-ip-port-for-the-master-of-the-cluster/48536/1 "2016-04-27T10:11:34Z")

</div>

Hi,  
Hope I'm not insane, I have run two nodes in the same server.  
This is my conf,

_network.host: 10.111.99.20_  
\_network.bind\_host: 0.0.0.0  
\_network.publish\_host: 10.111.99.20

The two nodes connects , elects a master properly and runs @10.111.99.20: **9200**.

The problem is when first one is down, the second becomes the master, but it's IP becomes 10.111.99.20: **9201**

Can a cluster always have a "static" IP to the outside world ?

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [April 27, 2016, 2:25pm UTC](https://discuss.elastic.co/t/static-ip-port-for-the-master-of-the-cluster/48536/2 "2016-04-27T14:25:03Z")

</div>

You can not have two sockets bound to the same port on the same interface, ever.

This means that if one node binds to 9200 on an interface, the other must bind to a different port if using the same interface. By default, Elasticsearch will try to bind to 9201 if 9200 is not available.

By configuring your clients properly, this should never be an issue though. You should specify that one node binds to 9200, the other binds to 9201 and configure your clients to look for nodes on both 9200 and 9201.

---

<div class="post-metadata">

**Author:** ![dinushan\_m](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dinushan_m/32/8095_2.png) [@dinushan\_m](https://discuss.elastic.co/u/dinushan_m)\
**Post date:** [April 27, 2016, 2:31pm UTC](https://discuss.elastic.co/t/static-ip-port-for-the-master-of-the-cluster/48536/3 "2016-04-27T14:31:28Z")

</div>

Thanks @jasontedor for your answer.

---

<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:55pm UTC](https://discuss.elastic.co/t/static-ip-port-for-the-master-of-the-cluster/48536/4 "2017-07-05T22:55:56Z")

</div>


