Unable to stream IP camera stream when running the docker in Intranet environment, but able stream from the same machine without any issues

Hi,

We are bringing up the IP camera based openvidu service to view the streams in the browser through angular app.

Here is the setup configurations:

OS: Ubuntu 18:04

Docker image run: sudo docker run -p 4443:4443 --rm -e DOMAIN_OR_PUBLIC_IP=172.16.30.92 -e OPENVIDU_SECRET=*********** openvidu/openvidu-server-kms:2.21.0

RTSP Stream publisher: Spring boot application to publish the IP cameras(mvn package exec:java)

Client Application: Angular(insecure) application(npm openvidu-browser) (ng serve --host 172.16.30.92)

Note: All the services (Docker, Spring boot app & Angular application) is running on the same box with subnet-ip(172.16.30.92)

Testing process:

Chrome browser from the same box(172.16.30.32) can able to see the streams without any issue the console log output for success case is as follows

  • Event ‘streamCreated’ triggered by ‘Session’ StreamEvent {hasBeenPrevented: false, cancelable: false, target: Session, type: ‘streamCreated’, stream: Stream, …}
  • OpenViduLogger.js:246 Subscribing to ipc_IPCAM_rtsp_TU2T_172_16_30_212_554_Streaming_channels_102
  • live-stream-videos.component.ts:75 Session Has Connected Successfully
  • OpenViduLogger.js:246 ‘Subscriber’ (str_IPC_Txik_ipc_IPCAM_rtsp_M3BJ_172_16_30_216_554_Streaming_channels_102) successfully subscribed
  • OpenViduLogger.js:246 Subscribed correctly to ipc_IPCAM_rtsp_M3BJ_172_16_30_216_554_Streaming_channels_102
  • OpenViduLogger.js:219 IceConnectionState of RTCPeerConnection be51f57a-d757-4db5-8df6-92a94da15bee (str_IPC_Txik_ipc_IPCAM_rtsp_M3BJ_172_16_30_216_554_Streaming_channels_102) change to “checking”
  • OpenViduLogger.js:219 IceConnectionState of RTCPeerConnection be51f57a-d757-4db5-8df6-92a94da15bee (str_IPC_Txik_ipc_IPCAM_rtsp_M3BJ_172_16_30_216_554_Streaming_channels_102) change to “connected”

Chrome browser from other box in the same sub net(172.16.30.75), unable to see the stream getting the error here is the log output image

This issue has been fixed with the following changes

Docker image run: sudo docker run -p 4443:4443 --rm –network host -e DOMAIN_OR_PUBLIC_IP=172.16.30.92 -e OPENVIDU_SECRET=*********** openvidu/openvidu-server-kms:2.21.0

Note: Use the host network

Remember that openvidu/openvidu-server-kms is for local development:

For production environments you should use official deployment instructions: