# Updating unicast node list without restarting

**URL:** <https://discuss.elastic.co/t/updating-unicast-node-list-without-restarting/40533>\
**Category:** Elasticsearch\
**Created:** [January 30, 2016, 12:18am UTC](https://discuss.elastic.co/t/updating-unicast-node-list-without-restarting/40533 "2016-01-30T00:18:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![agp](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@agp](https://discuss.elastic.co/u/agp)\
**Post date:** [January 30, 2016, 12:18am UTC](https://discuss.elastic.co/t/updating-unicast-node-list-without-restarting/40533/1 "2016-01-30T00:18:27Z")

</div>

Hi,  
I have gone through a lot of threads around this topic and it seems like the answer is No, but just wanted to confirm.

Here are the details:

1. Can't use multicast
2. Most common scenario will have only 2 nodes (hence both will be master). May have more than 2 in some installations -- but lets ignore this for now.
3. Don't have list of IPs upfront. The 2 nodes may die/restart and I want to avoid having to restart the OTHER nodes to update the IP.

For ex I did this:

1. Started Node1 with unicast.hosts = Node1
2. Started Node2 with unicast.hosts = Node2 (I could do this since I knew Node1 by now).

Now if Node1 gets killed and restarted, I see it never joins the cluster even though Node1 and Node2 have the same cluster name.

The only way I understand this may work is that when Node2 is added, I should go and change Node1's unicast.hosts to be [Node1, **Node2**]. But this will mean that elasticsearch is being restarted on Node1 unnecessarily. Am I right?

I also read that the cluster update API ignores unicast.hosts as it is not dynamically update-able.

Linux daemons usually support -HUP signal mechanism to re-read configuration file _without restarting_ the process. Does ES support this? If not, is there ANY way to NOT have to restart Node1 to update the unicast.hosts?

Hopefully I explained my question clearly.  
Thank you.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 30, 2016, 12:53am UTC](https://discuss.elastic.co/t/updating-unicast-node-list-without-restarting/40533/2 "2016-01-30T00:53:35Z")

</div>

> [@agp](#):
>
> For ex I did this:1) Started Node1 with unicast.hosts = Node12) Started Node2 with unicast.hosts = Node2 (I could do this since I knew Node1 by now).
> 
> Now if Node1 gets killed and restarted, I see it never joins the cluster even though Node1 and Node2 have the same cluster name.

Yeah, but you don't have multicast enabled so they will never see each other.

> [@agp](#):
>
> The only way I understand this may work is that when Node2 is added, I should go and change Node1's unicast.hosts to be [Node1, Node2]. But this will mean that elasticsearch is being restarted on Node1 unnecessarily. Am I right?

You should just point node 2 to node 1, there's no need to update node 1 unless you do restart it for some other reason.

> [@agp](#):
>
> the answer is No

Ultimately, ^

---

<div class="post-metadata">

**Author:** ![anhlqn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anhlqn/32/5454_2.png) [@anhlqn](https://discuss.elastic.co/u/anhlqn)\
**Post date:** [January 30, 2016, 6:24am UTC](https://discuss.elastic.co/t/updating-unicast-node-list-without-restarting/40533/3 "2016-01-30T06:24:04Z")

</div>

I just list all master node IPs in the unicast setting on every master node. Is it ok?

---

<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:** [January 30, 2016, 3:27pm UTC](https://discuss.elastic.co/t/updating-unicast-node-list-without-restarting/40533/4 "2016-01-30T15:27:50Z")

</div>

> [@anhlqn](#):
>
> I just list all master node IPs in the unicast setting on every master node. Is it ok?

I assume that you meant "master node IPs and ports", and if instead you meant "on every node", yes, this is reasonable, fairly standard, and the recommended way to do it.

---

<div class="post-metadata">

**Author:** ![anhlqn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anhlqn/32/5454_2.png) [@anhlqn](https://discuss.elastic.co/u/anhlqn)\
**Post date:** [January 30, 2016, 5:26pm UTC](https://discuss.elastic.co/t/updating-unicast-node-list-without-restarting/40533/5 "2016-01-30T17:26:09Z")

</div>

Yes, that's what I have right now.

---

<div class="post-metadata">

**Author:** ![agp](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@agp](https://discuss.elastic.co/u/agp)\
**Post date:** [February 3, 2016, 7:23pm UTC](https://discuss.elastic.co/t/updating-unicast-node-list-without-restarting/40533/6 "2016-02-03T19:23:54Z")

</div>

> [@warkolm](#):
>
> You should just point node 2 to node 1, there's no need to update node 1 unless you do restart it for some other reason.

Correct. This is what I ended up doing. Whenever node1 has to restart (because it crashed or any such reason), I then update its unicast.hosts before starting elasticsearch on it. Thanks.

---

<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:19pm UTC](https://discuss.elastic.co/t/updating-unicast-node-list-without-restarting/40533/7 "2017-07-05T23:19:13Z")

</div>


