带有Docker的mediasoup v3 [英] mediasoup v3 with Docker
问题描述
我正在尝试在docker中运行 2 WebRTC示例(使用mediasoup)
Im trying to run an 2 WebRTC example(using mediasoup) in docker
在跨一组实例进行视频通话时,我想运行两台服务器!
I want to run two servers as I am working on video calling across a set of instances!
我的错误:
您是否看到此错误:createProducerTransport null错误:由于地址不可用,端口绑定失败[transport:udp,ip:'172.17.0.1',port:50517,try:1/50000]
Have you seen this Error: createProducerTransport null Error: port bind failed due to address not available [transport:udp, ip:'172.17.0.1', port:50517, attempt:1/50000]
我认为这与设置docker网络有关?
docker-compose.yml
version: "3"
services:
db:
image: mysql
restart: always
app:
image: app
build: .
ports:
- "1440:443"
- "2000-2020"
- "80:8080"
depends_on:
- db
app2:
image: app
build: .
ports:
- "1441:443"
- "2000-2020"
- "81:8080"
depends_on:
- db
Dockerfile
FROM node:12
WORKDIR /app
COPY . .
CMD npm start
推荐答案
出于测试目的,应将rtc的最小和最大端口设置为2000和2020.我猜你也没有转发这些端口.在docker-compose中,使用 2000-2020:2000-2020
并确保正确设置 listenIps
.
You should set your rtc min and max port to 2000 and 2020 for testing purpose. Also you are not forwarding these ports I guess. In docker-compose use 2000-2020:2000-2020
Also make sure to set your listenIps
properly.
这篇关于带有Docker的mediasoup v3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!