# Java.io.IOException: Connection timed out error

**URL:** <https://discuss.elastic.co/t/java-io-ioexception-connection-timed-out-error/22672>\
**Category:** Elasticsearch\
**Created:** [March 15, 2015, 5:27pm UTC](https://discuss.elastic.co/t/java-io-ioexception-connection-timed-out-error/22672 "2015-03-15T17:27:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sunil\_patil](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@sunil\_patil](https://discuss.elastic.co/u/sunil_patil)\
**Post date:** [March 15, 2015, 5:27pm UTC](https://discuss.elastic.co/t/java-io-ioexception-connection-timed-out-error/22672/1 "2015-03-15T17:27:40Z")

</div>

I using ElasticSearch 1.1.0 server. I have a Java Web Application that  
connects to ElasticSearch using Transport Client, i am also using  
elasticsearch 1.1.0 client. When the application starts it is able to  
connect to elasticsearch server and all the searches work but after every  
couple of hours(This happens randomly) the application stops working/not  
able to execute search on elasticsearch. When i enable client transport and  
netty transport trace i see following exception. Has anyone seen this issue  
before, do you have any suggestions ?

[2015-Mar-14 18:37:56:647] TRACE [Gertrude Yorkes] close connection exception  
caught on transport layer [[id: 0x08525d42, /172.26.129.121:51561 =\>  
[p01sml002.aap.csaa.com/172.29.24.69:9300](http://p01sml002.aap.csaa.com/172.29.24.69:9300)]], disconnecting from relevant  
node  
java.io.IOException: Connection timed out  
at sun.nio.ch.FileDispatcherImpl.read0(Native Method)  
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)  
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)  
at sun.nio.ch.IOUtil.read(IOUtil.java:192)  
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:379)  
at  
org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:64)  
at  
org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)  
at  
org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318)  
at  
org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)  
at  
org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)  
at  
org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)  
at  
org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)  
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:745)  
[2015-Mar-14 18:37:56:647] TRACE [Gertrude Yorkes] close connection exception  
caught on transport layer [[id: 0x08525d42, /172.26.129.121:51561 =\>  
[p01sml002.aap.csaa.com/172.29.24.69:9300](http://p01sml002.aap.csaa.com/172.29.24.69:9300)]], disconnecting from relevant  
node  
java.io.IOException: Connection timed out  
at sun.nio.ch.FileDispatcherImpl.read0(Native Method)  
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)  
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)  
at sun.nio.ch.IOUtil.read(IOUtil.java:192)  
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:379)  
at  
org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:64)  
at  
org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)  
at  
org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318)  
at  
org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)  
at  
org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)  
at  
org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)  
at  
org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)  
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:745)

