Websocket connection failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

I am working on video conferencing with mediasoup demo but i am getting this error:

WebSocket connection to ‘wss://videocall.test.com:4443/?roomId=0vkdadle&peerId=xxd1ngtx’ failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

Web application working on
https:/videocall.test.com:2015

Url running good but getting websocket error.

Please any one help me. how can i fix this error.

Thanks in advance.

Did you search the forum and read the demo app README?

Yes, I have set the ssl certificate and port in config.js if any mistake please guid. Main url working fine but websocket url not working with wss://domain:port
Thanks,
Check this screenshot.

Self signed certificate, right? Please, use a valid one.

Yes it’s valid. In browser’s URL SSL working fine but problem with wss:// websocket can you please sort out this problem with websocket SSL problem. Thanks :blush:

The fact that it works for HTTPS in the browser’s URL does not mean that it will also work for WSS. I’ll repeat my question: is it a self-signed certificate?

Start chrome with the flag --ignore-certificate-errors (it will show you a warning when you start that it’s insecure) -> if it runs with that it is your certificate 100%.

Hello please check this link i have installed valid ssl.
https://online.thinkcepts.com:4443/?roomId=kjglztfk
but still showing handshake issue. Please guide me what the problem.
Thanks,

Hello, can you suggest me any command for ubuntu?

I’m a Windows user, sorry. In any case, your site also doesn’t work with this flag, so the most likely next culprit is your server. I’d check the nginx logs or whatever you are using for network access, my assumption is that you are blocking access to the websocket’s port.