ant-media/Ant-Media-Server

Cluster Edge-Origin Reconnect

mekya opened this issue · 0 comments

mekya commented

Steps to Reproduce

  1. Publish stream to the Transcoder (ant1.mlan in my case).
  2. Play it from the Edge (ant2.mlan).
  3. Get the source video ports from the MongoDB server:
> db.StreamInfo.find()
{ "_id" : ObjectId("5ca353dad9f02f00f9565767"), "className" : "io.antmedia.cluster.StreamInfo", "streamId" : "bench_v10_1", "height" : 640, "width" : 1138, "videoBitrate" : 600000, "audioBitrate" : 64000, "videoRTimebase" : 20, "audioRTimebase" : 48000, "host" : "10.10.175.52", "videoPort" : 35549, "audioPort" : 43967 }
{ "_id" : ObjectId("5ca353dad9f02f00f9565766"), "className" : "io.antmedia.cluster.StreamInfo", "streamId" : "bench_v10_1", "height" : 480, "width" : 854, "videoBitrate" : 150000, "audioBitrate" : 64000, "videoRTimebase" : 20, "audioRTimebase" : 48000, "host" : "10.10.175.52", "videoPort" : 44893, "audioPort" : 38373 }```
4. Block these ports on the Transcoder:
```ant1.mlan:~ # iptables -A INPUT -p tcp --destination-port 35549 -j DROP
ant1.mlan:~ # iptables -A INPUT -p tcp --destination-port 44893 -j DROP
ant1.mlan:~ # iptables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-A INPUT -p tcp -m tcp --dport 35549 -j DROP
-A INPUT -p tcp -m tcp --dport 44893 -j DROP```
5. Video stop playing from the Edge as expected.
6. Remove blocking rules from the Transcoder:
```ant1.mlan:~ # iptables -D INPUT -p tcp --destination-port 35549 -j DROP
ant1.mlan:~ # iptables -D INPUT -p tcp --destination-port 44893 -j DROP
ant1.mlan:~ # iptables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT```
7. Video still unavailable from the Edge despite the fact of open ports.
8. Restart the Edge server (docker container in my case)
```root@ant2:~# docker restart antmedia-edge1```
9. Video stream became available from the Edge.

*Expected Result*

After restoring connectivity between the Edge and the Transcoder video stream should play normally.

*Actual Result*

After a temporary loss of connection, the stream became permanently unavailable from the Edge. (edited)