Hi, (Note: Translation may be awkward)
Error Message:
Error: Error: port bind failed due to address not available [protocol:udp, ip:‘54.79.222.78’, port:43548, attempt:1/10000] [method:router.createWebRtcTransport]
at createTransport (file:///home/ubuntu/media/src/team-voice.js:90:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Socket. (file:///home/ubuntu/media/src/team-voice.js:44:23)
code: (note: LISTENIP is ec2 public ip)
async function createTransport(router) {
const options = {
listenInfos: [
{
protocol: “udp”,
ip: LISTENIP,
},
],
enableUdp: true,
enableTcp: true,
preferUdp: true,
};
try {
return await router.createWebRtcTransport(options);
} } catch (err) {
throw new Error(err);
}
}
I opened the 40000-49999 udp port on ec2.
worker code:
this.worker = await mediasoup.createWorker({
rtcMinPort: 40000,
rtcMaxPort: 49999,
});
Why doesn’t it work?