canyanio / janus-gateway-docker

Docker image for the Janus WebRTC Server
Other
160 stars 64 forks source link

ICE failed for component 1 in stream 1... #16

Open mohammadhasanzadeh opened 3 years ago

mohammadhasanzadeh commented 3 years ago

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 commented 3 years ago

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.

michkish commented 3 years ago

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 commented 3 years ago

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.

mohammadhasanzadeh commented 3 years ago

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

llspalex commented 3 years ago

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

alexberezin commented 3 years ago

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