Search Posts

WebSocket Request (xhr_send) getting stalled (Tomcat and Apache HTTP)

My application used sockjs & Application is running on Tomcat 8 and APACHE HTTP as front end web server. I have observed that xhr_send request getting stalled and so hangs the application. On Chrome developer console, received following error

enter image description here

when xhr_send request stalled I never received CONNECTED response.

I used following code to setup websocket

socket = new SockJS(applicationMainService.getUrl()+'/ws');
stompClient = Stomp.over(socket);

Also received following error in Tomcat logs

[org.spr[email protected]1e7904b0]: org.springframework.web.socket.sockjs.SockJsException: Uncaught failure in SockJS request, uri=https://pods.jlrint.com:443/PODSWeb/ws/112/fvi5za3c/websocket; nested exception is org.springframework.web.socket.sockjs.SockJsTransportFailureException: WebSocket handshake failure; nested exception is java.lang.UnsupportedOperationException: HTTP upgrade is not supported by the AJP protocol

06:35:04.129 [ajp-nio-8009-exec-11] DEBUG o.s.web.servlet.DispatcherServlet – Could not complete request
org.springframework.web.socket.sockjs.SockJsException: Uncaught failure in SockJS request, uri=https://xyzabc.com:443/MyRoot/ws/112/fvi5za3c/websocket; nested exception is org.springframework.web.socket.sockjs.SockJsTransportFailureException: WebSocket handshake failure; nested exception is java.lang.UnsupportedOperationException: HTTP upgrade is not supported by the AJP protocol
at org.springframework.web.socket.sockjs.support.SockJsHttpRequestHandler.handleRequest(SockJsHttpRequestHandler.java:91) ~[spring-websocket-4.0.2.RELEASE.jar:4.0.2.RELEASE]

Please help.

Source: AngularJS

Leave a Reply

Your email address will not be published. Required fields are marked *