"java.lang.IllegalStateException: Can not fail" problem
"Trustin Lee (이희승)"
trustin at gmail.com
Sun Jun 6 22:55:52 EDT 2010
Hi Uri,
I think you are using an older version. Could you please try the latest
release? Upgrade to this JAR and recompile your application:
https://repository.jboss.org/nexus/content/groups/public/org/jboss/netty/netty/3.2.0.Final/
Thanks,
Trustin
scheiner wrote:
> Hi All,
>
> I have the following problem, that I hope you can help me to resolve:
>
> I am using netty and some of my connections use secure (TLS) connection.
>
> For some reason, it looks like that some of the machines, when closing the
> connection, throws the following exception:
>
> 2010-06-03 16:02:35,767 [Hashed wheel timer #2] DEBUG (Log4JLogger.java:43)
> - [id: 0x00214f6b, /10.248.74.160:52342 => /10.195.97.219:6600] EXCEPTION:
> java.lang.IllegalStateException: Can not fail
> java.lang.IllegalStateException: Can not fail
> at
> org.jboss.netty.channel.UnfailingChannelFuture.setFailure(UnfailingChannelFuture.java:44)
> at
> org.jboss.netty.channel.socket.nio.NioWorker.close(NioWorker.java:595)
> at
> org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:91)
> at org.jboss.netty.channel.Channels.close(Channels.java:1081)
> at
> org.jboss.netty.handler.ssl.SslHandler$ClosingChannelFutureListener.operationComplete(SslHandler.java:915)
> at
> org.jboss.netty.channel.DefaultChannelFuture.notifyListener(DefaultChannelFuture.java:366)
> at
> org.jboss.netty.channel.DefaultChannelFuture.addListener(DefaultChannelFuture.java:139)
> at
> org.jboss.netty.handler.ssl.SslHandler.closeOutboundAndChannel(SslHandler.java:883)
> at
> org.jboss.netty.handler.ssl.SslHandler.handleDownstream(SslHandler.java:348)
> at
> org.jboss.netty.handler.logging.LoggingHandler.handleDownstream(LoggingHandler.java:237)
> at
> org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:59)
> at
> org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:59)
> at org.jboss.netty.channel.Channels.close(Channels.java:1065)
> at
> org.jboss.netty.channel.AbstractChannel.close(AbstractChannel.java:178)
> at
> com.nolio.nimi.comm.impl.NimiConnectionImpl.close(NimiConnectionImpl.java:109)
> at
> com.nolio.nimi.comm.impl.nettysupport.BasicHandler.closeChannel(BasicHandler.java:70)
> at
> com.nolio.nimi.comm.impl.nettysupport.BasicHandler.channelIdle(BasicHandler.java:111)
> at
> org.jboss.netty.handler.timeout.IdleStateAwareChannelUpstreamHandler.handleUpstream(IdleStateAwareChannelUpstreamHandler.java:46)
> at
> org.jboss.netty.handler.timeout.IdleStateHandler.channelIdle(IdleStateHandler.java:285)
> at
> org.jboss.netty.handler.timeout.IdleStateHandler$AllIdleTimeoutTask.run(IdleStateHandler.java:377)
> at
> org.jboss.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:504)
> at
> org.jboss.netty.util.HashedWheelTimer$Worker.notifyExpiredTimeouts(HashedWheelTimer.java:419)
> at
> org.jboss.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:369)
> at java.lang.Thread.run(Unknown Source)
> Caused by: java.io.IOException: A non-blocking socket operation could not be
> completed immediately
> at sun.nio.ch.SocketDispatcher.close0(Native Method)
> at sun.nio.ch.SocketDispatcher.preClose(Unknown Source)
> at sun.nio.ch.SocketChannelImpl.implCloseSelectableChannel(Unknown
> Source)
> at
> java.nio.channels.spi.AbstractSelectableChannel.implCloseChannel(Unknown
> Source)
> at java.nio.channels.spi.AbstractInterruptibleChannel.close(Unknown
> Source)
> at
> org.jboss.netty.channel.socket.nio.NioWorker.close(NioWorker.java:577)
> ... 22 more
> 2010-06-03 16:02:35,767 [Hashed wheel timer #2] DEBUG (Log4JLogger.java:39)
> - [id: 0x00214f6b, /10.248.74.160:52342 => /10.195.97.219:6600] CLOSE
> 2010-06-03 16:02:35,767 [Hashed wheel timer #2] DEBUG (Log4JLogger.java:39)
> - [id: 0x00214f6b, /10.248.74.160:52342 => /10.195.97.219:6600] UNBOUND
> 2010-06-03 16:02:35,767 [Hashed wheel timer #2] DEBUG (Log4JLogger.java:39)
> - [id: 0x00214f6b, /10.248.74.160:52342 => /10.195.97.219:6600] CLOSED
> 2010-06-03 16:02:35,767 [Hashed wheel timer #2] DEBUG (Log4JLogger.java:39)
> - [id: 0x00214f6b, /10.248.74.160:52342 => /10.195.97.219:6600] CLOSE
>
>
> When digging into the code, it looks like that the server is trying to write
> more data after the channel is closed (maybe during the wrap call, when
> there is still data in the buffer).
>
> Again, this does not happens all the time and only on certain machines (so
> it is not consistent).
>
> Can you try to spot the problem? if more data is needed, I will be happy to
> provide..
>
> Tnx,
> Uri
>
>
--
what we call human nature in actuality is human habit
http://gleamynode.net/
More information about the netty-users
mailing list