WebRTC: ICE failed, add a TURN server and see about:webrtc for more details

88 views
Skip to first unread message

Carlo

unread,
Aug 31, 2020, 12:28:18 PM8/31/20
to Ant Media Server
Good day,

I am now getting the following error when trying to stream "WebRTC: ICE failed, add a TURN server and see about:webrtc for more details". No code updates or server updates have been applied and this was working fine a couple of days ago. Already tried by restarting/rebooting AMS but still same behavior.

Please advise and thank you in advance.

Enterprise Edition 1.7.2 20190602_1617

pandeypr...@gmail.com

unread,
Aug 31, 2020, 4:15:50 PM8/31/20
to Ant Media Server
HI ! I am also facing the same problem . In javascript sdk when I click on start publishing, I can't successfully publish the video. It shows:
stream id in init peer connection: stream1 close stream id: stream1 
which comes from 
this.initPeerConnection = function(streamId, dataChannelMode) {
if (thiz.remotePeerConnection[streamId] == null)
{
var closedStreamId = streamId;
console.log("stream id in init peer connection: " + streamId + " close stream id: " + closedStreamId);


I did not change any code , it was working fine till a couple of days back. But suddenly this problem started creeping in and now it's not working at all.

Matt Lowe

unread,
Aug 31, 2020, 6:26:11 PM8/31/20
to Ant Media Server
Same here - I got an email back from support who suggested this 

I attempted method 2 but it did not work. I'm not 100% sure on how to accomplish method 1. 

Let me first explain it then offer a solution for you.
We use google stun server in our product to receive public ice candidates. But nowadays, sometimes it doesn't provide them as it should. We have two solutions for this. In short term I recommend second one. Here they are:

1. Ant Media Server uses Google Stun Server:
stun:stun.l.google.com:19302

You can change it from /usr/local/antmedia/webapps/APP_NAME/WEB-INF/red5-web.properties with this setting:
settings.webrtc.stunServerURI

2. For public IP candidates please edit the following line in /usr/local/antmedia/conf/red5.properties
server.name=SERVER_PUBLIC_IP_ADDRESS

Please add the following line
settings.replaceCandidateAddrWithServerAddr=true
into the following file
/usr/local/antmedia/webapps/APP_NAME/WEB-INF/red5-web.properties
and restart the server.


Enes Kuluk

unread,
Sep 1, 2020, 4:58:07 AM9/1/20
to Ant Media Server
Could you try the following please?
Please add the following line
settings.webrtc.stunServerURI=stun:stun1.l.google.com:19302
into the following file
/usr/local/antmedia/webapps/APP_NAME/WEB-INF/red5-web.properties
and restart the server.

Then try again, please.

1 Eylül 2020 Salı tarihinde saat 01:26:11 UTC+3 itibarıyla Matt Lowe şunları yazdı:

Matt Lowe

unread,
Sep 1, 2020, 12:43:03 PM9/1/20
to Ant Media Server
Hey Enes, just made the change and will see how stable it is today.

To others, I also tried this last night and it seemed to work

settings.webrtc.stunServerURI=stun:stun.counterpath.com

Which is another public stun server

Thank you! 

Reply all
Reply to author
Forward
0 new messages