Closed grunetix closed 6 years ago
Hi there, I've run the script you provided in the environment as described and it prints:
"connection opened"
[:message, "{\"motd\":\"Hello and welcome to the RadarRelay API. Have a nice trade! 📡\",\"announcements\":[]}"]
Was this a temporary problem with the target server or are you still having a problem getting things working?
James, thanks for checking this out.
I am still seeing the same behaviour - connecting to the target server (wss://ws.radarrelay.com/0x/v0/ws) works on my machine when using node, but doesn't using ruby:
[:close, 1006, ""]
Using the exact same (ruby) script, it connects successfully to their previous endpoint (wss://api.radarrelay.com/0x/v0/ws) - which however, is now deprecated.
I'm not really sure how to debug this, or what possible causes might be. Any suggestions on how I should investigate?
Appreciate your input!
I'd try to find out if there's anything in the transport layer that's failing; I suspect that either there's a problem with your ruby openssl bindings, or your computer doesn't trust the certificate issued by the server while mine does.
Find out if this method is being called; that means the TCP connection is established. Find out what the start_tls
call in there is doing.
It might be worth re-installing ruby in case it needs recompiling against your system's openssl.
You could also try replacing the existing call with start_tls(:verify_peer => false)
to skip checking the server's certificate. If that makes your program work then you know it's a trust issue.
In the end, reinstalling ruby did the trick... I guess I got ahead of myself when trying to debug this.. Sorry about this! Thanks a lot for your input on this, James!
Hi there, I am unable to connect to a (third-party) websocket server with faye-websocket-ruby, i.e. the connection won't even open. Connecting works when using faye-websocket-node, however. Frankly, I haven't been able to find any meaningful clues with debugging, so hoping you have an idea to solve this. Thanks for having a look!
faye-websocket-ruby (unable to open connection, returns 1006 error code):
note: connecting to another endpoint at the same host (wss://api.radarrelay.com/0x/v0/ws) [which is deprecated, however] also works with faye-websocket-ruby. Not sure what might cause the difference in behaviours between these two websocket endpoints.
faye-websocket-node (connects as expected):