ICE failed

2,072 views
Skip to first unread message

ex

unread,
Aug 1, 2017, 1:58:18 PM8/1/17
to meetecho-janus
Hi,

I'm trying to connect to a page using the streaming plugin from a computer behind a different NAT. I am just testing the app by exposing port 80 to the internet using ngrok, and I've set up a STUN and TURN server with Janus. I can connect to the media streams perfectly from the ngrok subdomain from any machine in the same LAN, but it doesn't work for a peer on a different network. A session and handle are created, but I get this error on the Janus side:

ICE failed for component 1 in stream 1, but let's give it some time... (trickle received, answer received, alert not set)
[ERR] [ice.c:janus_ice_check_failed:1544] [410742284103945] ICE failed for component 1 in stream 1...

No errors on the web browser, it stays at the 'starting' stage.
But I don't fully understand how they resolved it.

Thanks for any advice you can provide!

Lorenzo Miniero

unread,
Aug 1, 2017, 2:08:39 PM8/1/17
to meetecho-janus

ex

unread,
Aug 2, 2017, 2:52:13 PM8/2/17
to meetecho-janus
Hi Lorenzo, 

Thanks, I've been using the Admin API to debug, and have read your article thoroughly. It is still failing at the DTLS handshake, but unlike the example in the article, the public address of the client is recognized as a remote candidate. I have a STUN (and TURN, for good measure) server configured in janus.cfg and it should also be set up in janus.js


Thanks, any further insight is greatly appreciated!

Richard Phillips

unread,
Aug 2, 2017, 3:58:40 PM8/2/17
to meetecho-janus
What version of libnice are you using? 

I just spent three days debuging before getting to this: 


If using a recent libnice, try rolling back (I went back to  0.1.4.1 but will try and find something more recent that works)

Richard Phillips

unread,
Aug 3, 2017, 3:23:26 AM8/3/17
to meetecho-janus
Might not be your issue - but just to update - latest master of libnice fixed a similar but not identical problem for me.. no need to go back to 0.1.4.1 as I mentioned, just use libnice master or:

git checkout dbaf8f5ccd76089e340883887c7e08e6c04de80a

ex

unread,
Aug 3, 2017, 8:58:50 AM8/3/17
to meetecho-janus
Would my version of libnice-dev matter? 

uxmaster

unread,
Aug 4, 2017, 4:45:16 AM8/4/17
to meetecho-janus
It could matter. But you will never know, until you try.
I suggest using the version mentioned by Richard, since it seems to work well.
Message has been deleted

ex

unread,
Aug 4, 2017, 9:54:11 AM8/4/17
to meetecho-janus
I was able to get it working by specifying an IP for 1:1 mapping in the configs, even though I am not running my server as an AWS instance. However, the DTLS handshake now takes a pretty long time, even when I connect on a browser within the NAT. Thanks for your help everyone! I'll continue exploring.


On Tuesday, August 1, 2017 at 1:58:18 PM UTC-4, ex wrote:

Lorenzo Miniero

unread,
Aug 23, 2017, 8:33:18 AM8/23/17
to meetecho-janus
Are you trying with our default certificate, or one you generated on your own? If it's too large, it might exceed the MTU, and it might take time for the stack to reduce the fragmentation boundaries. Try setting the DTLS mtu in janus.cfg to something smaller, e.g., 1200. If you're using master, we already use a more conservative value.

L.
Reply all
Reply to author
Forward
0 new messages