Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Don't work in Container Cloud #31

Open
hassanrahimi opened this issue Jun 2, 2024 · 1 comment
Open

Don't work in Container Cloud #31

hassanrahimi opened this issue Jun 2, 2024 · 1 comment

Comments

@hassanrahimi
Copy link

Hi bro.
I want deploy mediasoup on containers cloud , but tried any example and your example but doesn't work , all example works on cloud server , but doesn't work on cloud container , I used all IP that could to access , like , podIP , hostIP , public ip , private ip , ip , ip ... but all of them doesn't work , in webrtc chrome log is shown the iceCandidate is on checking state then disconnected
do you know how to solve my problem

these days I trying on azure container could , do you test your example on that?

best regard for you.
thanks a lot.

@miroslavpejic85
Copy link
Contributor

When ICE candidates get stuck in the "checking" state, it usually indicates that WebRTC is unable to establish a connection, likely due to incorrect network configurations or firewall restrictions.

Here are a few steps that could help solve your issue:

  1. Public IP Binding: In containerized environments, especially with Kubernetes or similar orchestration, the internal pod IPs aren't publicly accessible. Ensure that you are binding Mediasoup to the correct public IP of the host or the public-facing load balancer in front of your container.

  2. ICE Candidate Policy: Try adjusting the ICE candidate policy to ensure all types of candidates (host, relay, srflx) are gathered. In some configurations, the container might be gathering host candidates, which aren't reachable from the public internet.

  3. Port Mapping & Firewall Rules: Check your container's port mapping. Mediasoup needs both UDP and TCP ports to be exposed for WebRTC to work. Ensure your cloud provider allows traffic on the necessary ports (default 443 TCP for HTTPS, 3016 for this app, and range from 10000 to 10100 TCP/UDP for WebRTC media).

  4. Azure Specifics: When using Azure, ensure that your network security group (NSG) rules allow inbound/outbound traffic on the WebRTC ports. Azure often blocks traffic to certain ports by default, so you’ll need to explicitly allow the media traffic.

  5. Docker Networking: Containers by default operate in a private network, and you need to map their ports to the host. If you're using Kubernetes or Docker Swarm, consider using hostNetwork or proper ingress controllers to expose the Mediasoup service.

Cheers.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants