Failed to connect to WebSocket to "wss: // ...": Error establishing connection: net :: ERR_CONNECTION_CLOSED

I have a rather strange error:

I tried to check the live chat made in websockets, but when the scripts are loaded, I get this message in the developer tool window: "Connect WebSocket to" wss: //chat.mywebsite.com: 80 / testuser @ wr94 @ 34 @ 0: connection error: net :: ERR_CONNECTION_CLOSED "

An error message in the developer tools sends me to this line of code: wrc_socket = new WebSocket (_wsServerUrl + '/' + login + '@ wr94 @' + _ id + '@' + _ userType);

I tried to find out this problem with chat developers, and we found that this problem only occurs on my computer where I work.

The same browsers, the same network, the same OS - I have a problem, everyone does not have it. Explicitly, there is something on my computer that is blocking wss connections. But I can’t understand what exactly. I tried to disable the antivirus and the Windows firewall, no results.

I tested chrome, firefox and opera (all versions of letest). When they are installed on my computer - they reproduce this error when it is installed on the college computer (he sits next to me in the same office) the error does not occur.

In addition, I tried this on my home computer and got an even weirder result: Opera and Firefox are reusing this problem, and Chrome is working fine.

Can you give me a hint or direction to investigate this? I think this is due to certificate materials, but I don’t know where to start.

+6
source share
2 answers

WSS: //chat.mywebsite.com: 80 /

I am sure that you do not have wss:// configured on port 80. Port 80 is used by default for simple HTTP, i.e. http:// and ws:// , not https:// and wss:// . If the latter is available at all, it depends on the configuration of your server, but just trying wss:// on a port configured only on ws:// will not work.

If this works for others, 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 .

+4
source

I do not know about Opera, but Firefox has its own certificate store and will not trust the certificate because it trusts.

0
source

All Articles