Wasync / Atmosphere Socket无法在Android中使用SSL URI打开

时间:2014-06-17 23:44:05

标签: android sockets atmosphere

我有一个Android应用程序,使用wasync / atmosphere打开与服务器的套接字连接。使用http可以正常工作。如果我使用SSL连接到https地址,则套接字将无法打开。我能够将DefaultHttpClient与https套接字进行通信。我能够在桌面应用程序中使用相同的代码,并使套接字与SSL连接。

当我尝试打开套接字时,暂停时间恰好为60秒,然后出现以下异常:

java.net.ConnectException:wss://prod-responseware.dev.turningtechnologies.com/responseware/pollingParticipant/1437?X-Atmosphere-Transport = websocket& X-atmo-protocol = true& X-Atmosphere-tracking -id = 0&安培; X - 大气-框架= 2.0&安培; X-缓存日期= 0             在com.ning.http.client.providers.netty.NettyConnectListener.operationComplete(NettyConnectListener.java:103)             在org.jboss.netty.channel.DefaultChannelFuture.notifyListener(DefaultChannelFuture.java:427)             在org.jboss.netty.channel.DefaultChannelFuture.notifyListeners(DefaultChannelFuture.java:413)             在org.jboss.netty.channel.DefaultChannelFuture.setFailure(DefaultChannelFuture.java:380)             在org.jboss.netty.handler.ssl.SslHandler.channelDisconnected(SslHandler.java:661)             在org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:102)             在org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)             在org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)             在org.jboss.netty.channel.Channels.fireChannelDisconnected(Channels.java:396)             在org.jboss.netty.channel.socket.nio.AbstractNioWorker.close(AbstractNioWorker.java:360)             在org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:93)             在org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)             在org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318)             在org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)             在org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)             在org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)             在org.jboss.netty.util.internal.DeadLockProofWorker $ 1.run(DeadLockProofWorker.java:42)             在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)             at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:569)             在java.lang.Thread.run(Thread.java:856)      引起:java.nio.channels.ClosedChannelException 在org.jboss.netty.handler.ssl.SslHandler.channelDisconnected(SslHandler.java:661) 在org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:102) 在org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) 在org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559) 在org.jboss.netty.channel.Channels.fireChannelDisconnected(Channels.java:396) 在org.jboss.netty.channel.socket.nio.AbstractNioWorker.close(AbstractNioWorker.java:360) 在org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:93) 在org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108) 在org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318) 在org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) 在org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) 在org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) 在org.jboss.netty.util.internal.DeadLockProofWorker $ 1.run(DeadLockProofWorker.java:42) 在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076) at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:569) 在java.lang.Thread.run(Thread.java:856)

以下是一些套接字代码: http://pastebin.com/RxSdmirZ

我尝试更新我的库并用灰熊替换netty。

我可以尝试的任何想法或进一步调试此问题的方法?

1 个答案:

答案 0 :(得分:0)

通过用灰熊取代netty来解决这个问题。我必须更新我的其他库以使其完全正常工作。