sdk sample webrtc_publisher, ssl, websocket, does not work

Problems with Unreal Media Server

sdk sample webrtc_publisher, ssl, websocket, does not work

Postby goodyes » Sun Jan 20, 2019 9:52 am

First of all I start to write here cause I dont find any category called somelike "configuring webrtc publisher" or sdk samples etc.

I'm unable to run properly SDK sample WebRTC_Publisher
(located in /UMediaSDK\Unreal Streaming Technologies SDK v13.0\WebRTC\WebRTC_Publisher)

I read: viewtopic.php?f=29&t=3570 but no success
Note that in admin's reply, point 2) about pem files, my ssl provider only provide me the cert key in a .key (txt) format. the SSL is provided to me in .perm format (a txt as well) but the key not.


I will explain all that I have, and whatthe fails are, with sample urls codes etc..

I run all the sample WebRTC_Publisher (I will note as sdk publisher ) in a windows 10 server, running ip of: 89.129.183.221

I have a domain web: s.vid.eus (not the production vid.eus, just the subdomain s.vid.eus, currently I use the s. as for dev test purposes)

I have a certificate from don dominio, who provide me several files:
certificate.pem (I uploaded for you guys a copy in txt of these, look at http://s.vid.eus/certificate.pem.txt)
certificate.pfx (look at http://s.vid.eus/ certificate.pfx.txt)
certificate.key.pem (look at http://s.vid.eus/ certificate.key.pem.txt)
certificate.key (look at http://s.vid.eus/ certificate.key.txt)

On Unreal configuration tool, under server properties I set:
SSL Certificate path: C:\Production\stream\certificate.pem
SSL Private key path: C:\Production\stream\certificate.key.pem

see: https://s.vid.eus/unrealproperties.jpg

I have properly set the NAT on my router
see: https://s.vid.eus/nat.jpg

if you run in your smartphone (with camera of course) the web:

https://s.vid.eus/publisher/publish.html

after the navigator promp for you to enabled the website to use your camera, once ok, you'll see the video on the display --> OK

Once you click on on PUBLISH button

I get: Error connecting to Unreal Media Server
see: https://s.vid.eus/scr190120170148.android.chrome.png
goodyes
 
Posts: 0
Joined: Sun Jan 20, 2019 9:12 am

Re: sdk sample webrtc_publisher, ssl, websocket, does not wo

Postby goodyes » Sun Jan 20, 2019 10:37 am

To better test on a computer (not a smarphone) without camera, just close all chrome processe,and start by command line chrome again, this time with camera emulation: use:
C:\Portable\GoogleChromePortable\App\Chrome-bin\chrome.exe --use-fake-device-for-media-stream --use-file-for-fake-video-capture="C:\Production\stream\www\v.y4m" --allow-file-access

SIMPLY REPLACE "C:\Production\stream\www\v.y4m" with some of your local path video
you can download some y4m videos from: https://media.xiph.org/video/derf/y4m/

If you launch above you'll see below scrs:
https://s.vid.eus/scr_chrome_emu_cam.jpg
goodyes
 
Posts: 0
Joined: Sun Jan 20, 2019 9:12 am

Re: sdk sample webrtc_publisher, ssl, websocket, does not wo

Postby admin » Sun Jan 20, 2019 10:47 am

First of all, you need to make sure your certificate is OK.
If it's not OK, the Application event log will have an entry about it, after you restart Unreal Media Server.

Then, follow the instructions on publishing page, and this thread:
viewtopic.php?f=29&t=3570
admin
Site Admin
 
Posts: 1021
Joined: Fri Aug 21, 2009 10:13 am

Re: sdk sample webrtc_publisher, ssl, websocket, does not wo

Postby goodyes » Sun Jan 20, 2019 10:51 am

if I use port 444 instead of 443 (as somewhere I read , to do better, in order o avoid conflict betwwen unreal and other apps using port 444, like I think .. IIS¿?)

now I get a different error:
https://s.vid.eus/scr_usingport_444.jpg

second one on the right of chrome report:
Error in connection establishment: net::ERR_CERT_COMMON_NAME_INVALID

so, still unable to properly run the sample webrtc_publisher
goodyes
 
Posts: 0
Joined: Sun Jan 20, 2019 9:12 am

Re: sdk sample webrtc_publisher, ssl, websocket, does not wo

Postby goodyes » Sun Jan 20, 2019 11:00 am

I think thatthe problem is that, I have a single domain (s.vid.eus) SSL certificate,
and on the web (SDK webrtc publisher sample) https://s.vid.eus/publisher/publish.html
IP address of Unreal Media Server: 89.129.183.221
And by chrome reports, it is trying to connect to: WebSocket connection to 'wss://89.129.183.221:444/webrtc_publish/randomport/udp/arcade2
which says: Error in connection establishment: net::ERR_CERT_COMMON_NAME_INVALID

Argg, not sure, take a look at:
https://support.google.com/chrome/a/ans ... 1219?hl=en
which says "For Chrome 58 and later, only the subjectAlternativeName extension, not commonName, is used to match the domain name and site certificate"

Not sure what to do, I'm a litle frustrated
goodyes
 
Posts: 0
Joined: Sun Jan 20, 2019 9:12 am

Re: sdk sample webrtc_publisher, ssl, websocket, does not wo

Postby admin » Sun Jan 20, 2019 11:14 am

You must use your domain name, not the IP address, in your web page.
This is explained at https://secure28.securewebsession.com/u ... blish.html
Did you read the forum threads I have pointed you to?
This is all clearly explained there.
admin
Site Admin
 
Posts: 1021
Joined: Fri Aug 21, 2009 10:13 am

Re: sdk sample webrtc_publisher, ssl, websocket, does not wo

Postby goodyes » Sun Jan 20, 2019 12:42 pm

Yes I read all, and you can check via the screenshots I sent and post to this forum.

If I use port 5130 and use secure websocket then code 1006 ERR_CONNECTION_RESET
https://s.vid.eus/ssl_resolver.jpg

If I use port 444 and use secure websocket then code 1006 but ERR_CERT_COMMON_NAME_INVALID

eeyyyy a moment
you pointed to: This is explained at https://secure28.securewebsession.com/u ... blish.html
and there says a ting not listed on sdk publish :
"If you use secure websocket then you need to specify domain name instead of IP address in the server IP address field. Also, if you use secure websocket AND your server is behind NAT router relative to publishing computer, then you need to modify unrealwebrtcpublisher.js according to this forum thread."

I will check, but you must update the publish.html file located on sdk as does not said what you said on last web
goodyes
 
Posts: 0
Joined: Sun Jan 20, 2019 9:12 am

Re: sdk sample webrtc_publisher, ssl, websocket, does not wo

Postby goodyes » Sun Jan 20, 2019 12:52 pm

I used domain name (without http, without https) with the appropiatte subdomain, so: s.vid.eus
and still same errors:

in port 5130
https://s.vid.eus/err_ip_s.vid.eus_port_5130.jpg

in port 444 now I get other message:

Live broadcast with this Alias no found in the configuration
but as you can check on scr below, Alias is ok (I think)

https://s.vid.eus/err_ssl.jpg
goodyes
 
Posts: 0
Joined: Sun Jan 20, 2019 9:12 am

Re: sdk sample webrtc_publisher, ssl, websocket, does not wo

Postby goodyes » Sun Jan 20, 2019 12:56 pm

Let me apply and read
Domain name AND Server behind NAT - fix for javascript files
viewtopic.php?f=29&t=3563
goodyes
 
Posts: 0
Joined: Sun Jan 20, 2019 9:12 am

Re: sdk sample webrtc_publisher, ssl, websocket, does not wo

Postby goodyes » Sun Jan 20, 2019 1:04 pm

I changed unrealwebrtcpublisher.js
if ((candidate.search(ipAddress) !== -1) || !useSingleWebRTCPort || (ipAddress == "127.0.0.1")) {
alert('return candidate to call');
return candidate;
}
bu nothings happens, still same error, alert('return candidate to call'); is not called

Again, Broadcast with this alias not found if using port 444)
please check and see alerts (like logs)
https://s.vid.eus/publisher/publish.html
goodyes
 
Posts: 0
Joined: Sun Jan 20, 2019 9:12 am

Next

Return to Experience and troubleshooting

Who is online

Users browsing this forum: No registered users and 1 guest