hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rae Egli <re...@yahoo.com>
Subject HttpCore: CancelledKeyException
Date Fri, 05 Sep 2008 04:43:59 GMT
Has anybody run into this situation lately?  I wonder if it is a race condition as by slowing
the process down with the debugger, I can prevent it from occurring.

java.nio.channels.CancelledKeyException
 at sun.nio.ch.SelectionKeyImpl.ensureValid(Unknown Source)
 at sun.nio.ch.SelectionKeyImpl.interestOps(Unknown Source)
 at org.apache.http.impl.nio.reactor.IOSessionImpl.getEventMask(IOSessionImpl.java:95)
 at org.apache.http.impl.nio.reactor.BaseIOReactor.validate(BaseIOReactor.java:145)
 at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:147)
 at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:70)
 at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:364)
 at java.lang.Thread.run(Unknown Source)
2008/09/04 20:22:40:833 PDT [ERROR] com.rewindweb.proxy.HttpProxyNioTP - .run: connectingIOReactor.execute
incurred I/O error:I/O dispatch worker terminated abnormally
org.apache.http.nio.reactor.IOReactorException: I/O dispatch worker terminated abnormally
 at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:200)
 at com.rewindweb.proxy.HttpProxyNioTP$ConnectingIOReactorThread.run(HttpProxyNioTP.java:237)
Caused by: java.nio.channels.CancelledKeyException
 at sun.nio.ch.SelectionKeyImpl.ensureValid(Unknown Source)
 at sun.nio.ch.SelectionKeyImpl.interestOps(Unknown Source)
 at org.apache.http.impl.nio.reactor.IOSessionImpl.getEventMask(IOSessionImpl.java:95)
 at org.apache.http.impl.nio.reactor.BaseIOReactor.validate(BaseIOReactor.java:145)
 at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:147)
 at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:70)
 at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:364)
 at java.lang.Thread.run(Unknown Source)

I wonder if it is happening in a condition where the socket is closed right after receiving
a write and still issues a read event which it later cannot handle.  I will have to ignore
the exception it looks like and restart the IOReactor thread(s).

I just wanted to ask if there are any good answers for this situation out there.

Rae

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message