Webrtc with secure sockets not working

Issues when playing with WebRTC Player

Webrtc with secure sockets not working

Postby goes@tecnodes.nl » Tue Jun 19, 2018 10:17 am

We ar in the process of changing the application from HTML5 websocets to WebRTC.

I created a new instance on AWS. Previous instance was a AWS Unreal subscription instance.

I got the unsecure version running with the latest unrealwebrtcplayer.js.

After that:
- copied the cert and the key to the new AWS instance and updated the DNS to point to the new instance.
- Updated the parameters of UnrealWebRTCPlayer to port: 443 and "use secure sockets" to true.

The Streaming Media Player is happily streaming over HTTPS 443.

In the web page I got "connection failed; playback stopped. And the Unreal log gives:

LogIn User: Anonymous-ID:16409519; IP Address: xx.xx.xx.xx; Delivery: WebRTC TCP Unicast; Time: 14:38:15 19 June 2018; Resource: webrtc
LogOut User: Anonymous-ID:16409519; Time: 14:38:23 19 June 2018; KBytes transfered: 0

Wich is exactly the same as with the older unrealwebrtcplayer.js and a unsecure config.

Any suggestion what can be wrong?

P.S. we are very thrilled with the WebRTC capability of the Unreal media server. Stellar low latency and broad browser support.
goes@tecnodes.nl
 
Posts: 0
Joined: Wed Nov 01, 2017 5:27 am

Re: Webrtc with secure sockets not working

Postby admin » Tue Jun 19, 2018 2:04 pm

Hello,

The basic troubleshooting is the same as for HTML5 MSE websockets:
viewtopic.php?f=28&t=3489

It comes down to configuring the SSL certificate in Unreal Media Server Configurator properties and making sure port 443 is allowed in firewall and not taken by IIS.

In your case, does HTML5 MSE player work via secure websockets? The one that you are trying to ditch?
If that works then the WebRTC signaling via secure websockets will work too.
admin
Site Admin
 
Posts: 971
Joined: Fri Aug 21, 2009 10:13 am

Re: Webrtc with secure sockets not working

Postby goes@tecnodes.nl » Tue Jun 19, 2018 4:28 pm

The HTML5 player worked with secure websockets. So certificate is ok.

There are also no entrys in de application log.

Firewall/SecurityGroup are is OK, Streaming Media Player is streaming over 443.
goes@tecnodes.nl
 
Posts: 0
Joined: Wed Nov 01, 2017 5:27 am

Re: Webrtc with secure sockets not working

Postby admin » Tue Jun 19, 2018 5:27 pm

when you run the WebRTC player, what parameters are you passing?
Is central WebRTC port set to true? In this case, do you have port 5135 open in the firewall? (in this case the actual WebRTC streaming will be via port 5135 or whatever you configure)
admin
Site Admin
 
Posts: 971
Joined: Fri Aug 21, 2009 10:13 am

Re: Webrtc with secure sockets not working

Postby goes@tecnodes.nl » Wed Jun 20, 2018 3:32 am

<<I got the unsecure version running with the latest unrealwebrtcplayer.js.>>

so 5135 is open.

<<- Updated the parameters of UnrealWebRTCPlayer to port: 443 and "use secure sockets" to true.>>

The javascript with the instantiation: webrtcPlayer = new UnrealWebRTCPlayer("remoteVideo", "WebRTC", "", "mydomain.withcertificate.nl", "443", true, true, "tcp");
goes@tecnodes.nl
 
Posts: 0
Joined: Wed Nov 01, 2017 5:27 am

Re: Webrtc with secure sockets not working

Postby goes@tecnodes.nl » Wed Jun 20, 2018 3:52 am

In .. there was a line with a unsucure link : http://umediaserver.net/umediaserver/loader.gif
I removed the link but the result is the same.
The Chrome console is empty now (gave mixed content error), In Edge I got: "Websocket Error: network Error 12030"
goes@tecnodes.nl
 
Posts: 0
Joined: Wed Nov 01, 2017 5:27 am

Re: Webrtc with secure sockets not working

Postby goes@tecnodes.nl » Wed Jun 20, 2018 4:20 am

Sorry, the unsecure link is in unrealwebrtcplayer.js
goes@tecnodes.nl
 
Posts: 0
Joined: Wed Nov 01, 2017 5:27 am

Re: Webrtc with secure sockets not working

Postby admin » Wed Jun 20, 2018 6:25 am

Make sure you are using latest unrealwebrtcplayer.js from our website or SDK.

1. You can ignore this console line in Edge: "Websocket Error: network Error 12030"
this is not an error, Edge is just over paranoid about closing websocket connection.

2. About the spinning loader: provide your own secure reference to loader.gif in your unrealwebrtcplayer.js

3. What happens if you load your webpage under http://, not under https:// ?

4. When it works with unsecure websocket, what is the exact line to start the player? Is it
webrtcPlayer = new UnrealWebRTCPlayer("remoteVideo", "WebRTC", "", "mydomain.withcertificate.nl", "5119", false, true, "tcp");
Do you still go by domain: mydomain.withcertificate.nl or ip address?
Try the ip address, anyway.

I wonder if you are somehow hitting this issue:
viewtopic.php?f=29&t=3552
although then it wouldn't work for unsecure websocket as well.
It would be nice if you put a breakpoint in the unrealwebrtcplayer.js and find out what exact candidate comes back, like the user from that topic did.

WebRTC with secure websockets works in all our testing, so not sure what happens there.
admin
Site Admin
 
Posts: 971
Joined: Fri Aug 21, 2009 10:13 am

Re: Webrtc with secure sockets not working

Postby goes@tecnodes.nl » Wed Jun 20, 2018 7:39 am

1 OK
2 I removed it from the javascript (copied the script to my site)
3 & 4
HTTP port 5119 secure = false with IP adress works
HTTP port 5119 secure = false with DNS A record does not work

HTTPS port 443 secure = true with IP adres gives:
WebSocket connection to 'wss://xx.xx.xx.xx/webrtc_playnow/singleport/tcp/WebRTC' failed: Error in connection establishment: net::ERR_CERT_COMMON_NAME_INVALID

HTTPS port 443 secure = true with DNS A record does not work, but I think signalling works. Browser says after about 15 seconds: "connection failed; playback stopped" And I got the 2 stated lines from my firstpost in the log.

HTTP port 443 secure = true with DNS A record same as previous.

To summerise: When I use DNS A with secure or unsecure stream. Signalling is OK but is does not stream. It looks the same as with unrealwebrtcplayer.js before the NAT bug update.
In those cases I also see an active connection appear in the Live Server.
goes@tecnodes.nl
 
Posts: 0
Joined: Wed Nov 01, 2017 5:27 am

Re: Webrtc with secure sockets not working

Postby goes@tecnodes.nl » Wed Jun 20, 2018 7:47 am

To mention extra: Yesterday I hit the stated NAT issue. I got the newest unrealwebrtcplayer.js from you website yesterday. After the update the unsecure stream worked with an IP adress in the parameters.
goes@tecnodes.nl
 
Posts: 0
Joined: Wed Nov 01, 2017 5:27 am

Next

Return to Playing with WebRTC Player

Who is online

Users browsing this forum: No registered users and 1 guest

cron