# Problem setting up cluster with NAT address

**URL:** <https://discuss.elastic.co/t/problem-setting-up-cluster-with-nat-address/18152>\
**Category:** Elasticsearch\
**Created:** [June 17, 2014, 12:17pm UTC](https://discuss.elastic.co/t/problem-setting-up-cluster-with-nat-address/18152 "2014-06-17T12:17:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pmartins](https://avatars.discourse-cdn.com/v4/letter/p/7ea924/32.png) [@pmartins](https://discuss.elastic.co/u/pmartins)\
**Post date:** [June 17, 2014, 12:17pm UTC](https://discuss.elastic.co/t/problem-setting-up-cluster-with-nat-address/18152/1 "2014-06-17T12:17:14Z")

</div>

Hi,

I'm having some problems setting up a 1.2.1 ES cluster. I have two nodes, each one in a different data center/network.

One of the nodes is behind a NAT address, so I set network.publish\_host to de NAT address.

Both nodes connect to each other without problems. The issue is when the node behind the NAT address tries to connect to himself. In my network, he doesn't know his NAT address and can't solve it. So I get the exception:

[2014-06-17 12:58:19,681][WARN][cluster.service] [vm-motisqaapp02] failed to reconnect to node [vm-motisqaapp02][4oSfsIaBTSyQWdnxiTt7Cw][vm-motisqaapp02.\*\*\*][inet[/10.10.1.135:9300]]{master=true}  
org.elasticsearch.transport.ConnectTransportException: [vm-motisqaapp02][inet[/10.10.1.135:9300]] connect\_timeout[30s]  
at org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:727)  
at org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:656)  
at org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:624)  
at org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:146)  
at org.elasticsearch.cluster.service.InternalClusterService$ReconnectToNodes.run(InternalClusterService.java:518)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)  
at java.lang.Thread.run(Unknown Source)  
Caused by: org.elasticsearch.common.netty.channel.ConnectTimeoutException: connection timed out: /10.10.1.135:9300  
at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.processConnectTimeout(NioClientBoss.java:137)  
at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:83)  
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318)  
at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42)  
at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)  
at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)  
... 3 more

vm-motisqaapp02 NAT address is 10.10.1.135, but locally it can't solve this address. Is there any way that I can setup other IP to comunicate locally?

---

<div class="post-metadata">

**Author:** ![pmartins](https://avatars.discourse-cdn.com/v4/letter/p/7ea924/32.png) [@pmartins](https://discuss.elastic.co/u/pmartins)\
**Post date:** [June 17, 2014, 2:12pm UTC](https://discuss.elastic.co/t/problem-setting-up-cluster-with-nat-address/18152/3 "2014-06-17T14:12:36Z")

</div>

Hi,

Thanks for the reply.

The firewall on the node is off, and he can't comunicate with himself. The problem is:

vm-motisqaapp02 has the local address 172.16.3.81 with the NAT 10.10.1.135. But, with the current data center definitions, it can't solve the 10.10.1.135 doesn't recognizing itself.

Can I configure different adresses for network.publish host ? One for comunicating with outside nodes and another with itself?

---

<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:** [June 17, 2014, 11:26pm UTC](https://discuss.elastic.co/t/problem-setting-up-cluster-with-nat-address/18152/4 "2014-06-17T23:26:57Z")

</div>

You can only define one address for ES to use.

Regards,  
Mark Walkom

Infrastructure Engineer  
Campaign Monitor  
email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
web: [www.campaignmonitor.com](http://www.campaignmonitor.com)

On 18 June 2014 00:12, pmartins [pedro.martins@spms.min-saude.pt](mailto:pedro.martins@spms.min-saude.pt) wrote:

> Hi,
> 
> Thanks for the reply.
> 
> The firewall on the node is off, and he can't comunicate with himself. The  
> problem is:
> 
> vm-motisqaapp02 has the local address 172.16.3.81 with the NAT 10.10.1.135.  
> But, with the current data center definitions, it can't solve the  
> 10.10.1.135 doesn't recognizing itself.
> 
> Can I configure different adresses for network.publish host ? One for  
> comunicating with outside nodes and another with itself?
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/Problem-setting-up-cluster-with-NAT-address-tp4057849p4057867.html](http://elasticsearch-users.115913.n3.nabble.com/Problem-setting-up-cluster-with-NAT-address-tp4057849p4057867.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> 
> --  
> 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/1403014356232-4057867.post%40n3.nabble.com](https://groups.google.com/d/msgid/elasticsearch/1403014356232-4057867.post%40n3.nabble.com)  
> .  
> 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/CAEM624Yt\_\_EfwsqM%2B4k8goMCdwCnwZ21RQjF4C%2BuAzNZrYnnHw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624Yt__EfwsqM%2B4k8goMCdwCnwZ21RQjF4C%2BuAzNZrYnnHw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![pmartins](https://avatars.discourse-cdn.com/v4/letter/p/7ea924/32.png) [@pmartins](https://discuss.elastic.co/u/pmartins)\
**Post date:** [June 18, 2014, 9:25am UTC](https://discuss.elastic.co/t/problem-setting-up-cluster-with-nat-address/18152/5 "2014-06-18T09:25:31Z")

</div>

So, just to be clear:

If we have a ES cluster in two different networks and a node doesn't "know" his foreign address (NAT), there's no way to configure the transport layer on cluster to comunicate without problems?

Thank you for your answers.

---

<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:** [June 18, 2014, 9:27am UTC](https://discuss.elastic.co/t/problem-setting-up-cluster-with-nat-address/18152/6 "2014-06-18T09:27:32Z")

</div>

No, that's outside the scope of ES to understand.

Regards,  
Mark Walkom

Infrastructure Engineer  
Campaign Monitor  
email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
web: [www.campaignmonitor.com](http://www.campaignmonitor.com)

On 18 June 2014 19:25, pmartins [pedro.martins@spms.min-saude.pt](mailto:pedro.martins@spms.min-saude.pt) wrote:

> So, just to be clear:
> 
> If we have a ES cluster in two different networks and a node doesn't "know"  
> his foreign address (NAT), there's no way to configure the transport layer  
> on cluster to comunicate without problems?
> 
> Thank you for your answers.
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/Problem-setting-up-cluster-with-NAT-address-tp4057849p4057921.html](http://elasticsearch-users.115913.n3.nabble.com/Problem-setting-up-cluster-with-NAT-address-tp4057849p4057921.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> 
> --  
> 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/1403083531235-4057921.post%40n3.nabble.com](https://groups.google.com/d/msgid/elasticsearch/1403083531235-4057921.post%40n3.nabble.com)  
> .  
> 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/CAEM624bfj-XW7BW8q3%3DrM2aWQt%2B5nA0GZDSoGhe9-Ly6tbdYCw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624bfj-XW7BW8q3%3DrM2aWQt%2B5nA0GZDSoGhe9-Ly6tbdYCw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![pmartins](https://avatars.discourse-cdn.com/v4/letter/p/7ea924/32.png) [@pmartins](https://discuss.elastic.co/u/pmartins)\
**Post date:** [June 18, 2014, 12:05pm UTC](https://discuss.elastic.co/t/problem-setting-up-cluster-with-nat-address/18152/7 "2014-06-18T12:05:45Z")

</div>

OK, that means that ES clusters don't work with nodes in different networks, when at least one of them has a NAT address to comunicate with the other, right?

If so, I need to change the architecture of my solution.

Thank you for all the help

---

<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:21am UTC](https://discuss.elastic.co/t/problem-setting-up-cluster-with-nat-address/18152/8 "2017-07-06T01:21:33Z")

</div>


