On Fri, 2010-06-11 at 11:33 +0100, Sam Crawford wrote:
> Morning,
> 
> We've just put together our first HttpCore-based server and we're
> intermittently seeing an exception in our logs which is causing the
> entire server to shutdown.
> 
> INFO com.acmecorp.proj.http.HttpSSLServer: Connection open:
> [rl143.1blu.de/82.98.78.94:40892]
> ERROR com.acmecorp.proj.http.HttpSSLServer: I/O error
> 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 com.acmecorp.proj.http.HttpSSLServer$1.run(HttpSSLServer.java:162)
> Caused by: java.lang.NullPointerException
>         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.SSLServerIOEventDispatch.inputReady(SSLServerIOEventDispatch.java:225)
>         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)
>         at java.lang.Thread.run(Thread.java:619)
> INFO com.acmecorp.proj.http.HttpSSLServer: Shutdown HTTP server
> 
> Can you advise if this is related to the item discussed in
> http://hc.apache.org/httpcomponents-core-4.0.1/tutorial/html/nio.html#d0e1240,
> or is it likely to be an unrelated issue with our code? The NPE
> suggests to me that it's more likely to be our code.
> 
> Thanks,
> 
> Sam
> 

NPE is thrown because the consuming entity is null, which should never
be the case for entity enclosing requests, so this is likely to be a bug
in AsyncNHttpServiceHandler.

Could you please try to put together a test case that reproduces the
problem?

You may also want to take a look at the logging extensions in the
contrib package that generally make debugging somewhat easier

http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/httpcore-contrib/src/main/java/org/apache/http/contrib/logging/

One indeed can work this problem around by preventing the I/O reactor
form shutting itself down in case of a runtime exception. We should
however rather try to find out why NPE is thrown in the first place.

Oleg  



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to