--  
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/67012934-7735-468d-a3a0-9cd5d674307a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/67012934-7735-468d-a3a0-9cd5d674307a%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:** [March 15, 2015, 8:37pm UTC](https://discuss.elastic.co/t/java-io-ioexception-connection-timed-out-error/22672/2 "2015-03-15T20:37:44Z")

</div>

I am guessing that is the client log, but what does your ES node show?

On 15 March 2015 at 10:27, sunil patil [sdpatil@gmail.com](mailto:sdpatil@gmail.com) wrote:

> I using Elasticsearch 1.1.0 server. I have a Java Web Application that  
> connects to Elasticsearch using Transport Client, i am also using  
> elasticsearch 1.1.0 client. When the application starts it is able to  
> connect to elasticsearch server and all the searches work but after every  
> couple of hours(This happens randomly) the application stops working/not  
> able to execute search on elasticsearch. When i enable client transport and  
> netty transport trace i see following exception. Has anyone seen this issue  
> before, do you have any suggestions ?
> 
> [2015-Mar-14 18:37:56:647] TRACE [Gertrude Yorkes] close connection exception  
> caught on transport layer [[id: 0x08525d42, /172.26.129.121:51561 =\>  
> [p01sml002.aap.csaa.com/172.29.24.69:9300](http://p01sml002.aap.csaa.com/172.29.24.69:9300)]  
> [http://p01sml002.aap.csaa.com/172.29.24.69:9300]](http://p01sml002.aap.csaa.com/172.29.24.69:9300%5D)], disconnecting from  
> relevant node  
> java.io.IOException: Connection timed out  
> at sun.nio.ch.FileDispatcherImpl.read0(Native Method)  
> at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)  
> at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)  
> at sun.nio.ch.IOUtil.read(IOUtil.java:192)  
> at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:379)  
> at  
> org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:64)  
> at  
> org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)  
> at  
> org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318)  
> at  
> org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)  
> at  
> org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)  
> at  
> org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)  
> at  
> org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)  
> 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:745)  
> [2015-Mar-14 18:37:56:647] TRACE [Gertrude Yorkes] close connection exception  
> caught on transport layer [[id: 0x08525d42, /172.26.129.121:51561 =\>  
> [p01sml002.aap.csaa.com/172.29.24.69:9300](http://p01sml002.aap.csaa.com/172.29.24.69:9300)]  
> [http://p01sml002.aap.csaa.com/172.29.24.69:9300]](http://p01sml002.aap.csaa.com/172.29.24.69:9300%5D)], disconnecting from  
> relevant node  
> java.io.IOException: Connection timed out  
> at sun.nio.ch.FileDispatcherImpl.read0(Native Method)  
> at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)  
> at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)  
> at sun.nio.ch.IOUtil.read(IOUtil.java:192)  
> at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:379)  
> at  
> org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:64)  
> at  
> org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)  
> at  
> org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318)  
> at  
> org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)  
> at  
> org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)  
> at  
> org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)  
> at  
> org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)  
> 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:745)
> 
> --  
> 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/67012934-7735-468d-a3a0-9cd5d674307a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/67012934-7735-468d-a3a0-9cd5d674307a%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/67012934-7735-468d-a3a0-9cd5d674307a%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/67012934-7735-468d-a3a0-9cd5d674307a%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/CAEYi1X8KpMyB4FAUg4MS4Tv53K%2BXSS%3D9HHEW7ZLZ%3DppyEdhUyQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X8KpMyB4FAUg4MS4Tv53K%2BXSS%3D9HHEW7ZLZ%3DppyEdhUyQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![sunil\_patil](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@sunil\_patil](https://discuss.elastic.co/u/sunil_patil)\
**Post date:** [March 15, 2015, 11:12pm UTC](https://discuss.elastic.co/t/java-io-ioexception-connection-timed-out-error/22672/3 "2015-03-15T23:12:20Z")

</div>

Hi Mark,

The ES Server both master and data node logs are clean, i dont see any  
exceptions.

Sunil

On Sunday, March 15, 2015 at 1:38:26 PM UTC-7, Mark Walkom wrote:

> I am guessing that is the client log, but what does your ES node show?
> 
> On 15 March 2015 at 10:27, sunil patil \<[sdp...@gmail.com](mailto:sdp...@gmail.com) \<javascript:\>\>  
> wrote:
> 
> > I using Elasticsearch 1.1.0 server. I have a Java Web Application that  
> > connects to Elasticsearch using Transport Client, i am also using  
> > elasticsearch 1.1.0 client. When the application starts it is able to  
> > connect to elasticsearch server and all the searches work but after  
> > every couple of hours(This happens randomly) the application stops  
> > working/not able to execute search on elasticsearch. When i enable client  
> > transport and netty transport trace i see following exception. Has anyone  
> > seen this issue before, do you have any suggestions ?
> > 
> > [2015-Mar-14 18:37:56:647] TRACE [Gertrude Yorkes] close connection exception  
> > caught on transport layer [[id: 0x08525d42, /172.26.129.121:51561 =\>  
> > [p01sml002.aap.csaa.com/172.29.24.69:9300](http://p01sml002.aap.csaa.com/172.29.24.69:9300)]  
> > [http://p01sml002.aap.csaa.com/172.29.24.69:9300]](http://p01sml002.aap.csaa.com/172.29.24.69:9300%5D)], disconnecting  
> > from relevant node  
> > java.io.IOException: Connection timed out  
> > at sun.nio.ch.FileDispatcherImpl.read0(Native Method)  
> > at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)  
> > at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)  
> > at sun.nio.ch.IOUtil.read(IOUtil.java:192)  
> > at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:379)  
> > at  
> > org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:64)  
> > at  
> > org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)  
> > at  
> > org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318)  
> > at  
> > org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)  
> > at  
> > org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)  
> > at  
> > org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)  
> > at  
> > org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)  
> > 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:745)  
> > [2015-Mar-14 18:37:56:647] TRACE [Gertrude Yorkes] close connection exception  
> > caught on transport layer [[id: 0x08525d42, /172.26.129.121:51561 =\>  
> > [p01sml002.aap.csaa.com/172.29.24.69:9300](http://p01sml002.aap.csaa.com/172.29.24.69:9300)]  
> > [http://p01sml002.aap.csaa.com/172.29.24.69:9300]](http://p01sml002.aap.csaa.com/172.29.24.69:9300%5D)], disconnecting  
> > from relevant node  
> > java.io.IOException: Connection timed out  
> > at sun.nio.ch.FileDispatcherImpl.read0(Native Method)  
> > at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)  
> > at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)  
> > at sun.nio.ch.IOUtil.read(IOUtil.java:192)  
> > at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:379)  
> > at  
> > org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:64)  
> > at  
> > org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)  
> > at  
> > org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318)  
> > at  
> > org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)  
> > at  
> > org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)  
> > at  
> > org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)  
> > at  
> > org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)  
> > 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:745)
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/67012934-7735-468d-a3a0-9cd5d674307a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/67012934-7735-468d-a3a0-9cd5d674307a%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/67012934-7735-468d-a3a0-9cd5d674307a%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/67012934-7735-468d-a3a0-9cd5d674307a%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/cc6fb9c5-27da-41c7-8a93-25a7d9aedb09%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/cc6fb9c5-27da-41c7-8a93-25a7d9aedb09%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:26am UTC](https://discuss.elastic.co/t/java-io-ioexception-connection-timed-out-error/22672/4 "2017-07-06T00:26:39Z")

</div>


