Kanishk Gupta
Kanishk Gupta

Reputation: 31

Kurento-rtsp2webrtc is not working on AWS

I had followed the instruction of kurento-rtsp2webrtc tutorial to stream RTSP in website. I can run this demo on local network environment successfully.

When I try to run it on AWS EC2 with VPN everything works fine, but unfortunately without VPN it returns "oniceconnectionstatechange -> failed" on a browser console log.

And the browser console log is:

    This appears to be Chrome
    Use freeice
    Local icecandidate {"candidate":"candidate:1270274445 1 udp 
    2113937151 192.168.1.11 48697 typ host generation 0 ufrag KK6A 
    network-cost 50","sdpMid":"video","sdpMLineIndex":0}
    Local icecandidate {"candidate":"candidate:842163049 1 udp 
    1677729535 110.225.223.220 48697 typ srflx raddr 192.168.1.11 
    rport 48697 generation 0 ufrag KK6A network-cost 50","sdpMid":"video","sdpMLineIndex":0}
    PlayerEndpoint-->WebRtcEndpoint connection established
    oniceconnectionstatechange -> checking
    icegatheringstate -> complete
    Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:1 1 UDP 2013266431 fe80::8b6:83ff:fee5:39dc 46158 typ host","sdpMLineIndex":0,"sdpMid":"video"}
    Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:2 1 TCP 1019217151 fe80::8b6:83ff:fee5:39dc 9 typ host tcptype active","sdpMLineIndex":0,"sdpMid":"video"}
    Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:3 1 TCP 1015022847 fe80::8b6:83ff:fee5:39dc 28457 typ host tcptype passive","sdpMLineIndex":0,"sdpMid":"video"}
    Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:4 1 UDP 2013266431 172.30.0.128 40094 typ host","sdpMLineIndex":0,"sdpMid":"video"}
    Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:5 1 TCP 1019216383 172.30.0.128 9 typ host tcptype active","sdpMLineIndex":0,"sdpMid":"video"}
    Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:6 1 TCP 1015022079 172.30.0.128 49260 typ host tcptype passive","sdpMLineIndex":0,"sdpMid":"video"}
    Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:1 2 UDP 2013266430 fe80::8b6:83ff:fee5:39dc 1406 typ host","sdpMLineIndex":0,"sdpMid":"video"}
    Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:2 2 TCP 1019217150 fe80::8b6:83ff:fee5:39dc 9 typ host tcptype active","sdpMLineIndex":0,"sdpMid":"video"}
    `enter code here`Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:3 2 TCP 1015022846 fe80::8b6:83ff:fee5:39dc 60510 typ host tcptype passive","sdpMLineIndex":0,"sdpMid":"video"}
    Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:4 2 UDP 2013266430 172.30.0.128 53802 typ host","sdpMLineIndex":0,"sdpMid":"video"}
    Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:5 2 TCP 1019216382 172.30.0.128 9 typ host tcptype active","sdpMLineIndex":0,"sdpMid":"video"}
    Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:6 2 TCP 1015022078 172.30.0.128 1025 typ host tcptype passive","sdpMLineIndex":0,"sdpMid":"video"}
    Player playing ...
    oniceconnectionstatechange -> failed
    icegatheringstate -> complete

I also set a stun server information (serverip:8000) in WebRtcEndPoint.conf.ini, but the issue still there.

Upvotes: 0

Views: 362

Answers (1)

Kanishk Gupta
Kanishk Gupta

Reputation: 31

Issue was solved by installing Coturn server and using both STUN and TURN servers with opening of ports at AWS as given in :- https://doc-kurento.readthedocs.io/en/6.6.1/faq.html

Upvotes: 1

Related Questions