Deploying Sample Apps on Azure

Hi All,

I’m trying to familiarise myself with all the components for a production system. I’ve manage to deploy the sample dev OV server in docker running in a VM, with the ov-basic-node application server, the ov-hello-world client app and the nginx SSL proxy in docker contain using the self-certs.

This all works fine and I’m able to connect from multiple devices on my local LAN.

I have then tried to recreate this on a Debian box on Azure. I’ve configured the following ports:

I’m able to connect to the client app server, start a session and access the application service and I’m seeing connections on all four services. The local video is looping back in the browser however their is no remote video.

The client javascript console reports the following errors:

StreamManager of Stream str_CAM_K1dT_con_KBQd7larO7 (Subscriber) did not trigger "streamPlaying" event in 4000 ms
OpenViduLogger.warn @ OpenViduLogger.ts:257
(anonymous) @ StreamManager.ts:609
setTimeout (async)
StreamManager.activateStreamPlayingEventExceptionTimeout @ StreamManager.ts:600
StreamManager.addPlayEventToFirstVideo @ StreamManager.ts:513
StreamManager.pushNewStreamManagerVideo @ StreamManager.ts:567
StreamManager.createVideoElement @ StreamManager.ts:366
Session.subscribe @ Session.ts:315
(anonymous) @ app.js:12
arrowHandler @ EventDispatcher.ts:70
emitEvent @ EventEmitter.js:394
afterConnectionFound @ Session.ts:873
(anonymous) @ Session.ts:890
Promise.then (async)
Session.onParticipantPublished @ Session.ts:884
(anonymous) @ jsonrpcclient.js:154
emit @ events.js:153
RpcBuilder.decode @ index.js:602
transportMessage @ index.js:194
OpenViduLogger.ts:257 IceConnectionState of RTCPeerConnection d2292f19-df28-4586-89e2-e896aba275a4 (publisher of con_WpaVINbnJh) change to "disconnected". Possible network disconnection
OpenViduLogger.warn @ OpenViduLogger.ts:257
(anonymous) @ WebRtcPeer.ts:527
OpenViduLogger.ts:225 [ICE_CONNECTION_DISCONNECTED] Handling ICE_CONNECTION_DISCONNECTED event. Waiting for ICE to be restored and reconnect stream str_CAM_F311_con_WpaVINbnJh (Publisher) if not possible
OpenViduLogger.ts:257 [ICE_CONNECTION_DISCONNECTED] ICE connection of stream str_CAM_F311_con_WpaVINbnJh (Publisher) couldn't be restored after ICE_CONNECTION_DISCONNECTED event. Current ICE connection state after 4000 ms: disconnected
OpenViduLogger.warn @ OpenViduLogger.ts:257
(anonymous) @ Stream.ts:1570
Promise.then (async)
Stream.onIceConnectionDisconnected @ Stream.ts:1549
Stream.onIceConnectionStateExceptionHandler @ Stream.ts:1527
(anonymous) @ WebRtcPeer.ts:528
OpenViduLogger.ts:225 [ICE_CONNECTION_DISCONNECTED] Reconnecting stream str_CAM_F311_con_WpaVINbnJh (Publisher) after event ICE_CONNECTION_DISCONNECTED
OpenViduLogger.ts:225 [ICE_CONNECTION_DISCONNECTED] Trying to reconnect stream str_CAM_F311_con_WpaVINbnJh (Publisher) and the websocket is opened
OpenViduLogger.ts:246 Outbound RTCPeerConnection with id [d2292f19-df28-4586-89e2-e896aba275a4] from 'Stream' with id [str_CAM_F311_con_WpaVINbnJh] is now closed
OpenViduLogger.ts:246 [createOffer] Video sender Degradation Preference set: balanced
OpenViduLogger.ts:246 'Publisher' (str_CAM_F311_con_WpaVINbnJh) successfully reconnected to session
OpenViduLogger.ts:225 IceConnectionState of RTCPeerConnection 264338e0-0f53-4ef6-8368-a4536a162254 (publisher of con_WpaVINbnJh) change to "checking"
OpenViduLogger.ts:267 [ICE_CONNECTION_DISCONNECTED] Stream str_CAM_F311_con_WpaVINbnJh (Publisher) failed to reconnect after ICE_CONNECTION_DISCONNECTED. Current ICE connection state: checking

So any suggestion as to what might be the cause of “(Subscriber) did not trigger “streamPlaying” event in 4000 ms” ?

kind regards

So I’ve now tried to deploy the production version OpenVidu following:
On premises - OpenVidu Docs

I’ve tried

  1. self-cert with an IP address
  2. self-cert with domain (browser would not allow connection)
  3. letencrypt with domain

both 1 and 3 seemed to work fine, all services can up, I was able to log into dashboard, however when used the “Test the connection” button I got the following output:

KMS event [IceComponentStateChanged]: -> endpoint: str_CAM_DYiS_con_UmzQk0Afe2 (publisher) | state: GATHERING | componentId: 1 | streamId: 1 | timestamp: 1669290401135

KMS event [IceComponentStateChanged]: -> endpoint: str_CAM_DYiS_con_UmzQk0Afe2 (publisher) | state: GATHERING | componentId: 2 | streamId: 1 | timestamp: 1669290401167

KMS event [IceComponentStateChanged]: -> endpoint: str_CAM_DYiS_con_UmzQk0Afe2 (publisher) | state: CONNECTING | componentId: 1 | streamId: 1 | timestamp: 1669290401198

KMS event [IceGatheringDone] -> endpoint: str_CAM_DYiS_con_UmzQk0Afe2 (publisher) | timestamp: 1669290403221

KMS event [IceComponentStateChanged]: -> endpoint: str_CAM_DYiS_con_UmzQk0Afe2 (publisher) | state: FAILED | componentId: 1 | streamId: 1 | timestamp: 1669290408413

the hour glass spins for about two minutes and eventually says test complete… however I don’t see a retry on the above error.

KMS event [IceComponentStateChanged]: -> endpoint: str_CAM_DYiS_con_UmzQk0Afe2 (publisher) | state: FAILED | componentId: 1 | streamId: 1 | timestamp: 166929040841

so, I’m thinking this could be some sort of network port issue, however I’ve opened all the ports required.

and suggestion on how to diagnose further would be gratefully received :slight_smile:

Problem resolved.

It was a case of Newby configuring firewall.

the eagle eyed among you will have spotted some “!” along side the some of the port filters.

I had mistakenly (however not explicitly covered in openvidu docs) set the port range for both Source and Destination port ranges. I’ve now learnt that you typically use a wildcard (*) for Source port numbers and only specify the destination ports.

once I resolved this, everything worked fine.