# Caught exception while handling client http traffic, closing connection

**URL:** <https://discuss.elastic.co/t/caught-exception-while-handling-client-http-traffic-closing-connection/10162>\
**Category:** Elasticsearch\
**Created:** [December 24, 2012, 12:34am UTC](https://discuss.elastic.co/t/caught-exception-while-handling-client-http-traffic-closing-connection/10162 "2012-12-24T00:34:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![effektz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/effektz/32/2567_2.png) [@effektz](https://discuss.elastic.co/u/effektz)\
**Post date:** [December 24, 2012, 12:34am UTC](https://discuss.elastic.co/t/caught-exception-while-handling-client-http-traffic-closing-connection/10162/1 "2012-12-24T00:34:18Z")

</div>

Running into an issue on elastic. Right now elastic is not returning  
anything, and this is the only thing that keeps being output to the log  
file:

[2012-12-23 16:30:29,270][WARN][http.netty] [Lykos, Karl]  
Caught exception while handling client http traffic, closing connection  
[id: 0x4c97a006, /172.16.225.14:57157 =\> /172.16.225.22:9200]  
java.net.SocketException: Connection reset  
at java.net.SocketInputStream.read(SocketInputStream.java:185)  
at java.net.SocketInputStream.read(SocketInputStream.java:199)  
at java.io.FilterInputStream.read(FilterInputStream.java:83)  
at java.io.PushbackInputStream.read(PushbackInputStream.java:139)  
at  
org.elasticsearch.common.netty.channel.socket.oio.OioWorker.process(OioWorker.java:65)  
at  
org.elasticsearch.common.netty.channel.socket.oio.AbstractOioWorker.run(AbstractOioWorker.java:75)  
at  
org.elasticsearch.common.netty.channel.socket.oio.OioWorker.run(OioWorker.java:52)  
at  
org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:102)  
at  
org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)  
at  
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)  
at java.lang.Thread.run(Thread.java:636)

Any ideas on what is happening here?

--

---

<div class="post-metadata">

**Author:** ![effektz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/effektz/32/2567_2.png) [@effektz](https://discuss.elastic.co/u/effektz)\
**Post date:** [December 24, 2012, 1:46am UTC](https://discuss.elastic.co/t/caught-exception-while-handling-client-http-traffic-closing-connection/10162/2 "2012-12-24T01:46:31Z")

</div>

Update: I tried getting it out of an UNASSIGNED state with no luck

When I try to do a simple count on an index, I get this:  
{"count":0,"\_shards":"total":1,"successful":0,"failed":1,"failures  
":[{"index":"wm\_index","shard":0,"reason":"BroadcastShardOperationFailedExc  
eption[[wm\_index][0] No active shard(s)]"}]}}

And this is what I get when I curl :9200/\_cluster/health:  
{"cluster\_name":"elasticsearch","status":"red","timed\_out":false,"number\_of\_nodes":1,"number\_of\_data\_nodes":1,"active\_primary\_shards":0,"active\_shards":0,"relocating\_shards":0,"initializing\_shards":0,"unassigned\_shards":1}

curl -XPOST 'localhost:9200/\_cluster/reroute' -d '{  
"commands" : [  
{"allocate" : {"index" : "wm\_index", "shard" : 0, "node" :  
"XKYnqpKeSaG87fHixwyeVQ", "allow\_primary" : "true"}}  
]  
}'

--

---

<div class="post-metadata">

**Author:** ![effektz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/effektz/32/2567_2.png) [@effektz](https://discuss.elastic.co/u/effektz)\
**Post date:** [December 24, 2012, 1:51am UTC](https://discuss.elastic.co/t/caught-exception-while-handling-client-http-traffic-closing-connection/10162/3 "2012-12-24T01:51:15Z")

</div>

A little more on my index:

index.number\_of\_shards: 1  
index.number\_of\_replicas: 0

--

---

<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:** [December 24, 2012, 10:51am UTC](https://discuss.elastic.co/t/caught-exception-while-handling-client-http-traffic-closing-connection/10162/4 "2012-12-24T10:51:21Z")

</div>

You have a cluster state of "red". There are many reasons.

The exception you show tells us, a client aborted the connection, it is  
probably not related to the cause.

Does a node restart help?

Jörg

--

---

<div class="post-metadata">

**Author:** ![ZillaG](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zillag/32/10505_2.png) [@ZillaG](https://discuss.elastic.co/u/ZillaG)\
**Post date:** [October 5, 2016, 10:10pm UTC](https://discuss.elastic.co/t/caught-exception-while-handling-client-http-traffic-closing-connection/10162/5 "2016-10-05T22:10:46Z")

</div>

I'm also getting this exception, with v2.4.1. Any resolution to this? Here's my stack trace. Right now I don't have anything running except Elasticsearch.

```
[2016-10-05 22:22:03,995][WARN][http.netty] [Hulk] Caught exception while handling client http traffic, closing connection [id: 0xb398933b, /127.0.0.1:51466 :> /127.0.0.1:9200]
java.lang.IllegalArgumentException: invalid version format: ﾏ~
                                                              ￉￁ﾋﾹ
	at org.jboss.netty.handler.codec.http.HttpVersion.<init>(HttpVersion.java:94)
	at org.jboss.netty.handler.codec.http.HttpVersion.valueOf(HttpVersion.java:62)
	at org.jboss.netty.handler.codec.http.HttpRequestDecoder.createMessage(HttpRequestDecoder.java:75)
	at org.jboss.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:191)
	at org.jboss.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:102)
	at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:500)
	at org.jboss.netty.handler.codec.replay.ReplayingDecoder.cleanup(ReplayingDecoder.java:554)
	at org.jboss.netty.handler.codec.frame.FrameDecoder.channelDisconnected(FrameDecoder.java:365)
```

---

<div class="post-metadata">

**Author:** ![venkaty](https://avatars.discourse-cdn.com/v4/letter/v/919ad9/32.png) [@venkaty](https://discuss.elastic.co/u/venkaty)\
**Post date:** [October 14, 2016, 9:27am UTC](https://discuss.elastic.co/t/caught-exception-while-handling-client-http-traffic-closing-connection/10162/6 "2016-10-14T09:27:49Z")

</div>

I'm also getting this exception, with v2.1.0. Any resolution to this?

---

<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 5, 2017, 10:12pm UTC](https://discuss.elastic.co/t/caught-exception-while-handling-client-http-traffic-closing-connection/10162/7 "2017-07-05T22:12:20Z")

</div>


