Re: Websockets timing out
Ubuntu 13.04 and Tomcat 8 Same issue. Client makes the connection fine. Tomcat closes the connection in 10 seconds.
Re: Websockets timing out
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Bob, On 3/4/14, 1:15 PM, Bob Mancarella wrote: Ubuntu 13.04 and Tomcat 8 Same issue. Client makes the connection fine. Tomcat closes the connection in 10 seconds. What's the client timeout on the server side? Perhaps you are... timing out. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJTFiFrAAoJEBzwKT+lPKRY8/YQAIeHKuk+XbixExR5xgAZIqTN IouEC+qFsiw9KAwI5eTPjyLiGOvO6qxAwQgrfiQntoaDsdGot7ruqRn33lfLqtZR KL44Fy/gkkPDgcBeLwqDUU5gkcbcfWzT0gW6SGWLGV6C9ByOs0LVVpkPmKKBJqB5 nbyr2LLbNuv5/4/JKKOSVgxx4IZO1nI3jrKeqnem3iRTwlTlxu6pCmr3XoETMPGn WykiuuVro74txdv2pM7nuJeoZpphjC260ZVHwv6xkGAOzvZP+yYI0Fb77uSegPLv rGgon5WIa3ubS5WeEwSvpeX+gwgRpV9s0n3/Jn6x+yYuj8gIDTOUVBduGxiFPfeF d2i2Mc0p0Hpsc13TDgLazMDhT3585Ut/M7QUEIyyTEQnE9U7mhma/tPkJ6nUahGk 9caL+AtZqH4LNaMQ2SL8HFnWpqzlpIPSX42jG7jPwcvTKE8JdrzlRY1kKPdbupAH f7XP3FF12uQkBvTcvBCUjQ+tfEVTcDyuBGzhKoxUMxArNGDYMfS+N9S+sjrm3Kw8 Q1huNLAvUMsu5SWx2+Z8u5ezSgaAds/Zss+5rH3NdYNUpe80Kau5BS73oUNkpTyT vLMUv6rkuff4ftssCS8EHrjnrkWObsfOWzCUgqQelT+kMB8kXNoqGmQrsBC4LbcR NSWG46brPPG2vzUJf61r =v2j+ -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Websockets timing out
Besides what I mentioned where would i find that? On Tue, Mar 4, 2014 at 1:54 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Bob, On 3/4/14, 1:15 PM, Bob Mancarella wrote: Ubuntu 13.04 and Tomcat 8 Same issue. Client makes the connection fine. Tomcat closes the connection in 10 seconds. What's the client timeout on the server side? Perhaps you are... timing out. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJTFiFrAAoJEBzwKT+lPKRY8/YQAIeHKuk+XbixExR5xgAZIqTN IouEC+qFsiw9KAwI5eTPjyLiGOvO6qxAwQgrfiQntoaDsdGot7ruqRn33lfLqtZR KL44Fy/gkkPDgcBeLwqDUU5gkcbcfWzT0gW6SGWLGV6C9ByOs0LVVpkPmKKBJqB5 nbyr2LLbNuv5/4/JKKOSVgxx4IZO1nI3jrKeqnem3iRTwlTlxu6pCmr3XoETMPGn WykiuuVro74txdv2pM7nuJeoZpphjC260ZVHwv6xkGAOzvZP+yYI0Fb77uSegPLv rGgon5WIa3ubS5WeEwSvpeX+gwgRpV9s0n3/Jn6x+yYuj8gIDTOUVBduGxiFPfeF d2i2Mc0p0Hpsc13TDgLazMDhT3585Ut/M7QUEIyyTEQnE9U7mhma/tPkJ6nUahGk 9caL+AtZqH4LNaMQ2SL8HFnWpqzlpIPSX42jG7jPwcvTKE8JdrzlRY1kKPdbupAH f7XP3FF12uQkBvTcvBCUjQ+tfEVTcDyuBGzhKoxUMxArNGDYMfS+N9S+sjrm3Kw8 Q1huNLAvUMsu5SWx2+Z8u5ezSgaAds/Zss+5rH3NdYNUpe80Kau5BS73oUNkpTyT vLMUv6rkuff4ftssCS8EHrjnrkWObsfOWzCUgqQelT+kMB8kXNoqGmQrsBC4LbcR NSWG46brPPG2vzUJf61r =v2j+ -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Websockets timing out
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Bob, On 3/4/14, 11:16 AM, Bob Mancarella wrote: Tomcat 7.0.52 on Ubuntu 14.04 Websocket connection closes automatically after about 10 seconds. The browser creates the initial connection. OnOpen is called on the server. After 10 seconds OnClose is called and the connection is closed. I have tried changing connectionTimeout=-1 on Connector. Also tried session.setMaxIdleTimeout(-1); Neither has any effect. HttpSession has no impact on Websocket. Neither does connectionTimeout... that's all about HTTP connections, etc. Once you are in Websocket land, everything changes. Can you post some sample code -- like what your client and server code look like? On my Windows 7 dev machine the connection stays up until told to close. Also when I used apt-get to install Tomcat these files were missing... tomcat7-wobsocket.jar and websocket-api.jar. I copied them into /usr/share/tomcat7/lib which seemed to work. Please post your Connector configuration. Are you using APR at all? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJTFimqAAoJEBzwKT+lPKRYnhAP/22raw7aVia8fEF9Sg9xANVV 0mYm/DoZWAY+xwN6TtHwiCHHXD1H0mfNXNpvcwBjVCheBPOdrrGAoJ+dg/w5BBey 98MaJ3aeyZ/J17wDW6ya3BgVomWkWOjDyqOtuMbOM8dZiCcOEwr/tqgQCnT5ClUH eqKPnZ4uRC5dx6+bpDkX2IzMZxKzPgdXV5b2n/k6ruGzarLbFCXtzyC4Jgi9wl1I 8a/1RwAAQSpRawEVjkHMhlzGUpHjRm/8m4HwZiVlRp6xWDn082Ag0DlcJODo5SH/ ACOk0dH3oG/1QyRUxUWtlqMB5Be/34V8iomyo2GZAD3EvXurl8dpyc4FspU144sK m3hNwyYRtwbYjVplvbsCYAnVzLzY/I3FMt1Q0GFQLbs9pmY66RVVIelT/v5Dzd8s RS8Z0aZV6jSQIuYEfPzSmm///0TKVVKarGGpMeHzrw4wsRvkFnTCy2SvOundjqAa WzwCUCbFCjMPpp/mTVmU8xFFr1dkmsg1qsWz/mrk0ZK/f4ZSXP0eIK88gdi7NvXX lUJsntlEAmOzhBYP19G6qgicN4EQQa9qj7FWyzJg+dw7r/tWHBVp8zxCaGilv7He Ca2DacMamtq/fjyz5eyL9DNBZ6aEy4kk0xUWDATQAH0HdYD+/qg7iMs8gw9ASEfR Nt2GNqjUlcRBwLTML7bD =4vu+ -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Websockets timing out
Just using the EchoAnnotation code /// // client code /// if (window.location.protocol == 'http:') { // target = 'ws://' + window.location.host + '../websocket/ connect.ws'; target = 'ws://' + window.location.host + '/inlook/websocket/ connect.ws'; } else { target = 'wss://' + window.location.host + '../websocket/ connect.ws'; } if ('WebSocket' in window) { ws = new WebSocket(target); } else if ('MozWebSocket' in window) { ws = new MozWebSocket(target); } else { alert('WebSocket is not supported by this browser.'); return; } ws.onopen = function () { console.log('onopen'); }; ws.onmessage = function (event) { console.log('onmessage start'); }; ws.onclose = function () { console.log('onclose'); }; /// // server code /// @ServerEndpoint(/websocket/echoAnnotation) public class EchoMessage { @OnOpen public void onOpen(Session session) { System.out.println(New connection with client); } @OnMessage public void echoMessage(Session session, String msg) { System.out.println(echoTextMessage: + msg); } @OnClose public void onClose(Session session) { System.out.println(Close connection for client); } @OnError public void onError(Throwable exception, Session session) { System.out.println(Error for client); } } On Tue, Mar 4, 2014 at 2:29 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Bob, On 3/4/14, 11:16 AM, Bob Mancarella wrote: Tomcat 7.0.52 on Ubuntu 14.04 Websocket connection closes automatically after about 10 seconds. The browser creates the initial connection. OnOpen is called on the server. After 10 seconds OnClose is called and the connection is closed. I have tried changing connectionTimeout=-1 on Connector. Also tried session.setMaxIdleTimeout(-1); Neither has any effect. HttpSession has no impact on Websocket. Neither does connectionTimeout... that's all about HTTP connections, etc. Once you are in Websocket land, everything changes. Can you post some sample code -- like what your client and server code look like? On my Windows 7 dev machine the connection stays up until told to close. Also when I used apt-get to install Tomcat these files were missing... tomcat7-wobsocket.jar and websocket-api.jar. I copied them into /usr/share/tomcat7/lib which seemed to work. Please post your Connector configuration. Are you using APR at all? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJTFimqAAoJEBzwKT+lPKRYnhAP/22raw7aVia8fEF9Sg9xANVV 0mYm/DoZWAY+xwN6TtHwiCHHXD1H0mfNXNpvcwBjVCheBPOdrrGAoJ+dg/w5BBey 98MaJ3aeyZ/J17wDW6ya3BgVomWkWOjDyqOtuMbOM8dZiCcOEwr/tqgQCnT5ClUH eqKPnZ4uRC5dx6+bpDkX2IzMZxKzPgdXV5b2n/k6ruGzarLbFCXtzyC4Jgi9wl1I 8a/1RwAAQSpRawEVjkHMhlzGUpHjRm/8m4HwZiVlRp6xWDn082Ag0DlcJODo5SH/ ACOk0dH3oG/1QyRUxUWtlqMB5Be/34V8iomyo2GZAD3EvXurl8dpyc4FspU144sK m3hNwyYRtwbYjVplvbsCYAnVzLzY/I3FMt1Q0GFQLbs9pmY66RVVIelT/v5Dzd8s RS8Z0aZV6jSQIuYEfPzSmm///0TKVVKarGGpMeHzrw4wsRvkFnTCy2SvOundjqAa WzwCUCbFCjMPpp/mTVmU8xFFr1dkmsg1qsWz/mrk0ZK/f4ZSXP0eIK88gdi7NvXX lUJsntlEAmOzhBYP19G6qgicN4EQQa9qj7FWyzJg+dw7r/tWHBVp8zxCaGilv7He Ca2DacMamtq/fjyz5eyL9DNBZ6aEy4kk0xUWDATQAH0HdYD+/qg7iMs8gw9ASEfR Nt2GNqjUlcRBwLTML7bD =4vu+ -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Websockets timing out
sorry, target is actually target = 'ws://' + window.location.host + '/inlook/websocket/echoAnnotationhttp://connect.ws/ ';
Re: Websockets timing out
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Bob, On 3/4/14, 2:39 PM, Bob Mancarella wrote: Just using the EchoAnnotation code /// // client code /// if (window.location.protocol == 'http:') { // target = 'ws://' + window.location.host + '../websocket/ connect.ws'; target = 'ws://' + window.location.host + '/inlook/websocket/ connect.ws'; } else { target = 'wss://' + window.location.host + '../websocket/ connect.ws'; } if ('WebSocket' in window) { ws = new WebSocket(target); } else if ('MozWebSocket' in window) { ws = new MozWebSocket(target); } else { alert('WebSocket is not supported by this browser.'); return; } ws.onopen = function () { console.log('onopen'); }; ws.onmessage = function (event) { console.log('onmessage start'); }; ws.onclose = function () { console.log('onclose'); }; /// // server code /// @ServerEndpoint(/websocket/echoAnnotation) public class EchoMessage { @OnOpen public void onOpen(Session session) { System.out.println(New connection with client); } @OnMessage public void echoMessage(Session session, String msg) { System.out.println(echoTextMessage: + msg); } @OnClose public void onClose(Session session) { System.out.println(Close connection for client); } @OnError public void onError(Throwable exception, Session session) { System.out.println(Error for client); } } So both your client and server code do absolutely nothing. Where are you actually sending a message? What events do you see occurring? You are providing very little information, here. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJTFjGQAAoJEBzwKT+lPKRYrxAQAMeqEASzf5kjKeb8mA/G6PoC 4ZSlKEdzvHjZ6WogB2+zDsTrAB2qz7wkruCa+Vfwa1dEmbR+PgV96/PtfkrYyWrY FR0Hq+sf2+tVHcAUiQEbo/g33UTVj4dGVJCcJkeinnsBIwHueH+nlielyYS1FGt1 BqFJ7AuC6GxrgDHrAm+fh+5wJGWPO2WxtMSRjEO4M0H/S7FCr+UqPlqrBpBwTKlc UEuBCMfqzhdbRLpQciI7ZAaLN+8Wak4NyNp2e6+wr1WIRO9l3hlu8OYQYLTOCmm2 DfNG3oGWx3l9FZvnSq6GvJ96pw74G2TLSCaj9cGZL/BkCsWDTQvONVn/tmwKAuMh FumyuqPhlVdnMLZBcd0MxCNbuY8MdY5G8Cda3KJtBsLtkwGUeifQVRrmKKOUJ9OS 79oSW2zmLs110XfTXgjYeGs4YMg7+WxNAHJzQmKuRcyKk3/9d2onv+4p9dwrmMy+ x1m8yR1YnPtkR2dI2BSZfdnPttWOsCLshmx2f1AaFA5VJ9XFC4Nb3bJxbSTBx52f dap6urFuggIa9RKsHL3MDmL91U4gnuyTAbkAhapdpxTinQjpng+lBv07DGhCGIFc /8B3zOrdgjB1VNJJmZPswdOLpdQpmVkHN3Gj5unT2lSzjv3Y6j+vxX0NbWkUU2Bj TnakA5hZfnXWTnAaZ2Jx =+Pb5 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Websockets timing out
More info. This is the return code to the browser 1006CLOSE_ABNORMAL*Reserved.* Used to indicate that a connection was closed abnormally (that is, with no close frame being sent) when a status code is expected. On Tue, Mar 4, 2014 at 2:41 PM, Bob Mancarella bobm...@gmail.com wrote: sorry, target is actually target = 'ws://' + window.location.host + '/inlook/websocket/ echoAnnotation http://connect.ws/';
Re: Websockets timing out
Thats the strange thing. The code isnt doing anything. It connects, receives the onopen message and then the onclose with the 1006 return code within a few seconds. On Tue, Mar 4, 2014 at 3:04 PM, Bob Mancarella bobm...@gmail.com wrote: More info. This is the return code to the browser 1006CLOSE_ABNORMAL *Reserved.* Used to indicate that a connection was closed abnormally (that is, with no close frame being sent) when a status code is expected. On Tue, Mar 4, 2014 at 2:41 PM, Bob Mancarella bobm...@gmail.com wrote: sorry, target is actually target = 'ws://' + window.location.host + '/inlook/websocket/ echoAnnotation http://connect.ws/';
Re: Websockets timing out
On 04/03/2014 16:16, Bob Mancarella wrote: Tomcat 7.0.52 on Ubuntu 14.04 Websocket connection closes automatically after about 10 seconds. The browser creates the initial connection. OnOpen is called on the server. After 10 seconds OnClose is called and the connection is closed. I have tried changing connectionTimeout=-1 on Connector. Also tried session.setMaxIdleTimeout(-1); Neither has any effect. On my Windows 7 dev machine the connection stays up until told to close. Also when I used apt-get to install Tomcat these files were missing... tomcat7-wobsocket.jar and websocket-api.jar. I copied them into /usr/share/tomcat7/lib which seemed to work. Which WebSocket implementation are you trying to use? The JSR356 one or the deprecated Tomcat proprietary one? Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Websockets timing out
JSR356
Re: Websockets timing out
OK, this is strange. If I go here http://www.websocket.org/echo.html I get the same results. Click on Connect but don't hit Send and I get a Disconnected message soon after. If I use TLS it seems to work. If I hit Send immediately after Connect it seems to work. Anyone else seeing this? On Tue, Mar 4, 2014 at 3:22 PM, Bob Mancarella bobm...@gmail.com wrote: JSR356
Re: Websockets timing out
On 04/03/2014 20:36, Bob Mancarella wrote: OK, this is strange. If I go here http://www.websocket.org/echo.html I get the same results. Click on Connect but don't hit Send and I get a Disconnected message soon after. If I use TLS it seems to work. If I hit Send immediately after Connect it seems to work. Anyone else seeing this? Not here. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Websockets timing out
could you try this. http://dev.bizunite.com/inlook/echo.html click on annotation API then Connect and see if you stay connected. On Tue, Mar 4, 2014 at 3:44 PM, Mark Thomas ma...@apache.org wrote: On 04/03/2014 20:36, Bob Mancarella wrote: OK, this is strange. If I go here http://www.websocket.org/echo.html I get the same results. Click on Connect but don't hit Send and I get a Disconnected message soon after. If I use TLS it seems to work. If I hit Send immediately after Connect it seems to work. Anyone else seeing this? Not here. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Websockets timing out
On 3/4/2014 3:46 PM, Bob Mancarella wrote: could you try this. http://dev.bizunite.com/inlook/echo.html click on annotation API then Connect and see if you stay connected. Seems to be working fine for me. On Tue, Mar 4, 2014 at 3:44 PM, Mark Thomas ma...@apache.org wrote: On 04/03/2014 20:36, Bob Mancarella wrote: OK, this is strange. If I go here http://www.websocket.org/echo.html I get the same results. Click on Connect but don't hit Send and I get a Disconnected message soon after. If I use TLS it seems to work. If I hit Send immediately after Connect it seems to work. Anyone else seeing this? Not here. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Websockets timing out
On 04/03/2014 20:50, David kerber wrote: On 3/4/2014 3:46 PM, Bob Mancarella wrote: could you try this. http://dev.bizunite.com/inlook/echo.html click on annotation API then Connect and see if you stay connected. Seems to be working fine for me. I get an immediate close with the programmatic API but no issues with the annotation API. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Websockets timing out
Ugh. Looks like I need to use wss in my environment. I just found this. If an encrypted WebSocket Secure connection (wss://) is used, then in the case of transparent proxy servers, the browser is unaware of the proxy server, so no HTTPCONNECT is sent. However, since the wire traffic is encrypted, intermediate transparent proxy servers may simply allow the encrypted traffic through, *so there is a much better chance that the WebSocket connection will succeed if an encrypted WebSocket connection is used.* Thanks everyone for your help. On Tue, Mar 4, 2014 at 3:50 PM, David kerber dcker...@verizon.net wrote: On 3/4/2014 3:46 PM, Bob Mancarella wrote: could you try this. http://dev.bizunite.com/inlook/echo.html click on annotation API then Connect and see if you stay connected. Seems to be working fine for me. On Tue, Mar 4, 2014 at 3:44 PM, Mark Thomas ma...@apache.org wrote: On 04/03/2014 20:36, Bob Mancarella wrote: OK, this is strange. If I go here http://www.websocket.org/echo.html I get the same results. Click on Connect but don't hit Send and I get a Disconnected message soon after. If I use TLS it seems to work. If I hit Send immediately after Connect it seems to work. Anyone else seeing this? Not here. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Websockets timing out
I didn't implement programmatic. On Tue, Mar 4, 2014 at 3:52 PM, Mark Thomas ma...@apache.org wrote: On 04/03/2014 20:50, David kerber wrote: On 3/4/2014 3:46 PM, Bob Mancarella wrote: could you try this. http://dev.bizunite.com/inlook/echo.html click on annotation API then Connect and see if you stay connected. Seems to be working fine for me. I get an immediate close with the programmatic API but no issues with the annotation API. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org