如何在 public 服务器上 运行 kurento/openvidu docker

How to run kurento/openvidu docker on public server

我 运行 在 PUBLIC_IP 我的 VPS 上使用 kurento vs openvidu 服务器。

docker run -d -p 3333:3333 -e openvidu.secret=YOUR_SECRET -e openvidu.publicurl=https://PUBLIC_IP:3333 -e openvidu.cdr=true -e server.port=3333 -e KMS_STUN_IP=stun.l.google.com -e KMS_STUN_PORT=19302 -e KMS_TURN_URL=myuser:mypass@54.54.54.54:3478 openvidu/openvidu-server-kms:2.7.0

看起来一切正常,但双方都看不到远程视频...

nodejs 应用程序的命令是:

 node server.js PUBLIC_IP:3333 YOUR_SECRET

来自浏览器应用程序的控制台日志:

Remote ICE candidate received {candidate: "candidate:1 2 UDP 2013266430 172.17.0.2 6004 typ host", component: undefined, foundation: undefined, ip: undefined, port: undefined, …}
jsonrpcclient.js:146 Received request: {"method":"iceCandidate","params":{"endpointName":"puld42tsstkztcho","sdpMLineIndex":0,"sdpMid":"0","candidate":"candidate:2 2 TCP 1015021822 172.17.0.2 9 typ host tcptype active"}}
WebRtcPeer.ts:298 Remote ICE candidate received {candidate: "candidate:2 2 TCP 1015021822 172.17.0.2 9 typ host tcptype active", component: undefined, foundation: undefined, ip: undefined, port: undefined, …}
jsonrpcclient.js:146 Received request: {"method":"iceCandidate","params":{"endpointName":"puld42tsstkztcho","sdpMLineIndex":1,"sdpMid":"1","candidate":"candidate:2 2 TCP 1015021822 172.17.0.2 9 typ host tcptype active"}}
WebRtcPeer.ts:298 Remote ICE candidate received {candidate: "candidate:2 2 TCP 1015021822 172.17.0.2 9 typ host tcptype active", component: undefined, foundation: undefined, ip: undefined, port: undefined, …}
WebRtcStats.ts:86 WebRtc stats not enabled
2jsonrpcclient.js:183 Response: {"sessionId":"k0s2bv7dut5enqhsbn00o4hn6s"}
jsonrpcclient.js:146 Received request: {"method":"iceCandidate","params":{"endpointName":"puld42tsstkztcho","sdpMLineIndex":1,"sdpMid":"1","candidate":"candidate:3 2 TCP 1010827518 172.17.0.2 4295 typ host tcptype passive"}}
WebRtcPeer.ts:298 Remote ICE candidate received {candidate: "candidate:3 2 TCP 1010827518 172.17.0.2 4295 typ host tcptype passive", component: undefined, foundation: undefined, ip: undefined, port: undefined, …}
jsonrpcclient.js:146 Received request: {"method":"iceCandidate","params":{"endpointName":"puld42tsstkztcho","sdpMLineIndex":0,"sdpMid":"0","candidate":"candidate:3 2 TCP 1010827518 172.17.0.2 4295 typ host tcptype passive"}}
WebRtcPeer.ts:298 Remote ICE candidate received {candidate: "candidate:3 2 TCP 1010827518 172.17.0.2 4295 typ host tcptype passive", component: undefined, foundation: undefined, ip: undefined, port: undefined, …}
2jsonrpcclient.js:183 Response: {"sessionId":"k0s2bv7dut5enqhsbn00o4hn6s"}
StreamManager.ts:126 Your local 'Stream' with id [puld42tsstkztcho_CAMERA_XMVGR] video is now playing

您需要运行 在具有可用public IP 地址的主机中打开Vidu。这可以通过 NAT 配置等直接完成。

来自official documentation

99% of the time this is a problem related with OPENVIDU SERVER NOT HAVING A PUBLIC IP. To learn more about it, you can check this FAQ. The quickest solution to this problem is to deploy our ready-to-use OpenVidu Server in Amazon.