WebSocket connection aborts when Apache HTTPD before Tomcat

I am trying to use Tomcat to implement WebSockets on a local machine. When I use only tomcat, everything works fine, but when I start using the Apache + mod_jk + package from the Tomcat browser, show me "The connection to ws: //example.com/test/echoMessage was interrupted while the page was loading after a couple of seconds of operation. After that, the WebSocket connection is closed.

Can someone tell me how to fix this?

For me: Apache HTTPD 2.2.18, mod_jk 1.2.37, Tomcat 7.0.28

Here is the server side code that I use: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/ and the client side: http: //svn.apache. org / viewvc / tomcat / trunk / webapps / examples / websocket /

Browsers: Firefox 12, Chrome 19

+6
source share
1 answer

I would investigate whether Apache mod_proxy can transparently transmit traffic at the TCP level in general. Since it is necessary for WebSocket. IOW: is mod_proxy able to transparently cancel WebSocket proxy traffic?

But why don't you bring Apache anyway? It does not add any value, only more parts that can break. This is for WebSocket, of course ..

0
source

Source: https://habr.com/ru/post/919297/


All Articles