JackHammer
JackHammer

Reputation: 458

WebSocket connection to 'wss://...' failed: Error in connection establishment: net::ERR_CONNECTION_CLOSED

I have a pretty stange error:

I was trying to test live chat made on websockets, but when the scripts loaded, I get this message in developer tools window: "WebSocket connection to 'wss://chat.mywebsite.com:80/testuser@wr94@34@0: Error in connection establishment: net::ERR_CONNECTION_CLOSED"

The error message in developer tools sends me to this line of code: wrc_socket = new WebSocket(_wsServerUrl+'/'+login+'@wr94@'+_id+'@'+_userType);

I was trying to figure out this issue with chat developers, and we found, that this issue is only happening on my computer where I'm working.

Same browsers, same network, same OS - I have the issue, everyone else don't have it. Apperently, something installed on my computer that blocks wss connections. But I can't figure out what exactly. Tryed disabling antivirus and windows firewall, no result.

I've tested with chrome, firefox and opera (all letest versions). When installed on my computer - they reproduce this error, when installed on collegue's computer (he sist just next to me in the same office) error not happening.

Also, I've tried this on my home computer and got even more strange result: Opera and Firefox reproduse the issue, and Chrome works fine.

Can you give me a hint or a direction to investigate this? I think it's related to certificates stuff, but don't know where to start.

Upvotes: 13

Views: 39647

Answers (2)

Steffen Ullrich
Steffen Ullrich

Reputation: 123260

wss://chat.mywebsite.com:80/

I'm pretty sure that you don't have wss:// configured on port 80. Port 80 is used by default for plain HTTP, i.e. http:// and ws:// and not https:// and wss://. If the latter is available at all depends on your server configuration but simply trying wss:// on a port configured only for ws:// will not work.

If this works for other maybe they do it differently, that is they either use ws://chat.example.com or wss://chat.example.com but not wss://chat.example.com:80.

Upvotes: 5

Lucas Duarte
Lucas Duarte

Reputation: 1

I don't know about Opera, but Firefox has its own certificate store and won't trust a certificate because the OS trusts.

Upvotes: 0

Related Questions