My first install of Janus - failed to get Echo Test working

1,216 views
Skip to first unread message

Mohammad Bhuyan

unread,
Dec 19, 2016, 1:14:37 AM12/19/16
to meetecho-janus
Hi,

I have a Janus install running on a EC2 instance. I have provided the public IP in janus.cfg

I have a python simple http server running on the same machine on 8000 serving my home dir so I can browse to the janus demo directory.

I have updated the echotest.js with following:

var server = null;
//if(window.location.protocol === 'http:')
//      server = "http://" + window.location.hostname + ":8088/janus";
//else
//      server = "https://" + window.location.hostname + ":8089/janus";

server = "ws://" + window.location.hostname + ":8188";

When I try to run the EchoTest I get my Chrome (Version 55.0.2883.95 (64-bit)) popup:

WebRTC error... {"name":"NotSupportedError","message":"Only secure origins are allowed (see: https://goo.gl/Y0ZkNV)."}

I do notice that Janus is getting contact from the EchoTest app:

Creating new session: 4539099695453643
Creating new handle in session 4539099695453643: 805895659427544
Detaching handle from JANUS EchoTest plugin
[WSS-0x7fd1b8001de0] Destroying WebSocket client
Cleaning up handle 805895659427544...
[805895659427544] WebRTC resources freed
[805895659427544] Handle and related resources freed

Help appreciated. Let me know I have should provide further details.

Regards,

Mohammad 


 


Mohammad Bhuyan

unread,
Dec 19, 2016, 1:23:04 AM12/19/16
to meetecho-janus
A quick update: Firefox (48.0.1) works without any issue. So I guess it's a chrome thing related to usage WSS?!?

I will appreciate detectives how to make it work for chrome. 

Mohammad Bhuyan

unread,
Dec 19, 2016, 1:36:39 AM12/19/16
to meetecho-janus
To further clarify: The default echotest.js works for me in Firefox (48.0.1) but the default echotest.js doesn't work for Chrome (Version 55.0.2883.95 (64-bit)) 

Oscar Vadillo

unread,
Dec 19, 2016, 3:02:11 AM12/19/16
to Mohammad Bhuyan, meetecho-janus
Try to use HTTPS in your WebServer

2016-12-19 7:36 GMT+01:00 Mohammad Bhuyan <mohamma...@gmail.com>:
To further clarify: The default echotest.js works for me in Firefox (48.0.1) but the default echotest.js doesn't work for Chrome (Version 55.0.2883.95 (64-bit)) 

--
You received this message because you are subscribed to the Google Groups "meetecho-janus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to meetecho-janus+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Horsetopus

unread,
Dec 19, 2016, 6:12:20 AM12/19/16
to meetecho-janus
Yes, as Oscar says, Chrome only allow webrtc with secure connection.
So your websocket link should be "server = "wss://" + window.location.hostname + ":8188";"
And your page need to be secure too, an https url.
Janus can handle secure websockets, but it's not enables by default, as stated at the end of the installation guide:
As far as transports are concerned (that is, with respect to how you can interact with your Janus instance), using the default configuration files provided after issuing a make configs will result in Janus only enabling an HTTP webserver (port 8088) and a plain WebSocket server (8188), assuming the related transport modules have been compiled, of course. To enable HTTPS or Secure WebSockets support, edit the related transport configuration file accordingly.

So just edit janus.trandpot.websockets.cfg, set wss to yes, set the port, and make sure the certificates path are valid.
As for the https page, you'll need to enable it in Apache (or whatever you use to host the website).

Lorenzo Miniero

unread,
Dec 19, 2016, 6:15:31 AM12/19/16
to meetecho-janus
All of the above, plus study this: https://janus.conf.meetecho.com/docs/deploy

L.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages