SSL & HttpTunnelingClientSocketChannelFactory
Jason Ward
jward.dww at gmail.com
Wed May 27 09:33:39 EDT 2009
Hi Trustin -
I was actually in the process of upgrading from BETA2 yesterday so your
suggestion worked. It seems that specific issue is fixed.
However, I'm now getting...
java.nio.channels.ClosedChannelException
at
org.jboss.netty.channel.socket.oio.OioWorker.write(OioWorker.java:135)
at
org.jboss.netty.channel.socket.oio.OioClientSocketPipelineSink.eventSunk(OioClientSocketPipelineSink.java:91)
at org.jboss.netty.channel.Channels.write(Channels.java:878)
at org.jboss.netty.channel.Channels.write(Channels.java:826)
at
org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:236)
at
org.jboss.netty.channel.socket.http.HttpTunnelingClientSocketChannel.sendChunk(HttpTunnelingClientSocketChannel.java:176)
at
org.jboss.netty.channel.socket.http.HttpTunnelWorker.write(HttpTunnelWorker.java:93)
at
org.jboss.netty.channel.socket.http.HttpTunnelingClientSocketPipelineSink.eventSunk(HttpTunnelingClientSocketPipelineSink.java:88)
at org.jboss.netty.channel.Channels.write(Channels.java:898)
at org.jboss.netty.channel.Channels.write(Channels.java:840)
at
org.jboss.netty.handler.ssl.SslHandler.wrapNonAppData(SslHandler.java:635)
at org.jboss.netty.handler.ssl.SslHandler.handshake(SslHandler.java:294)
...even tho the channel seems connected and read/writeable : checking
e.getChannel().isConnected(), etc. before the handshake call all look good.
Any thoughts/suggestions?
FYI - here's my handler code...
@Override
public void channelConnected(
ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception
{
SslHandler sslHandler = ctx.getPipeline().get(SslHandler.class);
if(sslHandler != null){
System.out.println("begin handshake...");
System.out.println("e.getChannel().isConnected() =
"+e.getChannel().isConnected());
System.out.println("e.getChannel().isBound() =
"+e.getChannel().isBound());
System.out.println("e.getChannel().isOpen() =
"+e.getChannel().isOpen());
System.out.println("e.getChannel().isReadable() =
"+e.getChannel().isReadable());
System.out.println("e.getChannel().isWritable() =
"+e.getChannel().isWritable());
ChannelFuture future = sslHandler.handshake(e.getChannel());
future.awaitUninterruptibly();
if(!future.isSuccess()){
System.out.println("future = failed");
}
else{
System.out.println("future = success");
}
}
}
--
View this message in context: http://n2.nabble.com/SSL---HttpTunnelingClientSocketChannelFactory-tp2976767p2981080.html
Sent from the Netty User Group mailing list archive at Nabble.com.
More information about the netty-users
mailing list