SSL conenction problem
Hello,
I have a problem when connecting to stream.binance.com from my linode Ubuntu - getting SSL error.
It works fine from the home computer.
Are there any specific SSL settings required for linode machine to connect some sites?
Thank you in advance,
Alex
8 Replies
It would be helpful if you described what you were trying to do & posted the error (and the concurrent log entry if you have one).
— sw
Using httpS I get 'No Sec-WebSocket-Key header"
Using just http the site just hangs and does not resolve and I get 'stream.binance.com took too long to respond.'
You can research that error from something here:
You will want to set the SSL such that if someone keys in http that it auto-switches to https. Rerun certbot and choose that option (if I remember correctly.)
I get the same thing:
stevewi:~ $ curl https://stream.binance.com
No Sec-WebSocket-Key header
stevewi:~ $ ping stream.binance.com
PING stream.binance.com (54.199.241.22): 56 data bytes
^C
--- stream.binance.com ping statistics ---
15 packets transmitted, 0 packets received, 100.0% packet loss
It doesn't work from home either (Comcast in Portland, OR). Same results.
-- sw
I went to https://binance.com in my browser and was greeted with the following message:
Binance is unable to provide services to U.S. users. Binance.US (BAM Trading Services) is a US-regulated cryptocurrency trading platform. In approved states, U.S. customers can use Binance.US to buy and sell over 50 cryptocurrencies with low fees.
I was offered a link to https://binance.us which worked fine.
From my Linode (in CA):
stevewi:~ $ curl https://stream.binance.us
curl: (7) Failed to connect to stream.binance.us port 443 after 588 ms: Connection refused
stevewi:~ $ ping stream.binance.us
PING usa-prod-mbx-pubwsp-alb-291245639.us-east-1.elb.amazonaws.com (52.86.20.130): 56 data bytes
^C
--- usa-prod-mbx-pubwsp-alb-291245639.us-east-1.elb.amazonaws.com ping statistics ---
9 packets transmitted, 0 packets received, 100.0% packet loss
From home:
stevewi:~ $ curl https://stream.binance.us
curl: (7) Failed to connect to stream.binance.us port 443 after 891 ms: Connection refused
stevewi:~ $ ping stream.binance.us
PING usa-prod-mbx-pubwsp-alb-291245639.us-east-1.elb.amazonaws.com (54.92.179.6): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
^C
--- usa-prod-mbx-pubwsp-alb-291245639.us-east-1.elb.amazonaws.com ping statistics ---
5 packets transmitted, 0 packets received, 100.0% packet loss
-- sw
Thank you all for your responses!
That may be the issue - I'll check it.
I have no problems to create a websocket from two computers, but both based in London.
Possibly my linode is considered to be based in the USA?
Interesting…
Possibly my linode is considered to be based in the USA?
That's probably the case. Linode is a US company.
-- sw
…actually, doing ping to stream.binance.com doesn't work on my London machines and on the linode. But I have no SSL problems on my local computers (one is running Ubuntu 20.04 another - Mint 19.3).
Hmm… I've checked geolocation of my linode IP address (here https://www.iplocation.net/ip-lookup) - it claims the location is London (UK) what is correct.
Apparently the reason is in something else.
Magic!