Problem with https "Probably a network error, is the server down?: [object Object]"" (http works)

2,629 views
Skip to first unread message

Stanisław Leja

unread,
Sep 12, 2018, 5:18:18 AM9/12/18
to meetecho-janus
Hi

I'm working on my master thesis and I want use the Janus gateway in my project. I've already installed janus on aws instance and it work without any problem via http but I struggle with https. 

I host the Janus gateway demo on apache2 with self-signed certificate. When I click the start button on Echo Test page I see push-up communicate "Probably a network error, is the server down?: [object Object]"  and in janus logs "New connection on REST API: ::ffff:87.239.xxx.xx (x-digits). I can see also traffic on 8089 port (tshark -f "tcp port 8089" -i any).



error_in_console.png






















Probably a network error, is the server down?: 
Object { message: "Probably a network error, is the server down?", error: TypeError }
janus.js:841:5
error
httpAPICall/<
Probably a network error, is the server down?: [object Object] echotest.js:379:7
error
error
httpAPICall/<
(screenshot1)

 A few hours ago It has started work in chrome (partially), although I haven't made any change in configuration. I can see local stram. I can't see remote stream, but I can send text by DataChannel and see it in remote stream (screenshot2). Probably it will stop work when I restart Chrome, becouse in firefox it still doesn't work.

echo_test_in_chrome.png




I forwarded tcp ports: 80, 443, 8088, 8089, and udp 20000-40000. (screenshot3)



ports_aws.png






Results of sudo nmap -PN [aws_public_ip] from my laptop.

PORT     STATE SERVICE
22/tcp   open  ssh
80/tcp   open  http
443/tcp  open  https
8088/tcp open  radan-http
8089/tcp open  unknown

Have you any idea how to solve this problem?

Best Regards
Stanisław

Lorenzo Miniero

unread,
Sep 12, 2018, 5:48:44 AM9/12/18
to meetecho-janus
The HTTPS error is very likely caused by the self signed certificate; AJAX calls will fail if you don't accept the certificate manually first, which you'll have to do opening an API url manally once (e.g., /janus/info). Much better to hide both web pages and API behind the same server, e.g., something like HTTPD or nginx taking care of HTTPS and leaving Janus to only do plain HTTP, as explained in the documentation: https://janus.conf.meetecho.com/docs/deploy

Not sure if that's the cause of the broken video in your scenario as well, but that may be a connectivity issue instead. If you're on AWS, make sure you're configuring nat-1-1 properly, and that you didn't set STUN/TURN in janus.cfg (common mistakes). Connectivity issues can be debugged with the Admin API: http://www.meetecho.com/blog/understanding-the-janus-admin-api/

That said, please no more screenshots. They never provide useful info for us, and are not parseable, meaning they're just annoying. Provide log snippets instead, in gist/pastebin when they're too long.

Lorenzo

Stanisław Leja

unread,
Sep 12, 2018, 8:05:38 AM9/12/18
to meetecho-janus
Thanks a lot! It's working now! 

I've deploed janus behinde a web fronted of apache and It works. I waiting now for assigning of new DNS address to my domain. When it's ready I going to generate certificate by certbot and I will check if this error was caused by self-signed certificate.

Thanks again Lorenzo

Stanisław

Ilmars Lacplesis

unread,
Apr 12, 2019, 6:11:06 AM4/12/19
to meetecho-janus
Hi, I wanted to ask, did you manage to get Janus to work with self-signed certificates?
Reply all
Reply to author
Forward
0 new messages