# ElasticSearch server 1.4.0 throws ClosedChannelException and IOException when connected using elasticsearch-head

**URL:** <https://discuss.elastic.co/t/elasticsearch-server-1-4-0-throws-closedchannelexception-and-ioexception-when-connected-using-elasticsearch-head/20799>\
**Category:** Elasticsearch\
**Created:** [November 17, 2014, 10:30pm UTC](https://discuss.elastic.co/t/elasticsearch-server-1-4-0-throws-closedchannelexception-and-ioexception-when-connected-using-elasticsearch-head/20799 "2014-11-17T22:30:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ElasticSearch\_Users\_](https://avatars.discourse-cdn.com/v4/letter/e/b4bc9f/32.png) [@ElasticSearch\_Users\_](https://discuss.elastic.co/u/ElasticSearch_Users_)\
**Post date:** [November 17, 2014, 10:30pm UTC](https://discuss.elastic.co/t/elasticsearch-server-1-4-0-throws-closedchannelexception-and-ioexception-when-connected-using-elasticsearch-head/20799/1 "2014-11-17T22:30:12Z")

</div>

Hi,

I installed ElasticSearch server on CentOS and launched. I downloaded  
elasticsearch-head using git command. When I try to connect to the  
cluster, the server throws exception:

* * *

## [root@uranus-linuxvm elasticsearch-1.4.0]# [2014-11-17 17:24:15,410][DEBUG][http.netty] [uranus-linuxvm] Caught exception while handling client http traffic, closing connection [id: 0xf3973a18, /172.25.183.134:53281 :\> /172.25.183.153:9200] java.nio.channels.ClosedChannelException at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.cleanUpWriteBuffer(AbstractNioWorker.java:405) at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.close(AbstractNioWorker.java:373) at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:93) 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:744) [2014-11-17 17:24:15,438][DEBUG][http.netty] [uranus-linuxvm] Caught exception while handling client http traffic, closing connection [id: 0xd0807271, /172.25.183.134:53282 =\> /172.25.183.153:9200] java.io.IOException: Connection reset by peer 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)

Why is channel being closed?

Any help is greatly appreciated.

Regards,  
Andy

--  
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/8a61fa3b-4bdb-490c-a8eb-11395a6bde05%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8a61fa3b-4bdb-490c-a8eb-11395a6bde05%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Jason\_Wee](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@Jason\_Wee](https://discuss.elastic.co/u/Jason_Wee)\
**Post date:** [November 18, 2014, 7:23am UTC](https://discuss.elastic.co/t/elasticsearch-server-1-4-0-throws-closedchannelexception-and-ioexception-when-connected-using-elasticsearch-head/20799/2 "2014-11-18T07:23:51Z")

</div>

could it be broken pipe like network break or timedout? the logger  
level is DEBUG,  
it should not be a concern right?

On Tue, Nov 18, 2014 at 6:30 AM, andyrobin1 via elasticsearch \<  
[elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)\> wrote:

> Hi,
> 
> I installed Elasticsearch server on CentOS and launched. I downloaded  
> elasticsearch-head using git command. When I try to connect to the  
> cluster, the server throws exception:
> 
> * * *
> 
> ## [root@uranus-linuxvm elasticsearch-1.4.0]# [2014-11-17 17:24:15,410][DEBUG][http.netty] [uranus-linuxvm] Caught exception while handling client http traffic, closing connection [id: 0xf3973a18, /172.25.183.134:53281 :\> /172.25.183.153:9200] java.nio.channels.ClosedChannelException at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.cleanUpWriteBuffer(AbstractNioWorker.java:405) at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.close(AbstractNioWorker.java:373) at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:93) 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:744) [2014-11-17 17:24:15,438][DEBUG][http.netty] [uranus-linuxvm] Caught exception while handling client http traffic, closing connection [id: 0xd0807271, /172.25.183.134:53282 =\> / 172.25.183.153:9200] java.io.IOException: Connection reset by peer 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)
> 
> Why is channel being closed?
> 
> Any help is greatly appreciated.
> 
> Regards,  
> Andy
> 
> --  
> 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/8a61fa3b-4bdb-490c-a8eb-11395a6bde05%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8a61fa3b-4bdb-490c-a8eb-11395a6bde05%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/8a61fa3b-4bdb-490c-a8eb-11395a6bde05%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8a61fa3b-4bdb-490c-a8eb-11395a6bde05%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/CAHO4itxZ84hBL%2B\_dCqqZLn\_K3fQh6NyZnTD0rBUJQ99zMK13iA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHO4itxZ84hBL%2B_dCqqZLn_K3fQh6NyZnTD0rBUJQ99zMK13iA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![lasseschou](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lasseschou/32/845_2.png) [@lasseschou](https://discuss.elastic.co/u/lasseschou)\
**Post date:** [November 18, 2014, 12:12pm UTC](https://discuss.elastic.co/t/elasticsearch-server-1-4-0-throws-closedchannelexception-and-ioexception-when-connected-using-elasticsearch-head/20799/3 "2014-11-18T12:12:13Z")

</div>

A good guess is that ES 1.4 has cross-origin resource sharing (CORS)  
disabled. Enable it, and your plugins should work again.

Lasse

On Monday, November 17, 2014 11:30:12 PM UTC+1, [andyr...@yahoo.com](mailto:andyr...@yahoo.com) wrote:

> Hi,
> 
> I installed Elasticsearch server on CentOS and launched. I downloaded  
> elasticsearch-head using git command. When I try to connect to the  
> cluster, the server throws exception:
> 
> * * *
> 
> ## [root@uranus-linuxvm elasticsearch-1.4.0]# [2014-11-17 17:24:15,410][DEBUG][http.netty] [uranus-linuxvm] Caught exception while handling client http traffic, closing connection [id: 0xf3973a18, /172.25.183.134:53281 :\> /172.25.183.153:9200] java.nio.channels.ClosedChannelException at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.cleanUpWriteBuffer(AbstractNioWorker.java:405) at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.close(AbstractNioWorker.java:373) at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:93) 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:744) [2014-11-17 17:24:15,438][DEBUG][http.netty] [uranus-linuxvm] Caught exception while handling client http traffic, closing connection [id: 0xd0807271, /172.25.183.134:53282 =\> / 172.25.183.153:9200] java.io.IOException: Connection reset by peer 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)
> 
> Why is channel being closed?
> 
> Any help is greatly appreciated.
> 
> Regards,  
> Andy

--  
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/1e0b516d-4e01-4680-aedc-30b413aea636%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/1e0b516d-4e01-4680-aedc-30b413aea636%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/elasticsearch-server-1-4-0-throws-closedchannelexception-and-ioexception-when-connected-using-elasticsearch-head/20799/4 "2017-07-06T00:49:15Z")

</div>


