We are running a pixel streaming server along with an Unreal packaged game on a cloud VM, and attempting to stream it into a React component on a web frontend. We are running into issues only on certain networks (such as universities, corpnet etc.), where the stream does not show. We have tried both STUN and the TURN variants on the server side, and TURN also results in the same problem. We were using Chrome browser, and the server runs Unreal Engine inside a docker container on a Linux host.
Our service is set up in a way that while there is a VM running the game and the pixel streaming server, there is a reverse proxy that sits in front and redirects traffic through a specific port. We have noticed that if we expose the public IP address of the actual VM and try to access the stream, it works in most of the settings, whereas the reverse proxy fails to work more often. (That said, there are still some corporate networks where the raw IP address does not work as well).
On the networks where the failures happen, we tried to access the WebRTC logs (through chrome://webrtc-internals/
, and the salient info looks like this:
With STUN server:
{
"time": "3/19/2024, 12:47:08 PM",
"type": "signalingstatechange",
"value": "stable"
},
{
"time": "3/19/2024, 12:47:08 PM",
"type": "iceconnectionstatechange",
"value": "checking"
},
{
"time": "3/19/2024, 12:47:08 PM",
"type": "connectionstatechange",
"value": "connecting"
}
With TURN servers:
{
"time": "3/19/2024, 12:39:23 PM",
"type": "signalingstatechange",
"value": "stable"
},
{
"time": "3/19/2024, 12:39:23 PM",
"type": "iceconnectionstatechange",
"value": "failed"
},
{
"time": "3/19/2024, 12:39:23 PM",
"type": "connectionstatechange",
"value": "failed"
},
{
"time": "3/19/2024, 12:39:33 PM",
"type": "icecandidateerror",
"value": "url: stun:20.62.249.41:19303\naddress: 0.0.0.x\nport: 64008\nhost_candidate: 0.0.0.x:64008\nerror_text: STUN binding request timed out.\nerror_code: 701"
},
{
"time": "3/19/2024, 12:39:33 PM",
"type": "icecandidateerror",
"value": "url: turn:20.62.249.41:19303?transport=udp\naddress: 0.0.0.x\nport: 64008\nhost_candidate: 0.0.0.x:64008\nerror_text: TURN allocate request timed out.\nerror_code: 701"
},
{
"time": "3/19/2024, 12:39:33 PM",
"type": "icegatheringstatechange",
"value": "complete"
}
Any advice on how to resolve this, or how to debug this further would be very helpful. Thanks in advance!