# Network.publish\_host for an address outside a docker container

**URL:** <https://discuss.elastic.co/t/network-publish-host-for-an-address-outside-a-docker-container/20812>\
**Category:** Elasticsearch\
**Created:** [November 18, 2014, 1:38pm UTC](https://discuss.elastic.co/t/network-publish-host-for-an-address-outside-a-docker-container/20812 "2014-11-18T13:38:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robin\_Clarke](https://avatars.discourse-cdn.com/v4/letter/r/7ba0ec/32.png) [@Robin\_Clarke](https://discuss.elastic.co/u/Robin_Clarke)\
**Post date:** [November 18, 2014, 1:38pm UTC](https://discuss.elastic.co/t/network-publish-host-for-an-address-outside-a-docker-container/20812/1 "2014-11-18T13:38:48Z")

</div>

I am trying to do a setup like this:

machine1 - 192.168.0.10

9300 =\> 9300 Docker container elasticsearch1 internal vlan 172.17.0.68

Elasticsearch transport running on port 9300

network.publish\_host 192.168.10:9300

9301 =\> 9300 Docker container elasticsearch2 internal vlan 172.17.0.69

Elasticsearch transport running on port 9300

network.publish\_host 192.168.10:9301

machine2 - 192.168.0.20

9300 =\> 9300 Docker container elasticsearch1 internal vlan 172.17.0.68

Elasticsearch transport running on port 9300

network.publish\_host 192.168.20:9300

9301 =\> 9300 Docker container elasticsearch2 internal vlan 172.17.0.69

Elasticsearch transport running on port 9300

network.publish\_host 192.168.20:9301

So if I define machine1 / elasticsearch1 as my master, I should be able to  
set unicast on the three other nodes as 192.168.0.10:9300, and as listed  
above, the network.publish\_host on each node, BUT  
Each node in its docker container does not see the address it should be  
publishing, and it seems that this setting not only says "publish this  
address" but also "bind to this address".

_Is there any way to publish an address which the node cannot actually bind  
to to allow machines in this type of a constellation to connect to each  
other?_

Thank you!  
-Robin-

--  
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/ababbf50-ecae-4988-a4a0-af4ea2fb7412%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ababbf50-ecae-4988-a4a0-af4ea2fb7412%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [November 18, 2014, 8:18pm UTC](https://discuss.elastic.co/t/network-publish-host-for-an-address-outside-a-docker-container/20812/2 "2014-11-18T20:18:48Z")

</div>

Nope.  
There are a few docker users on the IRC channel that might be able to give  
you some assistance or pointer though.

On 19 November 2014 00:38, Robin Clarke [robin13@gmail.com](mailto:robin13@gmail.com) wrote:

> I am trying to do a setup like this:
> 
> machine1 - 192.168.0.10
> 
> 9300 =\> 9300 Docker container elasticsearch1 internal vlan 172.17.0.68
> 
> Elasticsearch transport running on port 9300
> 
> network.publish\_host 192.168.10:9300
> 
> 9301 =\> 9300 Docker container elasticsearch2 internal vlan 172.17.0.69
> 
> Elasticsearch transport running on port 9300
> 
> network.publish\_host 192.168.10:9301
> 
> machine2 - 192.168.0.20
> 
> 9300 =\> 9300 Docker container elasticsearch1 internal vlan 172.17.0.68
> 
> Elasticsearch transport running on port 9300
> 
> network.publish\_host 192.168.20:9300
> 
> 9301 =\> 9300 Docker container elasticsearch2 internal vlan 172.17.0.69
> 
> Elasticsearch transport running on port 9300
> 
> network.publish\_host 192.168.20:9301
> 
> So if I define machine1 / elasticsearch1 as my master, I should be able to  
> set unicast on the three other nodes as 192.168.0.10:9300, and as listed  
> above, the network.publish\_host on each node, BUT  
> Each node in its docker container does not see the address it should be  
> publishing, and it seems that this setting not only says "publish this  
> address" but also "bind to this address".
> 
> _Is there any way to publish an address which the node cannot actually  
> bind to to allow machines in this type of a constellation to connect to  
> each other?_
> 
> Thank you!  
> -Robin-
> 
> --  
> 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/ababbf50-ecae-4988-a4a0-af4ea2fb7412%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ababbf50-ecae-4988-a4a0-af4ea2fb7412%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/ababbf50-ecae-4988-a4a0-af4ea2fb7412%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/ababbf50-ecae-4988-a4a0-af4ea2fb7412%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/CAF3ZnZkE\_CrKoL6brPMN6qcHE\_LEMOvghMzjx5xkz8zgvqaWWg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAF3ZnZkE_CrKoL6brPMN6qcHE_LEMOvghMzjx5xkz8zgvqaWWg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Tony\_Su](https://avatars.discourse-cdn.com/v4/letter/t/8dc957/32.png) [@Tony\_Su](https://discuss.elastic.co/u/Tony_Su)\
**Post date:** [November 18, 2014, 10:54pm UTC](https://discuss.elastic.co/t/network-publish-host-for-an-address-outside-a-docker-container/20812/3 "2014-11-18T22:54:00Z")

</div>

You need to describe any network troubleshooting steps you've tried (like  
telnet or curl commands) that verify network connectivity to open ports  
with an active service responding.

It might also be helpful to understand how you're doing your network  
configuration, particularly is you're using vlans (why? Why not a simple  
network connection?) If you're really using vlans, you might need to  
describe how those are set up if you can't configure network connectivity  
correctly. The issue can be, if you've really set up vlans, you might need  
to also describe the Bridge Control Device you've created.

You might also post the Dockerfile you've built (I assume you must, to  
incorporate your customizations) which would provide a clearer picture as  
well as a sample "run" command complete with the switches you're using.

Tony

On Tuesday, November 18, 2014 5:38:48 AM UTC-8, Robin Clarke wrote:

> I am trying to do a setup like this:
> 
> machine1 - 192.168.0.10
> 
> 9300 =\> 9300 Docker container elasticsearch1 internal vlan 172.17.0.68
> 
> Elasticsearch transport running on port 9300
> 
> network.publish\_host 192.168.10:9300
> 
> 9301 =\> 9300 Docker container elasticsearch2 internal vlan 172.17.0.69
> 
> Elasticsearch transport running on port 9300
> 
> network.publish\_host 192.168.10:9301
> 
> machine2 - 192.168.0.20
> 
> 9300 =\> 9300 Docker container elasticsearch1 internal vlan 172.17.0.68
> 
> Elasticsearch transport running on port 9300
> 
> network.publish\_host 192.168.20:9300
> 
> 9301 =\> 9300 Docker container elasticsearch2 internal vlan 172.17.0.69
> 
> Elasticsearch transport running on port 9300
> 
> network.publish\_host 192.168.20:9301
> 
> So if I define machine1 / elasticsearch1 as my master, I should be able to  
> set unicast on the three other nodes as 192.168.0.10:9300, and as listed  
> above, the network.publish\_host on each node, BUT  
> Each node in its docker container does not see the address it should be  
> publishing, and it seems that this setting not only says "publish this  
> address" but also "bind to this address".
> 
> _Is there any way to publish an address which the node cannot actually  
> bind to to allow machines in this type of a constellation to connect to  
> each other?_
> 
> Thank you!  
> -Robin-

--  
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/6e13acb4-c998-4cd3-b917-516d1283dff2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6e13acb4-c998-4cd3-b917-516d1283dff2%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Robin\_Clarke](https://avatars.discourse-cdn.com/v4/letter/r/7ba0ec/32.png) [@Robin\_Clarke](https://discuss.elastic.co/u/Robin_Clarke)\
**Post date:** [November 19, 2014, 12:18pm UTC](https://discuss.elastic.co/t/network-publish-host-for-an-address-outside-a-docker-container/20812/4 "2014-11-19T12:18:49Z")

</div>

In the we used docker plugin pipework-master to create a docker interface  
mapped to an external interface, so now we have multiple nodes on a single  
docker host communicating between multiple hosts using multicast.

-Robin-

On Tuesday, 18 November 2014 23:54:00 UTC+1, Tony Su wrote:

> You need to describe any network troubleshooting steps you've tried (like  
> telnet or curl commands) that verify network connectivity to open ports  
> with an active service responding.
> 
> It might also be helpful to understand how you're doing your network  
> configuration, particularly is you're using vlans (why? Why not a simple  
> network connection?) If you're really using vlans, you might need to  
> describe how those are set up if you can't configure network connectivity  
> correctly. The issue can be, if you've really set up vlans, you might need  
> to also describe the Bridge Control Device you've created.
> 
> You might also post the Dockerfile you've built (I assume you must, to  
> incorporate your customizations) which would provide a clearer picture as  
> well as a sample "run" command complete with the switches you're using.
> 
> Tony
> 
> On Tuesday, November 18, 2014 5:38:48 AM UTC-8, Robin Clarke wrote:
> 
> > I am trying to do a setup like this:
> > 
> > machine1 - 192.168.0.10
> > 
> > 9300 =\> 9300 Docker container elasticsearch1 internal vlan 172.17.0.68
> > 
> > Elasticsearch transport running on port 9300
> > 
> > network.publish\_host 192.168.10:9300
> > 
> > 9301 =\> 9300 Docker container elasticsearch2 internal vlan 172.17.0.69
> > 
> > Elasticsearch transport running on port 9300
> > 
> > network.publish\_host 192.168.10:9301
> > 
> > machine2 - 192.168.0.20
> > 
> > 9300 =\> 9300 Docker container elasticsearch1 internal vlan 172.17.0.68
> > 
> > Elasticsearch transport running on port 9300
> > 
> > network.publish\_host 192.168.20:9300
> > 
> > 9301 =\> 9300 Docker container elasticsearch2 internal vlan 172.17.0.69
> > 
> > Elasticsearch transport running on port 9300
> > 
> > network.publish\_host 192.168.20:9301
> > 
> > So if I define machine1 / elasticsearch1 as my master, I should be able  
> > to set unicast on the three other nodes as 192.168.0.10:9300, and as  
> > listed above, the network.publish\_host on each node, BUT  
> > Each node in its docker container does not see the address it should be  
> > publishing, and it seems that this setting not only says "publish this  
> > address" but also "bind to this address".
> > 
> > _Is there any way to publish an address which the node cannot actually  
> > bind to to allow machines in this type of a constellation to connect to  
> > each other?_
> > 
> > Thank you!  
> > -Robin-

--  
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/4c0c3d5d-d416-4c82-846d-4a88a974b7e7%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4c0c3d5d-d416-4c82-846d-4a88a974b7e7%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, 12:49am UTC](https://discuss.elastic.co/t/network-publish-host-for-an-address-outside-a-docker-container/20812/5 "2017-07-06T00:49:01Z")

</div>


