0

I recently enable Websockets on our HTTP server which proxies to a Meteor application that I'm running. I see it do the handshake (i.e. "Switching Protocols") but then all the logs in browser seem to indicate that SockJS is still communicating using HTTP XHR.

Can someone explain why that might be happening? We're using Apache 2.2 with a backport of the mod proxy_wstunnel. I've tested a standalone Websockets app (not Meteor) and that works fine.

Here's a snapshot of what I see in the browser's console, but then I see XHR POST's every 30 seconds thereafter.

    [15:45:06.976] GET http://ma-meteor.envx.com/sockjs/251/svmzngwb/websocket [HTTP/1.1 101 Switching Protocols 9ms]
    [15:45:07.681] POST http://ma-meteor.envx.com/sockjs/251/imibln7d/xhr [HTTP/1.1 200 OK 8ms]
    [15:45:07.682] POST http://ma-meteor.envx.com/sockjs/251/imibln7d/xhr_send [HTTP/1.1 204 No Content 8ms]
    [15:45:07.682] POST http://ma-meteor.envx.com/sockjs/251/imibln7d/xhr [HTTP/1.1 200 OK 8ms]
    [15:45:07.683] POST http://ma-meteor.envx.com/sockjs/251/imibln7d/xhr [HTTP/1.1 200 OK 6ms]
    [15:45:07.641] Connected to Meteor Server.
occasl
  • 5,303
  • 5
  • 56
  • 81
  • What OS? I had the same issue with Tomcat 7.0.55 running on Windows 7. When I ran it on Windows 8.1, SocksJS was able to communicate on WS; it did not degrade to XHR streaming. – Philippe Jan 15 '15 at 16:44
  • Linux. As it turns out we needed to update the version on our load balancers so that it would support WS. – occasl Jan 15 '15 at 21:51

0 Answers0