Open zsenyeg opened 7 years ago
@zsenyeg Can you put a breakpoint https://github.com/Atmosphere/wasync/blob/2b3e5e708497140ef3e888700ab337fc348e07fe/wasync/src/main/java/org/atmosphere/wasync/transport/StreamTransport.java#L284-L284 and debug from there.
Hey!
Thanks for your suggestion. I'v tried to debugging the problem, the close method is not invoking in case of wifi connection loss.
Another strange - or expected - behaviour is when the central server is down automatic reconnection is not working. Here's the warning from the log:
2017-05-24 11:03:42 - [New I/O boss #9] - WARN o.a.wasync.transport.StreamTransport - StreamTransport notified with exception java.net.ConnectException: Connection refused: no further information: was.example.com/127.0.0.1:9443 for request : https://was.example.com:9443/allexa-be-gj-expert/atmosphere/push
2017-05-24 11:03:42 - [New I/O boss #9] - WARN o.a.wasync.transport.StreamTransport -
java.net.ConnectException: Connection refused: no further information: was.example.com/127.0.0.1:9443
at com.ning.http.client.providers.netty.request.NettyConnectListener.onFutureFailure(NettyConnectListener.java:131) [async-http-client-1.9.28.jar:na]
at com.ning.http.client.providers.netty.request.NettyConnectListener.operationComplete(NettyConnectListener.java:143) [async-http-client-1.9.28.jar:na]
at org.jboss.netty.channel.DefaultChannelFuture.notifyListener(DefaultChannelFuture.java:409) [netty-3.10.3.Final.jar:na]
at org.jboss.netty.channel.DefaultChannelFuture.notifyListeners(DefaultChannelFuture.java:400) [netty-3.10.3.Final.jar:na]
at org.jboss.netty.channel.DefaultChannelFuture.setFailure(DefaultChannelFuture.java:362) [netty-3.10.3.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:109) [netty-3.10.3.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79) [netty-3.10.3.Final.jar:na]
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337) [netty-3.10.3.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42) [netty-3.10.3.Final.jar:na]
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) [netty-3.10.3.Final.jar:na]
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) [netty-3.10.3.Final.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_102]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_102]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102]
Caused by: java.net.ConnectException: Connection refused: no further information: was.example.com/127.0.0.1:9443
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.8.0_102]
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) ~[na:1.8.0_102]
at org.jboss.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:152) [netty-3.10.3.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105) [netty-3.10.3.Final.jar:na]
... 8 common frames omitted
2017-05-24 11:03:42 - [New I/O boss #9] - INFO h.d.a.b.b.OnlineStateProviderBean - MESSAGE:THROWABLE
Is it intended that after on throwable call there's no automatic reconnection? When central server is up, and application is down the message in the log is the next, and automatic reconnection is working:
`2017-05-24 11:03:31 - [New I/O worker #5] - ERROR h.d.a.b.b.OnlineStateProviderBean - Unexpected message Error 404: com.ibm.ws.webcontainer.servlet.exception.NoTargetForURIException: No target servlet configured for uri: /allexa-be-gj-expert/atmosphere/push
What am i doing wrong?
Cheers, Zsolt
Hi there!
I have a problem using wasync in my project. Project architecture and configuration:
Server side: Websphere 8.5 - Atmosphere Framework 2.3.8, protocol STREAMING, casuse WS is not supported by WAS currently. Server side is standard @ManagedService
web.xml
Client side wasync related code:
AsyncHttpClient config:
AsyncHttpClient version is maven dependency of wasync.
My problem is that if i turn off wifi, or pull out network connector in client machine, wasync cannot detect network loss, do nothing, just not receiving messages from server, even if network connection is coming back.
Is it a streaming related problem, or related to my configuration. How can i detect that network connection is not available? Maybe i should write a ping like scheduler, and detect socket io exception?
Any help would be life saving for me.
Cheers, Zsolt