首页 > 解决方案 > 如何在公共服务器上运行 kurento/openvidu docker

问题描述

我在我的 VPS 上运行 PUBLIC_IP 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

标签: kurento

解决方案


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

官方文档

99% 的时间这是与 OPENVIDU SERVER 没有公共 IP 相关的问题。要了解更多信息,您可以查看此常见问题解答。解决这个问题的最快方法是在亚马逊部署我们现成的 OpenVidu 服务器。


推荐阅读