Connection state failed when running mediasoup-broadcaster-demo

My mediasoup-broadcaster-demo client can connect to the official server (https://v3demo.mediasoup.org/), but cannot connect to my server (I deploy mediasoup-demo in AWS).
My browser client is running well, so I don’t know why c++ client is failed.

The command and logs as below:
$ SERVER_URL=https://mydomain:4443 ROOM_ID=fyog0vch build/broadcaster

welcome to mediasoup broadcaster app!
verifying that room ‘fyog0vch’ exists…
loading device…
creating Broadcaster…
creating mediasoup WebrtcTransport…
creating send transport…
createAudioTrack
createAudiosource
createPeerConnectionFactory
OnConnect
OnConnectionStateChange: connectionState: checking
OnProduce
createVideoTrack
OnProduce
press enter key to leave…OnConnectionStateChange: connectionState: failed

My server config:
webRtcTransportOptions :
{
listenIps :
[
{ ip: ‘127.0.0.1’, announcedIp: ‘public ip’ }
],

},
plainRtpTransportOptions :
{
listenIp : { ip: ‘127.0.0.1’, announcedIp: ‘public ip’ },

}

No idea right now, but you may try using your host private IP instead of “127.0.0.1”.

Thanks a lot. I forget to open the port range for UDP.

1 Like