# ES trying to connect to itself

**URL:** <https://discuss.elastic.co/t/es-trying-to-connect-to-itself/18403>\
**Category:** Elasticsearch\
**Created:** [June 30, 2014, 6:41pm UTC](https://discuss.elastic.co/t/es-trying-to-connect-to-itself/18403 "2014-06-30T18:41:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pskieu](https://avatars.discourse-cdn.com/v4/letter/p/ecccb3/32.png) [@pskieu](https://discuss.elastic.co/u/pskieu)\
**Post date:** [June 30, 2014, 6:41pm UTC](https://discuss.elastic.co/t/es-trying-to-connect-to-itself/18403/1 "2014-06-30T18:41:37Z")

</div>

I'm running a docker container with ES in it. The cluster works fine but I  
keep getting warning messages about it trying to connect to itself.

[2014-06-30 18:26:21,105][WARN][cluster.service] [ES01] failed  
to reconnect to node  
[ES01][miTCM9-BQwmhlL4mk7EX1w][fb06cbd6bd18][inet[es-host1/137.78.110.131:9300]]  
org.elasticsearch.transport.ConnectTransportException:  
[ES01][inet[es-host1/137.78.110.131: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(ThreadPoolExecutor.java:1145)  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)  
at java.lang.Thread.run(Thread.java:744)  
Caused by: java.net.ConnectException: Connection refused:  
es-host1/137.78.110.131:9300  
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)  
at  
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)  
at  
org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:150)  
at  
org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105)  
at  
org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79)  
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

Settings are:

network.bind\_host to default  
network.publish\_host: 137.78.110.131

I'm not setting network.host to the IP since there's some NAT happening.

--  
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/4f2444b9-e810-4d62-8b0c-070717ec7495%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4f2444b9-e810-4d62-8b0c-070717ec7495%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![David\_Klotz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david_klotz/32/855_2.png) [@David\_Klotz](https://discuss.elastic.co/u/David_Klotz)\
**Post date:** [February 24, 2015, 2:49pm UTC](https://discuss.elastic.co/t/es-trying-to-connect-to-itself/18403/2 "2015-02-24T14:49:29Z")

</div>

Hi,

we're seeing the same errors in our log (our nodes are running inside  
docker containers, with network.publish\_host set to the public IP of the  
host machine). Did you ever find a workaround for this?

Or does anyone else know what to do in this case?

Cheers,  
David

On Monday, June 30, 2014 at 8:41:37 PM UTC+2, [psk...@gmail.com](mailto:psk...@gmail.com) wrote:

> I'm running a docker container with ES in it. The cluster works fine but I  
> keep getting warning messages about it trying to connect to itself.
> 
> [2014-06-30 18:26:21,105][WARN][cluster.service] [ES01] failed  
> to reconnect to node  
> [ES01][miTCM9-BQwmhlL4mk7EX1w][fb06cbd6bd18][inet[es-host1/  
> 137.78.110.131:9300]]  
> org.elasticsearch.transport.ConnectTransportException:  
> [ES01][inet[es-host1/137.78.110.131: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(ThreadPoolExecutor.java:1145)  
> at  
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)  
> at java.lang.Thread.run(Thread.java:744)  
> Caused by: java.net.ConnectException: Connection refused: es-host1/  
> 137.78.110.131:9300  
> at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)  
> at  
> sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)  
> at  
> org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:150)  
> at  
> org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105)  
> at  
> org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79)  
> 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
> 
> Settings are:
> 
> network.bind\_host to default  
> network.publish\_host: 137.78.110.131
> 
> I'm not setting network.host to the IP since there's some NAT happening.

--  
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/d45d08af-b7b6-4a3e-8779-09774a1b1d1e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d45d08af-b7b6-4a3e-8779-09774a1b1d1e%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [February 24, 2015, 3:45pm UTC](https://discuss.elastic.co/t/es-trying-to-connect-to-itself/18403/3 "2015-02-24T15:45:13Z")

</div>

Are you sure the IP 137.78.110.131 is configured correctly on the server  
NIC?

Jörg

On Tue, Feb 24, 2015 at 3:49 PM, David Klotz [david.klotz@fileee.com](mailto:david.klotz@fileee.com) wrote:

> Hi,
> 
> we're seeing the same errors in our log (our nodes are running inside  
> docker containers, with network.publish\_host set to the public IP of the  
> host machine). Did you ever find a workaround for this?
> 
> Or does anyone else know what to do in this case?
> 
> Cheers,  
> David
> 
> On Monday, June 30, 2014 at 8:41:37 PM UTC+2, [psk...@gmail.com](mailto:psk...@gmail.com) wrote:
> 
> > I'm running a docker container with ES in it. The cluster works fine but  
> > I keep getting warning messages about it trying to connect to itself.
> > 
> > [2014-06-30 18:26:21,105][WARN][cluster.service] [ES01] failed  
> > to reconnect to node [ES01][miTCM9-BQwmhlL4mk7EX1w]  
> > [fb06cbd6bd18][inet[es-host1/137.78.110.131:9300]]  
> > org.elasticsearch.transport.ConnectTransportException:  
> > [ES01][inet[es-host1/137.78.110.131: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(  
> > ThreadPoolExecutor.java:1145)  
> > at java.util.concurrent.ThreadPoolExecutor$Worker.run(  
> > ThreadPoolExecutor.java:615)  
> > at java.lang.Thread.run(Thread.java:744)  
> > Caused by: java.net.ConnectException: Connection refused: es-host1/  
> > 137.78.110.131:9300  
> > at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)  
> > at sun.nio.ch.SocketChannelImpl.finishConnect(  
> > SocketChannelImpl.java:739)  
> > at org.elasticsearch.common.netty.channel.socket.nio.  
> > NioClientBoss.connect(NioClientBoss.java:150)  
> > at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.  
> > processSelectedKeys(NioClientBoss.java:105)  
> > at org.elasticsearch.common.netty.channel.socket.nio.  
> > NioClientBoss.process(NioClientBoss.java:79)  
> > 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
> > 
> > Settings are:
> > 
> > network.bind\_host to default  
> > network.publish\_host: 137.78.110.131
> > 
> > I'm not setting network.host to the IP since there's some NAT happening.
> 
> --  
> 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/d45d08af-b7b6-4a3e-8779-09774a1b1d1e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d45d08af-b7b6-4a3e-8779-09774a1b1d1e%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/d45d08af-b7b6-4a3e-8779-09774a1b1d1e%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/d45d08af-b7b6-4a3e-8779-09774a1b1d1e%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/CAKdsXoGXVEc%3D\_1D4OTxLz\_evSna3xcVs\_agMc8pH5ZfLvR2YdA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGXVEc%3D_1D4OTxLz_evSna3xcVs_agMc8pH5ZfLvR2YdA%40mail.gmail.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:30am UTC](https://discuss.elastic.co/t/es-trying-to-connect-to-itself/18403/4 "2017-07-06T00:30:28Z")

</div>


