S
S
sferos2016-10-22 14:00:57
Digital certificates
sferos, 2016-10-22 14:00:57

WebSocket and SSL conflict?

The thing is .. There is a client connecting to the websocket server (wss://ipserver) and, accordingly, the websocket server (on nodejs). Since the server itself and the domain are based on an Ssl certificate, when the client tries to coonect to the server, an error occurs: failed: Error in connection establishment: net::ERR_CONNECTION_CLOSED. I tried to change "wss" to "ws" then a message about closing the connection between a secure and non-secure server takes off. If you disable SSL certificates, then the browser blocks the connection to the site through the domain. The only thing that works with a bang, if only the connection is made not to the mydomain.ru domain, but to the direct ip address, then ws sockets work perfectly. But what can be done to make it work on a domain?

Briefly summarized, it goes like this:
1.When Ssl is enabled: mydomain.ru/client.html(client)-->websocket server=Error in connection establishment: net::ERR_CONNECTION_CLOSED 2.When Ssl
is disabled: mydomain.ru/client.html(client) = Connection error to the client (insecure connection, the browser cuts down)
3. With Ssl turned off: 10.10.10.10/client.html (client) --> websocket server = all fine

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Shatokhin, 2016-10-22
@Sovigod

check both hosts at https://www.ssllabs.com/ssltest/
especially the host for the websocket (instead of wss specify https simply)
For example, in the latest chrome update, wss began to fall off if only the final certificate arrives, instead of the whole chain.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question