LazyCoder7
LazyCoder7

Reputation: 45

Kurento Media Server HelloWorld Javascript example webSocket error

Merry Christmas!

I am trying to configure KMS on my Ubuntu 14.04 (64 bit). I could install the KMS server successfully following the guide at https://www.kurento.org/docs/6.0.0/installation_guide.html.

Also, downloaded the Javascript HelloWorld tutorial from https://www.kurento.org/docs/6.0.0/tutorials/js/tutorial-1-helloworld.html. I could run the example successfully on localhost on Google Chrome Version 47.0.2526.106 (64-bit) on the same Ubuntu System.

But, I could not see the local video nor the loop backed video. Only a spinner icon is shown on both the Video placeholders. Consulting the Console log reveals a problem after creating the SDP offer. The error is as described below.

kurento-client.js:21072 WebSocket connection to 'wss://127.0.0.1:8433/kurento' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

I am no expert on web sockets and stuff. Any help on this would really help me to proceed forward.

Note: I am running the example on HTTP, not on HTTPS. I guess that would not be the cause of the problem, though.

Regards,

LazyCoder7

Upvotes: 1

Views: 1927

Answers (3)

Ahmad Zahabi
Ahmad Zahabi

Reputation: 1268

Be sure that the KMS is running on the port 8433 (not 8888), if you are using docker

docker run -d --name kms -p 8433:8433 kurento/kurento-media-server:trusty-latest

Upvotes: 0

igracia
igracia

Reputation: 3541

You are following an old version of the documentation. Since Chrome 47, in is mandatory to server pages through HTTPS if you want to use the getUserMedia APi. So we updated all our tutorials, and they now have a self-signed certificate. In case of the JS tutorials, you also need to configure KMS to expose a secure WS signalling connection, as the browser directly connects to the media server to control it.

Please follow the latest version of the documentation here

Upvotes: 0

LazyCoder7
LazyCoder7

Reputation: 45

I managed to solve it. I was wrong on my guess though, HTTPS was indeed required in order to make the WebSocket connection ( i was not aware of that part ). Created a certificate file (.pem) (from crt and key file already in the helloworld folder) and configured the KMS server to use the certificate. After this I was able to see myself and the same me in loopback :)

Upvotes: 1

Related Questions