# Cluster configuration

**URL:** <https://discuss.elastic.co/t/cluster-configuration/17037>\
**Category:** Elasticsearch\
**Created:** [April 16, 2014, 4:34am UTC](https://discuss.elastic.co/t/cluster-configuration/17037 "2014-04-16T04:34:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![nalzapur](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nalzapur/32/899_2.png) [@nalzapur](https://discuss.elastic.co/u/nalzapur)\
**Post date:** [April 16, 2014, 4:34am UTC](https://discuss.elastic.co/t/cluster-configuration/17037/1 "2014-04-16T04:34:17Z")

</div>

hello,

i am trying to implement elasticsearch cluster. i have 2 machines with 2  
nodes each. i have following configuration in yml file. i have given unique  
node name on each node, all of them are master and data nodes.

cluster.name: elasticsearch  
node.master: true  
node.data: true  
discovery.zen.ping.multicast.enabled: false  
discovery.zen.ping.unicast.hosts: ["machine1", "machine2"]  
discovery.zen.minimum\_master\_nodes: 3

the four nodes are working correctly in the cluster. I would like to bring  
one of the nodes down, and have other 3 run in the cluster. When I try to  
bring one of first three, cluster goes down, I get this error

{  
"error": "ClusterBlockException[blocked by: [SERVICE\_UNAVAILABLE/1/state  
not recovered / initialized];]",  
"status": 503  
}

If i bring down the last started node, the cluster works fine. I thought if  
I have 4 masters and one of the master goes down, other three masters  
should run in the cluster. is it not correct?

