hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Leigh <james-nos...@leighnet.ca>
Subject I/O dispatch worker terminated abnormally
Date Sun, 07 Aug 2011 18:05:59 GMT
Hi hc,

We have been developing with httpcore for almost 18 months and have been
really happy with it. However, as we push to have more public facing Web
server running httpcore we are concerned about abnormal client
behaviour.

In the unusual event that an IOReactor throws an exception how can we
have the current connection closed without affecting the rest of the
server?

This can happen in an SSL connection, when the server does not have the
algorithm used by the client or the client does not follow the
specification properly. It can also happen in unencrypted connections
when something unexplained happens with the buffers, like the stack
trace below.

I know that an IOReactorExceptionHandler can be used to distinguish
between fatal and ignorable exceptions. However, fatal exceptions
(re-thrown) seem to hang the server and ignored exceptions don't closed
the connection (so says the javadoc).

What is the best way to indicate that the TCP connection should be
closed (not the IOReactor) on unexpected exceptions?

Thanks,
James

--
org.apache.http.nio.reactor.IOReactorException: I/O dispatch worker terminated abnormally
        at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:326)
        at org.openrdf.http.object.HTTPObjectServer$4.run(HTTPObjectServer.java:386)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalArgumentException
        at java.nio.Buffer.limit(Buffer.java:249)
        at org.apache.http.impl.nio.codecs.LengthDelimitedDecoder.read(LengthDelimitedDecoder.java:95)
        at org.openrdf.http.object.util.ReadableContentListener.contentAvailable(ReadableContentListener.java:140)
        at org.apache.http.nio.entity.ConsumingNHttpEntityTemplate.consumeContent(ConsumingNHttpEntityTemplate.java:94)
        at org.apache.http.nio.protocol.AsyncNHttpServiceHandler.inputReady(AsyncNHttpServiceHandler.java:317)
        at org.apache.http.impl.nio.DefaultNHttpServerConnection.consumeInput(DefaultNHttpServerConnection.java:179)
        at org.apache.http.impl.nio.DefaultServerIOEventDispatch.inputReady(DefaultServerIOEventDispatch.java:145)
        at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:153)
        at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:314)
        at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:294)
        at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:256)
        at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:96)
        at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:556)




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message