Hi We have a web application that makes more and more use of websockets. (In fact we emulate websockets with comet servlets for older browsers and want to use real websockets for current ones.)
We implemented our websocket support using tomcat 7.0.30 and a servlet extending org.apache.catalina.websocket.WebSocketServlet. (Meanwhile we updated to 7.0.32 but no improvement.) That worked very well with IE10, FF and Chrome using http/ws. But as soon as we switched to https/wss, we have the very same problem in all those browsers: The socket connects and the server sends data to the client, which gets processed correctly, but then after a few short messages or some very short time (<1s), the connection breaks. I did some testing using 'stunnel' in front of tomcat and that worked. So the problem cannot be client-based. This leaves two possible causes: a) A configuration problem in my tomcat instance. b) A bug in tomcat. By conf/server.xml is rather short [1], my conf/context.xml and my conf/web.xml are empty (except for the root node, of course). Do you see any error in my configuration? What can I do to debug this? I tried to enable logging in tomcat [2], but it seems that did not suffice to make tomcat more verbose... Maybe I misunderstood the logging configuration. Any help would be much appreciated... Regards, Steffen [1] server.xml ---------------------------------------------------------------------------- ------------------------------------- <?xml version='1.0' encoding='UTF-8'?> <Server port="8005" shutdown="SHUTDOWN"> <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" /> <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" /> <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" /> <Service name="XXXService"> <Executor name="XXXExecutor" namePrefix="XXX-exec-" maxThreads="150" minSpareThreads="4" /> <Connector executor="XXXExecutor" port="80" protocol="org.apache.coyote.http11.Http11NioProtocol" connectionTimeout="20000" redirectPort="443" /> <Connector executor="XXXExecutor" port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol" SSLEnabled="true" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" connectionTimeout="20000" keystoreFile="../https.p12" keystorePass="YYY" keystoreType="PKCS12" URIEncoding="UTF-8" /> <Engine name="XXXEngine" defaultHost="XXXHost"> <Host name="XXXHost" appBase="webapps" unpackWARs="false" autoDeploy="false" createDirs="false"> <Context path="" docBase="../../full" cookies="false"> <Loader className="ZZZ.DevLoader" reloadable="true" /> </Context> </Host> </Engine> </Service> </Server> ---------------------------------------------------------------------------- ------------------------------------- [2] logging.properties ---------------------------------------------------------------------------- ------------------------------------- handlers = java.util.logging.ConsoleHandler .handlers = java.util.logging.ConsoleHandler java.util.logging.ConsoleHandler.level = ALL java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter org.apache.coyote.http11.Http11NioProtocol.level = ALL org.apache.catalina.core.ContainerBase.[XXXEngine].[XXXHost].level = ALL org.apache.catalina.core.ContainerBase.[XXXEngine].[XXXHost].handlers = org.apache.juli.FileHandler ---------------------------------------------------------------------------- -------------------------------------
smime.p7s
Description: S/MIME cryptographic signature