thank you.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/93ebf994-cc20-4846-8763-a044e2f008f7%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/93ebf994-cc20-4846-8763-a044e2f008f7%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [April 16, 2014, 4:05pm UTC](https://discuss.elastic.co/t/cluster-configuration/17037/2 "2014-04-16T16:05:37Z")

</div>

I believe if you have two or more nodes on a single machine, you need to  
specify each in the unicast host property:

discovery.zen.ping.unicast.hosts: ["machine1:port1", "machine2:port1",  
"machine1:port2",  
"machine2:port2"]

Where port1 and port2 are probably 9300 and 9301.

--  
Ivan

On Tue, Apr 15, 2014 at 9:34 PM, Narasimha Alzapur [avnrao@gmail.com](mailto:avnrao@gmail.com) wrote:

> hello,
> 
> i am trying to implement elasticsearch cluster. i have 2 machines with 2  
> nodes each. i have following configuration in yml file. i have given unique  
> node name on each node, all of them are master and data nodes.
> 
> cluster.name: elasticsearch  
> node.master: true  
> node.data: true  
> discovery.zen.ping.multicast.enabled: false  
> discovery.zen.ping.unicast.hosts: ["machine1", "machine2"]  
> discovery.zen.minimum\_master\_nodes: 3
> 
> the four nodes are working correctly in the cluster. I would like to bring  
> one of the nodes down, and have other 3 run in the cluster. When I try to  
> bring one of first three, cluster goes down, I get this error
> 
> {  
> "error": "ClusterBlockException[blocked by:  
> [SERVICE\_UNAVAILABLE/1/state not recovered / initialized];]",  
> "status": 503  
> }
> 
> If i bring down the last started node, the cluster works fine. I thought  
> if I have 4 masters and one of the master goes down, other three masters  
> should run in the cluster. is it not correct?
> 
> thank you.
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/93ebf994-cc20-4846-8763-a044e2f008f7%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/93ebf994-cc20-4846-8763-a044e2f008f7%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/93ebf994-cc20-4846-8763-a044e2f008f7%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/93ebf994-cc20-4846-8763-a044e2f008f7%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQDOJMvAsNWVzHa1Vf8QZCSfqaGr5%3D2N6-g5BR0EkufHFQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQDOJMvAsNWVzHa1Vf8QZCSfqaGr5%3D2N6-g5BR0EkufHFQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![nalzapur](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nalzapur/32/899_2.png) [@nalzapur](https://discuss.elastic.co/u/nalzapur)\
**Post date:** [April 16, 2014, 5:05pm UTC](https://discuss.elastic.co/t/cluster-configuration/17037/3 "2014-04-16T17:05:20Z")

</div>

Thank you. That worked. Now when i bring down any master, cluster keeps  
going with other 3 master nodes.

I took down a master node that is bound to localhost:9200 on one machine1.  
I can still query using localhost:9201. Does it mean, do we need to change  
the URL on client from 9200 to 9201 if a node goes down. Is there anyway to  
avoid changing url on client?

appreciate your help. thank you.

On Wednesday, April 16, 2014 11:05:37 AM UTC-5, Ivan Brusic wrote:

> I believe if you have two or more nodes on a single machine, you need to  
> specify each in the unicast host property:
> 
> discovery.zen.ping.unicast.hosts: ["machine1:port1", "machine2:port1", "machine1:port2",  
> "machine2:port2"]
> 
> Where port1 and port2 are probably 9300 and 9301.
> 
> --  
> Ivan
> 
> On Tue, Apr 15, 2014 at 9:34 PM, Narasimha Alzapur \<[avn...@gmail.com](mailto:avn...@gmail.com)\<javascript:\>
> 
> > wrote:
> 
> > hello,
> > 
> > i am trying to implement elasticsearch cluster. i have 2 machines with 2  
> > nodes each. i have following configuration in yml file. i have given unique  
> > node name on each node, all of them are master and data nodes.
> > 
> > cluster.name: elasticsearch  
> > node.master: true  
> > node.data: true  
> > discovery.zen.ping.multicast.enabled: false  
> > discovery.zen.ping.unicast.hosts: ["machine1", "machine2"]  
> > discovery.zen.minimum\_master\_nodes: 3
> > 
> > the four nodes are working correctly in the cluster. I would like to  
> > bring one of the nodes down, and have other 3 run in the cluster. When I  
> > try to bring one of first three, cluster goes down, I get this error
> > 
> > {  
> > "error": "ClusterBlockException[blocked by:  
> > [SERVICE\_UNAVAILABLE/1/state not recovered / initialized];]",  
> > "status": 503  
> > }
> > 
> > If i bring down the last started node, the cluster works fine. I thought  
> > if I have 4 masters and one of the master goes down, other three masters  
> > should run in the cluster. is it not correct?
> > 
> > thank you.
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/93ebf994-cc20-4846-8763-a044e2f008f7%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/93ebf994-cc20-4846-8763-a044e2f008f7%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/93ebf994-cc20-4846-8763-a044e2f008f7%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/93ebf994-cc20-4846-8763-a044e2f008f7%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/b48a8aba-e565-4065-844e-5608d3ad1929%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b48a8aba-e565-4065-844e-5608d3ad1929%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [April 16, 2014, 5:14pm UTC](https://discuss.elastic.co/t/cluster-configuration/17037/4 "2014-04-16T17:14:12Z")

</div>

It depends on which client you use. If you use the Java TransportClient  
with "sniff" enabled, it detect all nodes upon client startup and use that  
list for its request. All other clients (REST) round robin between whatever  
servers were set in the properties.

--  
Ivan

On Wed, Apr 16, 2014 at 10:05 AM, Narasimha Alzapur [avnrao@gmail.com](mailto:avnrao@gmail.com)wrote:

> Thank you. That worked. Now when i bring down any master, cluster keeps  
> going with other 3 master nodes.
> 
> I took down a master node that is bound to localhost:9200 on one machine1.  
> I can still query using localhost:9201. Does it mean, do we need to change  
> the URL on client from 9200 to 9201 if a node goes down. Is there anyway to  
> avoid changing url on client?
> 
> appreciate your help. thank you.
> 
> On Wednesday, April 16, 2014 11:05:37 AM UTC-5, Ivan Brusic wrote:
> 
> > I believe if you have two or more nodes on a single machine, you need to  
> > specify each in the unicast host property:
> > 
> > discovery.zen.ping.unicast.hosts: ["machine1:port1", "machine2:port1",  
> > "machine1:port2", "machine2:port2"]
> > 
> > Where port1 and port2 are probably 9300 and 9301.
> > 
> > --  
> > Ivan
> > 
> > On Tue, Apr 15, 2014 at 9:34 PM, Narasimha Alzapur [avn...@gmail.com](mailto:avn...@gmail.com)wrote:
> > 
> > > hello,
> > > 
> > > i am trying to implement elasticsearch cluster. i have 2 machines with 2  
> > > nodes each. i have following configuration in yml file. i have given unique  
> > > node name on each node, all of them are master and data nodes.
> > > 
> > > cluster.name: elasticsearch  
> > > node.master: true  
> > > node.data: true  
> > > discovery.zen.ping.multicast.enabled: false  
> > > discovery.zen.ping.unicast.hosts: ["machine1", "machine2"]  
> > > discovery.zen.minimum\_master\_nodes: 3
> > > 
> > > the four nodes are working correctly in the cluster. I would like to  
> > > bring one of the nodes down, and have other 3 run in the cluster. When I  
> > > try to bring one of first three, cluster goes down, I get this error
> > > 
> > > {  
> > > "error": "ClusterBlockException[blocked by:  
> > > [SERVICE\_UNAVAILABLE/1/state not recovered / initialized];]",  
> > > "status": 503  
> > > }
> > > 
> > > If i bring down the last started node, the cluster works fine. I thought  
> > > if I have 4 masters and one of the master goes down, other three masters  
> > > should run in the cluster. is it not correct?
> > > 
> > > thank you.
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).
> > > 
> > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > msgid/elasticsearch/93ebf994-cc20-4846-8763-a044e2f008f7%  
> > > [40googlegroups.com](http://40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/93ebf994-cc20-4846-8763-a044e2f008f7%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/93ebf994-cc20-4846-8763-a044e2f008f7%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/b48a8aba-e565-4065-844e-5608d3ad1929%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b48a8aba-e565-4065-844e-5608d3ad1929%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/b48a8aba-e565-4065-844e-5608d3ad1929%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/b48a8aba-e565-4065-844e-5608d3ad1929%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBYOwaHExubsm6j78fPvU3VM3bvKjBoFyZ1ubGW0APynA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBYOwaHExubsm6j78fPvU3VM3bvKjBoFyZ1ubGW0APynA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![nalzapur](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nalzapur/32/899_2.png) [@nalzapur](https://discuss.elastic.co/u/nalzapur)\
**Post date:** [April 16, 2014, 5:34pm UTC](https://discuss.elastic.co/t/cluster-configuration/17037/5 "2014-04-16T17:34:43Z")

</div>

Thank you Ivan. I am using NEST c# client, it has sniff functionality, I  
will use that.

On Wednesday, April 16, 2014 12:14:12 PM UTC-5, Ivan Brusic wrote:

> It depends on which client you use. If you use the Java TransportClient  
> with "sniff" enabled, it detect all nodes upon client startup and use that  
> list for its request. All other clients (REST) round robin between whatever  
> servers were set in the properties.
> 
> --  
> Ivan
> 
> On Wed, Apr 16, 2014 at 10:05 AM, Narasimha Alzapur \<[avn...@gmail.com](mailto:avn...@gmail.com)\<javascript:\>
> 
> > wrote:
> 
> > Thank you. That worked. Now when i bring down any master, cluster keeps  
> > going with other 3 master nodes.
> > 
> > I took down a master node that is bound to localhost:9200 on one  
> > machine1. I can still query using localhost:9201. Does it mean, do we need  
> > to change the URL on client from 9200 to 9201 if a node goes down. Is there  
> > anyway to avoid changing url on client?
> > 
> > appreciate your help. thank you.
> > 
> > On Wednesday, April 16, 2014 11:05:37 AM UTC-5, Ivan Brusic wrote:
> > 
> > > I believe if you have two or more nodes on a single machine, you need to  
> > > specify each in the unicast host property:
> > > 
> > > discovery.zen.ping.unicast.hosts: ["machine1:port1", "machine2:port1",  
> > > "machine1:port2", "machine2:port2"]
> > > 
> > > Where port1 and port2 are probably 9300 and 9301.
> > > 
> > > --  
> > > Ivan
> > > 
> > > On Tue, Apr 15, 2014 at 9:34 PM, Narasimha Alzapur [avn...@gmail.com](mailto:avn...@gmail.com)wrote:
> > > 
> > > > hello,
> > > > 
> > > > i am trying to implement elasticsearch cluster. i have 2 machines with  
> > > > 2 nodes each. i have following configuration in yml file. i have given  
> > > > unique node name on each node, all of them are master and data nodes.
> > > > 
> > > > cluster.name: elasticsearch  
> > > > node.master: true  
> > > > node.data: true  
> > > > discovery.zen.ping.multicast.enabled: false  
> > > > discovery.zen.ping.unicast.hosts: ["machine1", "machine2"]  
> > > > discovery.zen.minimum\_master\_nodes: 3
> > > > 
> > > > the four nodes are working correctly in the cluster. I would like to  
> > > > bring one of the nodes down, and have other 3 run in the cluster. When I  
> > > > try to bring one of first three, cluster goes down, I get this error
> > > > 
> > > > {  
> > > > "error": "ClusterBlockException[blocked by:  
> > > > [SERVICE\_UNAVAILABLE/1/state not recovered / initialized];]",  
> > > > "status": 503  
> > > > }
> > > > 
> > > > If i bring down the last started node, the cluster works fine. I  
> > > > thought if I have 4 masters and one of the master goes down, other three  
> > > > masters should run in the cluster. is it not correct?
> > > > 
> > > > thank you.
> > > > 
> > > > --  
> > > > You received this message because you are subscribed to the Google  
> > > > Groups "elasticsearch" group.  
> > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).
> > > > 
> > > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > msgid/elasticsearch/93ebf994-cc20-4846-8763-a044e2f008f7%  
> > > > [40googlegroups.com](http://40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/93ebf994-cc20-4846-8763-a044e2f008f7%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/93ebf994-cc20-4846-8763-a044e2f008f7%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > .  
> > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google Groups  
> > > "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send an  
> > > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/b48a8aba-e565-4065-844e-5608d3ad1929%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b48a8aba-e565-4065-844e-5608d3ad1929%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/b48a8aba-e565-4065-844e-5608d3ad1929%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/b48a8aba-e565-4065-844e-5608d3ad1929%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .
> > 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/045557c5-b745-42c4-a8b1-a2d1fd9e12d1%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/045557c5-b745-42c4-a8b1-a2d1fd9e12d1%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 1:35am UTC](https://discuss.elastic.co/t/cluster-configuration/17037/6 "2017-07-06T01:35:25Z")

</div>


