hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rae Egli <re...@yahoo.com>
Subject Re: HttpCore: CancelledKeyException
Date Sat, 06 Sep 2008 23:20:04 GMT
Oleg,
 
Thanks very much.  That fixed it.
 
Rae



----- Original Message ----
From: Oleg Kalnichevski <olegk@apache.org>
To: HttpComponents Project <dev@hc.apache.org>
Sent: Saturday, September 6, 2008 5:01:46 AM
Subject: Re: HttpCore: CancelledKeyException

On Thu, 2008-09-04 at 21:43 -0700, Rae Egli wrote:
> 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

Rae,

I fixed the problem in the SVN trunk. Please pull the latest code
snapshot off the trunk and retest your application.

Cheers

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message