Wowza Community

WebRTC + Letsencrypt publishing failed

Has anybody tried WebRTC with Letsencrypt SSL?

I can’t make it successful when publishing from Wowza WebRTC Publish example. The session is just shutdown right after created without any error

Here is my logs:

2019-08-24      11:02:39        EDT     comment server  INFO    200     -       WebSocketSession.create[1292521447]     -       -       -       28.514  -       -      --       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -      -
2019-08-24      11:02:39        EDT     comment server  INFO    200     -       MediaCasterStreamValidator.init[webrtc/_definst_]: Started      -       -       -      28.879   -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -      --       -       -       -
2019-08-24      11:02:40        EDT     app-start       application     INFO    200     _definst_       webrtc/_definst_        -       -       -       28.917  -      --       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -      --
2019-08-24      11:02:40        EDT     create  webrtc  INFO    200     -       -       _defaultVHost_  webrtc  _definst_       0.02    -       80      null    222.252.113.23  webrtc  -       known   1640286463      0       0       1       0       0       0       myStream        -       -       -       -       -       null    null   -null    -
2019-08-24      11:02:40        EDT     comment server  INFO    200     -       WebRTCCommands.sendOffer[myStream]: audioCodec:opus     _defaultVHost_  webrtc  _definst_       28.957  -       80      null    222.252.113.23  webrtc  -       known   1640286463      0       0       -       -       -       -       -       -       -      --       -       -       -       -       null    -
2019-08-24      11:02:40        EDT     comment server  INFO    200     -       WebRTCRTPHandler.bind: port:1   _defaultVHost_  webrtc  _definst_       28.958  -      80       null    222.252.113.23  webrtc  -       known   1640286463      0       0       -       -       -       -       -       -       -       -       -       -      --       -       null    -
2019-08-24      11:02:40        EDT     comment server  INFO    200     -       WebRTCRTPHandler.bind: port:2   _defaultVHost_  webrtc  _definst_       28.958  -      80       null    222.252.113.23  webrtc  -       known   1640286463      0       0       -       -       -       -       -       -       -       -       -       -      --       -       null    -
2019-08-24      11:02:40        EDT     comment server  INFO    200     -       WebRTCCommands.sendOffer[myStream]: videoCodec:H264     _defaultVHost_  webrtc  _definst_       28.959  -       80      null    222.252.113.23  webrtc  -       known   1640286463      0       0       -       -       -       -       -       -       -      --       -       -       -       -       null    -
2019-08-24      11:02:40        EDT     comment server  INFO    200     -       WebRTCRTPHandler.bind: port:3   _defaultVHost_  webrtc  _definst_       28.959  -      80       null    222.252.113.23  webrtc  -       known   1640286463      0       0       -       -       -       -       -       -       -       -       -       -      --       -       null    -
2019-08-24      11:02:40        EDT     comment server  INFO    200     -       WebRTCRTPHandler.bind: port:4   _defaultVHost_  webrtc  _definst_       28.959  -      80       null    222.252.113.23  webrtc  -       known   1640286463      0       0       -       -       -       -       -       -       -       -       -       -      --       -       null    -
2019-08-24      11:02:40        EDT     comment server  INFO    200     -       WebRTCCommands.sendOffer[myStream]: iceCandidate:candidate:0 1 TCP 50 173.233.67.86 1935 typ host generation 0  _defaultVHost_  webrtc  _definst_       28.959  -       80      null    222.252.113.23  webrtc  -       known   1640286463      0       0      --       -       -       -       -       -       -       -       -       -       -       -       null    -
2019-08-24      11:02:40        EDT     comment server  INFO    200     -       WebSocketSession.destroy[1292521447]: source:client status:-1 description:Unknown      --       -       29.274  -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -      --       -       -       -       -       -
2019-08-24      11:02:50        EDT     comment server  INFO    200     -       WebRTCSession.shutdown[1640286463]: Shutdown WebRTC session.    -       -       -      38.979   -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -      --       -       -       -
2019-08-24      11:02:50        EDT     unpublish       webrtc  INFO    200     -       -       _defaultVHost_  webrtc  _definst_       10.049  -       80      null   222.252.113.23   webrtc  -       known   1640286463      0       0       1       0       0       0       myStream        -       -       -       -       -       null   null     -       null    -
2019-08-24      11:02:50        EDT     destroy stream  INFO    200     -       -       _defaultVHost_  webrtc  _definst_       10.045  -       80      null    222.252.113.23  webrtc  -       known   1640286463      0       0       1       0       0       0       myStream        -       -       -       -       -       null    null   -null    -

This will need to be updated in your VHost.xml file in the for Default SSL Streaming in along with if this is different with the new keystore.

You will need to copy the new keystore created with your letsencrypt certificates to this directory.

If you’d like to submit a support ticket with a copy of the letsencrypt keystore along with the password, we’d be willing to examine it’s contents to ensure it’s correctly built. The following article describes this process in detail:

https://www.wowza.com/docs/how-to-request-an-ssl-certificate-from-a-certificate-authority

Thanks for your answer. That is my mistake in configuration, not relevant to SSL thing

In the webrtc/Application.xml, I set the IceCandidateIpAddresses with my SSL bound port 1935, that’s why the WebRTC session destroyed right after Wowza sending iceCandidate offer to client

<WebRTC>
	...
	<!--  IP address, transport, and port used for WebRTC streaming. -->
	<!--TCP format: [wowza-streaming-engine-external-ip-address],tcp,[port] -->
	<!--UDP format: [wowza-streaming-engine-external-ip-address],udp -->
	<IceCandidateIpAddresses>127.0.0.1,tcp,1935</IceCandidateIpAddresses>
	...
</WebRTC>