# Setting discovery.zen.ping.unicast.hosts for a server that is running

**URL:** <https://discuss.elastic.co/t/setting-discovery-zen-ping-unicast-hosts-for-a-server-that-is-running/14342>\
**Category:** Elasticsearch\
**Created:** [November 10, 2013, 6:20pm UTC](https://discuss.elastic.co/t/setting-discovery-zen-ping-unicast-hosts-for-a-server-that-is-running/14342 "2013-11-10T18:20:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevins](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kevins/32/946_2.png) [@kevins](https://discuss.elastic.co/u/kevins)\
**Post date:** [November 10, 2013, 6:20pm UTC](https://discuss.elastic.co/t/setting-discovery-zen-ping-unicast-hosts-for-a-server-that-is-running/14342/1 "2013-11-10T18:20:12Z")

</div>

My server environment does not support multicast and I am trying to  
construct a 2 node cluster on separate VM's. Both masters with data.

The elasticsearch that I am running is inside of a docker container.

What I would like to do is something like this:

Via the URL: [http://localhost:9200/\_custer/settings](http://localhost:9200/_custer/settings)

{  
"transient": {  
"discovery.zen.ping.unicast.hosts": "x.x.x.1:9300, x.x.x.2:9300"  
}  
}

When I execute that with a PUT it does not stick. It simply reports back  
an empty settings that looks like this:

{"persistent":{},"transient":{}}

I can execute other cluster settings that do work such as:

{  
"transient": {  
"indices.store.throttle.type": "merge",  
"indices.store.throttle.max\_bytes\_per\_sec": "1mb",  
}  
}

_Question is:_ What is the best method for setting hosts in this particular  
environment? Can the hosts be defined at runtime? I would prefer not to  
set this as part of the container image that is used.

I launch elasticsearch with something that looks like this:

docker run -i -t -d -p 9200:9200 -p 9300:9300 ehazlett/elasticsearch

Thank you for any suggestions.

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![John\_Goodall](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/john_goodall/32/1544_2.png) [@John\_Goodall](https://discuss.elastic.co/u/John_Goodall)\
**Post date:** [May 23, 2014, 5:42pm UTC](https://discuss.elastic.co/t/setting-discovery-zen-ping-unicast-hosts-for-a-server-that-is-running/14342/2 "2014-05-23T17:42:54Z")

</div>

Did you figure this out - I am trying to do the same thing...

On Sunday, November 10, 2013 1:20:12 PM UTC-5, Kevin S wrote:

> My server environment does not support multicast and I am trying to  
> construct a 2 node cluster on separate VM's. Both masters with data.
> 
> The elasticsearch that I am running is inside of a docker container.
> 
> What I would like to do is something like this:
> 
> Via the URL: [http://localhost:9200/\_custer/settings](http://localhost:9200/_custer/settings)
> 
> {  
> "transient": {  
> "discovery.zen.ping.unicast.hosts": "x.x.x.1:9300, x.x.x.2:9300"  
> }  
> }
> 
> When I execute that with a PUT it does not stick. It simply reports back  
> an empty settings that looks like this:
> 
> {"persistent":{},"transient":{}}
> 
> I can execute other cluster settings that do work such as:
> 
> {  
> "transient": {  
> "indices.store.throttle.type": "merge",  
> "indices.store.throttle.max\_bytes\_per\_sec": "1mb",  
> }  
> }
> 
> _Question is:_ What is the best method for setting hosts in this  
> particular environment? Can the hosts be defined at runtime? I would  
> prefer not to set this as part of the container image that is used.
> 
> I launch elasticsearch with something that looks like this:
> 
> docker run -i -t -d -p 9200:9200 -p 9300:9300 ehazlett/elasticsearch
> 
> Thank you for any suggestions.

--  
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/ed53157e-91c3-4abd-99cc-018288b5fadf%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ed53157e-91c3-4abd-99cc-018288b5fadf%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:27am UTC](https://discuss.elastic.co/t/setting-discovery-zen-ping-unicast-hosts-for-a-server-that-is-running/14342/3 "2017-07-06T01:27:20Z")

</div>


