janus-gateway-docker icon indicating copy to clipboard operation
janus-gateway-docker copied to clipboard

ICE failed for component 1 in stream 1...

Open mohammadhasanzadeh opened this issue 4 years ago • 6 comments

Hello, I get the ICE failed for component 1 in stream 1... error on the local network, My container IP is 172.18.0.2 and my host IP is 192.168.8.100, I also tested with STUN and TURN server, but error still occurs. it seems is a docker container networking error, Any ideas for this ?

mohammadhasanzadeh avatar Jan 08 '21 18:01 mohammadhasanzadeh

I fixed this issue by adding nat_1_1_mapping = "192.168.8.100" in the Janus file. I'm not sure this is the correct way, but that works.

mohammadhasanzadeh avatar Jan 16 '21 07:01 mohammadhasanzadeh

I think that because janus-gateway is in docker container, the program identifies 172.18.X.X is local ip(172.18.X.X is docker inner ip).

michkish avatar Apr 16 '21 06:04 michkish

this bug I think should resign to janus dev team, janus program did not know it was in a docker container. Your suggestion also helped me, and I suggest try set network_mode to host also can fix the bug if you use docker-compose.

michkish avatar Apr 16 '21 07:04 michkish

Yes, for my case, both of the solutions works, but I use the second workaround (network_mode).

mohammadhasanzadeh avatar Apr 16 '21 14:04 mohammadhasanzadeh

nat_1_1_mapping didn't work for me but setting network_mode to host did work - though I'm not sure why.

llspalex avatar Apr 22 '21 12:04 llspalex

Hello! Other thing worked for me - I set STUN server. It turns out, that it's important for docker, because it uses NAT. Set this parameters in janus.jcfg: stun_server = "stun.l.google.com" stun_port = 19302

alexberezin avatar May 18 '21 07:05 alexberezin