STUN/TURN servers

Hi, everyone
I am using SFU architecture where one is the producer and N are consumers (Broadcasting). After a complete exchange of information, the browser shows an error of “WebRTC: ICE failed” even though I am also using STUN and TURN servers.
Locally everything works fine.
please address how I can resolve this issue,

That generally has to do with availability over WAN, are you blocking the port or re-using it by any chance?
Ex. it’s not running multiple port 443 services that would error.

STUN and TURN stuff is just a wild guess on the part of browser. You don’t need to pay any particular attention to it. Concentrate on the fact that ICE failed, period. Mediasoup supports ICE-lite: it takes the connections on a publicly announced address and serves as a STUN server itself. Make sure that the clients can connect to it on the supposedly open ports. Look at the browser webrtc internals: do logs show that the browser received any response from the mediasoup server? If not or unclear, bind some simple UDP (or/and TCP) tester like netcat to one of the open ports on the server and make sure that you can reach it from the client computer. Providing this works, mediasoup server should answer ICE binding requests and send back client’s public address that it sees. Look at the ICE candidates: is there any familiar public address, and what happens when the browser pairs it to mediasoup’s own candidates and tries to connect.

Yeah let me do some logs and I will also share them with you
besides this when I try to connect without the STUN/TURN server browser shows me an error to add stun and turn the servers .

@CosmosisT Hi, Locally media-soup SFU (1-n) is working fine. But on server When I try to consume the stream, especially on the consumer.connect(DLS parameters) server crashes
Please help me out here

Are you saying you got the Client running but the server isn’t working it crashes?

Or are you saying you had both Client/Server working locally but now hosted remotely it’s not?

yes remotely it is not working when I try to connect consumer transport. it crashes the server
consumerTransport.connect({dtlsParameters}) crashes the server

Wrap a try/catch around that and see what the error is.

following is the output:
see consumer-transport-connect-error which is undefined

Well that’s no fun, not sure why it’s throwing undefined error. Maybe someone can chime in on that one.

thank you for your time but still unable to detect the issue

@CosmosisT I found this log. Please see my logs

Help me how i can resolve this issue

I solved it. it was problem related to linux distro. Everything works fine on Ubuntu distro. previously i was getting these issues on centos

Hi, now i want to scale my server for 100k active users. So how i can scale mediasoup server for 100k users ?

as this is stateless so can i use kubernetes to deploy its multiple instances ?