tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Preißer <>
Subject Tomcat closes Websocket connection when using a SSL HTTP APR connector (was: RE: Tagging 7.0.46)
Date Wed, 16 Oct 2013 23:23:24 GMT
> -----Original Message-----
> From: Konstantin Preißer []
> Sent: Wednesday, October 16, 2013 3:33 PM

> I also need to do more testing because the error is not very reproducible on
> my current machine (but I have another one where it was more
> reproducible) to make sure what error exactly happens and when.


I am now on a machine (Intel Core i7-3770, Win8 x64) where I can reproduce the error very
easily (after a few seconds of drawing at the drawboard).

In summary: When running current Tomcat trunk on Windows 8 x64 with Java 1.7.0_45 x64 and
TC-Native 1.1.29, and using a SSL HTTP APR connector, then Tomcat will close the Websocket
connection after a few seconds of drawing to the Drawboard Websocket example. This does not
happen with a non-SSL APR connector.

What I did was:
1) Checkout trunk (r1532781). Then update the path "webapps/examples/WEB-INF/classes/websocket"
to r1532286 because after this revision I made a change to the Room implementation which makes
the error harder to reproduce.
2) Build the working copy, then copy the current v1.1.29 "tcnative-1.dll" into the bin directory.
3) Configure a SSL HTTP APR connector in server.xml:

       port="8443" maxThreads="200"
       scheme="https" secure="true" SSLEnabled="true"
       SSLVerifyClient="optional" SSLProtocol="TLSv1"

4) Run Tomcat; then open Firefox and visit https://localhost:8443/examples/websocket/drawboard.xhtml
5) Draw continuously on the drawboard (e.g. by doing fast circular movements with the mouse)
using the "Brush" setting.
6) After a several seconds, Firefox will display "Websocket connection closed" and you can't
draw anymore. Tomcat doesn't log anything to the console.

When using my TCP forwarder tool between Firefox and Tomcat, I can see that Tomcat aborts/resets
the TCP connection (Winsock error: 10053 and 10054) when this happens.

When you try this with a non-SSL HTTP APR connector, everything works fine: The Websocket
connection will not be closed, regardless of how long you are drawing.

Konstantin Preißer

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message