Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wasync/Atmosphere Socket not opening in Android with an SSL URI #94

Closed
ghost opened this issue Jun 18, 2014 · 2 comments
Closed

Wasync/Atmosphere Socket not opening in Android with an SSL URI #94

ghost opened this issue Jun 18, 2014 · 2 comments
Labels

Comments

@ghost
Copy link

ghost commented Jun 18, 2014

I have an android application that opens a socket connection to a server using wasync/atmosphere. This works fine using http. If I connect with SSL to an https address, the socket will not open. I am able to communicate with a DefaultHttpClient to the https socket. I am able to use the same code in a desktop application and have the socket connect with SSL.

When I attempt to open the socket, there is an exactly 60 second pause, and then the following exception:

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-Atmosphere-Framework=2.0&X-Cache-Date=0 at com.ning.http.client.providers.netty.NettyConnectListener.operationComplete(NettyConnectListener.java:103) at org.jboss.netty.channel.DefaultChannelFuture.notifyListener(DefaultChannelFuture.java:427) at org.jboss.netty.channel.DefaultChannelFuture.notifyListeners(DefaultChannelFuture.java:413) at org.jboss.netty.channel.DefaultChannelFuture.setFailure(DefaultChannelFuture.java:380) at org.jboss.netty.handler.ssl.SslHandler.channelDisconnected(SslHandler.java:661) at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:102) at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559) at org.jboss.netty.channel.Channels.fireChannelDisconnected(Channels.java:396) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.close(AbstractNioWorker.java:360) at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:93) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569) at java.lang.Thread.run(Thread.java:856) Caused by: java.nio.channels.ClosedChannelException             at org.jboss.netty.handler.ssl.SslHandler.channelDisconnected(SslHandler.java:661)             at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:102)             at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)             at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)             at org.jboss.netty.channel.Channels.fireChannelDisconnected(Channels.java:396)             at org.jboss.netty.channel.socket.nio.AbstractNioWorker.close(AbstractNioWorker.java:360)             at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:93)             at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)             at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318)             at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)             at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)             at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)             at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)             at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)             at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)             at java.lang.Thread.run(Thread.java:856)

Here is some of the socket code: http://pastebin.com/RxSdmirZ

I have tried updating my libraries and replacing netty with grizzly.

@jfarcand
Copy link
Member

Are you sure it's not the server that close the connection?

Caused by: java.nio.channels.ClosedChannelException             at org.jboss.netty.handler.ssl.SslHandler.channelDisconnected(SslHandler.java:661)             at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:102)             at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)             at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)             at org.jboss.netty.channel.Channels.fireChannelDisconnected(Channels.java:396)             at org.jboss.netty.channel.socket.nio.AbstractNioWorker.close(AbstractNioWorker.java:360)

Let me know if that works better with Grizzly

@jfarcand
Copy link
Member

Closing as not a bug. Please re-open with a test case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant