Skip to content
This repository has been archived by the owner on Jun 12, 2018. It is now read-only.

WSS seems not to work. #14

Closed
ghost opened this issue Aug 13, 2015 · 2 comments
Closed

WSS seems not to work. #14

ghost opened this issue Aug 13, 2015 · 2 comments

Comments

@ghost
Copy link

ghost commented Aug 13, 2015

Hey,
i got an issue setting up the secure websocket server.
The non secured works without any problems.

I have an official wildcard certificate for my domain ghsys.net
The server is running with the private key, as server.key and the certificate as server.crt. It is also starting up, but my JS client displays the following error at the console:
WebSocket connection to 'wss://bots01.prod.ghsys.net:8080/echo' failed: WebSocket opening handshake was canceled

I also tried putting the CA to the server.crt which did not resolve the problem.
Is there anything i have missed?

@eidheim
Copy link
Owner

eidheim commented Aug 13, 2015

Keep in mind that you should not send a message to server before the connection is established. See https://github.com/eidheim/Simple-WebSocket-Server/blob/master/javascript_client_example.html

Also you need to accept the certificate in the browser if it is not accepted by default. One way to do this, since I do not think this can be done through WSS sadly, is to first start https://github.com/eidheim/Simple-Web-Server with the same certificate and accept that one, before running the WSS Javascript.

See if the problem lies here, good luck!

@ghost
Copy link
Author

ghost commented Aug 13, 2015

Thanks for the reply.
Im using at the moment your script js client.

The certificate should be accepted since its a StartCom signed certificate. However, i will try the hint with the WebServer.

@eidheim eidheim closed this as completed Apr 23, 2016
andylhxu pushed a commit to andylhxu/Simple-WebSocket-Server that referenced this issue Apr 26, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant