binary-person/rammerhead

Can't connect to websockets

Opened this issue · 7 comments

kdzapp commented

For some reason our website when accessed through rammerhead can't connect to websockets when we host it ourselves, but this seems to be fixed in the closed source version.

Any insight into what's going on / what the fix might be?

Are you doing nginx proxying? you need to enable websockets for it to work
https://www.nginx.com/blog/websocket-nginx/

kdzapp commented

We're using AWS's ALB which supports websockets, under the hood I believe this is exactly what it's doing

kdzapp commented
location / {
    proxy_pass          http://127.0.0.1:8080;
    proxy_http_version  1.1;

    proxy_set_header    Connection          $connection_upgrade;
    proxy_set_header    Upgrade             $http_upgrade;
    proxy_set_header    Host                $host;
    proxy_set_header    X-Real-IP           $remote_addr;
    proxy_set_header    X-Forwarded-For     $proxy_add_x_forwarded_for;
}

This is what our ec2s have on them

can you make sure it's the nodejs app that's the issue by hosting a websocket test nodejs app?

kdzapp commented
hammerhead.js:1 WebSocket connection to 'wss://test.sunnyvale.gg/0e2f768f99dc421e80bd027f92a1f2c7!w!s*d1tm91r4ytbt54.cloudfront.net/https://us.sunnyvale.gg' failed:

this is the output, and yeah I can try make a small example (for reference, the websocket connection it's suppose to be making is wss://us.sunnyvale.gg

kdzapp commented

It's possible it has something to do with the websocket connection that's trying to be made is in an iframe?

no, i meant instead of hosting rammerhead, can you host a small websocket test server in place of rammerhead?