Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection to RTMP server drops after 30 minutes #1531

Closed
emad-elsaid opened this issue Jun 5, 2020 · 2 comments
Closed

Connection to RTMP server drops after 30 minutes #1531

emad-elsaid opened this issue Jun 5, 2020 · 2 comments

Comments

@emad-elsaid
Copy link

emad-elsaid commented Jun 5, 2020

I have a personal setup that depends on nginx-rtmp-module inside a docker container running on ubuntu server.

When I connect to it using OBS studio it constantly stops receiving the steam after 30 minutes on the clock.

My dockerfile content and all related files that builds the image could be found here:
https://github.com/emad-elsaid/restreamer

The ubuntu server version and docker engine versions are:

Distributor ID: Ubuntu
Description:    Ubuntu 18.04.4 LTS
Release:        18.04
Codename:       bionic

containerd containerd.io 1.2.13 7ad184331fa3e55e52b890ea95e65ba581ae3429
Docker version 19.03.11, build 42e35e61f3

and this is what I see in the logs:

xxx.xxx.xxx.xxx [05/Jun/2020:10:14:06 +0000] PUBLISH "live" "" "" - 1350180807 409 "" "FMLE/3.0 (compatible; FMSc/1.0)" (29m 59s)

What happens in OBS is that is displays a red square instead of the green now that shows the speed, speed is kb/s: 0 and Dropped frames start to count up and I can't stop the steam.

I tried this container on an Archlinux laptop and OBS on the same machine and it passes the 30 minutes mark.

I posted this as an issue here in case someone faced the same problem may point me in the right direction.

I tried to check for TCP parameters in /proc/sys/net/ipv4/tcp* but keep alive value is 2 hours, plus the socket is used not idle so it's not related.

I tried a new server from Hetzner completly clean with only the above setup and had the same issue.

I asked Hetzner support about any limitations that could be applied to the networking devices and they said there is nothing that can cause this issue in their networking devices.

Also if you have any thoughts about what could be the cause please let me know I can verify it on this setup.

@emad-elsaid
Copy link
Author

I used tcpdump to dump the packets coming to this port

tcpdump -nnSX port 1935

The output stops mid-dumping as follows

19:30:33.008473 IP xxx.xxx.x.xxx.xxxxx > xxx.xxx.xxx.xxx.1935: Flags [.], seq 2945698647:2945700095, ack 3788053714, win 1190, options [nop,nop,TS val 961857358 ecr 68373870], length 1448
        0x0000:  4500 05dc 488a 4000 3006 a4df 6d29 03bb  E...H.@.0...m)..
        0x0010:  5fd9 86f5 4376 078f af93 cb57 e1c9 1cd2  _...Cv.....W....
        0x0020:  8010 04a6 25e6 0000 0101 080a 3954 c74e  ....%.......9T.N
        0x0030:  0413 4d6e 3c73 ef05 fa91 80b4 e59f 91dc  ..Mn<s..........
        0x0040:  1f28 1e5f ab71 96a2 e8f6 a776 d2be 5ad8  .(._.q.....v..Z.
        0x0050:  b3fd 8ea9 d21b 5790 6b3b acc2 59d1 6879  ......W.k;..Y.hy
        0x0060:  e2dc 5da4 7a8a 0bb9 8025 8457 3ba1 4a95  ..].z....%.W;.J.
        0x0070:  575c 62ac d8c3 fedb 6beb 3060 b528 bb98  W\b.....k.0`.(..
        0x0080:  6091 0993 c827 39de 4c1e 24ce 9252 78a4  `....'9.L.$..Rx.
        0x0090:  2703 7efa 9825 a756 2c99 8003 d173 099f  '.~..%.V,....s..
        0x00a0:  fdef 63da 26ce 790d f654 1acb 66d6 df8e  ..c.&.y..T..f...
        0x00b0:  fd72 827e 63a4 43ef 9de5 403a 722f 9701  .r.~c.C...@:r/..
        0x00c0:  1bc3 280a 2297 d9a1 461c 8dd2 516a 81ca  ..(."...F...Qj..
        0x00d0:  a480 e78f f812 fefd 6e87 50d4 f488 b286  ........n.P.....
        0x00e0:  dbaf 8630 6c41 7a8f 4bc1 8590 70e3 b0f4  ...0lAz.K...p...
        0x00f0:  8fe0 3aa1 c324 f7fc 9401 a85d 8ab4 91e3  ..:..$.....]....
        0x0100:  e931 d729 24d0 a700 9f8a 7786 f744 80ea  .1.)$.....w..D..
        0x0110:  c3bf 780f 023d 4dc3 cc6a aa33 07d6 8942  ..x..=M..j.3...B
        0x0120:  b446 8f61 8fad 6540 a7b1 1d74 1116 accd  .F.a..e@...t....
        0x0130:  7fd0 c621 f709 c2a2 468f e172 0825 e979  ...!....F..r.%.y
        0x0140:  f928 100a d882 8b29 0026 d339 2048 f7ce  .(.....).&.9.H..
        0x0150:  5de4 2b85 bde9 ee32 3c31 c4bb 8a4d 87bd  ].+....2<1...M..
        0x0160:  3a30 29fc 8605 076f 991f 6330 3952 bc1c  :0)....o..c09R..
        0x0170:  aa0b fe81 aa9a c47f 6790 030d 840e f1ae  ........g.......
        0x0180:  cf1c bb4f ea07 6d94 937f d071 bd59 cb86  ...O..m....q.Y..
        0x0190:  8832 a507 d8b3 e23d 26bb 4545 b0b9 2522  .2.....=&.EE..%"
        0x01a0:  d9b5 4a50 4d7c 47c2 a2f5 f057 86d4 b0fc  ..JPM|G....W....
        0x01b0:  c0cb 2924 6f27 e3dc 5fc0 88bb 9077 e5cb  ..)$o'.._....w..
        0x01c0:  7a7b bb8f 60a2 5071 a29d 9882 7b02 7fa9  z{..`.Pq....{...
        0x01d0:  a4bd 9175 28b8 276c 3e95 e974 4154 0f0a  ...u(.'l>..tAT..
        0x01e0:  383c 6850 4eb7 4fe8 9472 8b34 4d55 4e96  8<hPN.O..r.4MUN.
        0x01f0:  cc03 8d90 5d24 6b11 9fbd 2963 633b 382a  ....]$k...)cc;8*
        0x0200:  0178 30bc a67c bde4 58da 0b0f ca7e bf53  .x0..|..X....~.S
        0x0210:  b4a6 8547 6525 eab3 d31f 6cdb 366f ba95  ...Ge%....l.6o..
        0x0220:  615a f66a ea3c b304 0b2b 1830 3074 24ed  aZ.j.<...+.00t$.
        0x0230:  0da9 74b2 d67a 7dd6 2c96 5254 73ec 9e5d  ..t..z}.,.RTs..]
        0x0240:  ac53 203c 115e a9ad 99ec 0269 9075 4dde  .S.<.^.....i.uM.
        0x0250:  2c00 abd7 354d f1e4 1403 a89e d8c8 762b  ,...5M........v+
        0x0260:  eed7 9707 4e6d 9a1f edcb 6045 6187 ec36  ....Nm....`Ea..6
        0x0270:  09ee 1a88 7f59 fbc7 914e 7f2e 0205 eebe  .....Y...N......
        0x0280:  0a72 4a25 5ffb 6013 bb7a 30c0 89c5 65e5  .rJ%_.`..z0...e.
        0x0290:  1c6d 06c7 6fb7 e05f 4f3d 29e4 d4d8 280f  .m..o.._O=)...(.
        0x02a0:  be11 f2b4 d7fb 90be 8307 1cbc a633 c6d6  .............3..
        0x02b0:  e18a 767d 0b34 e1bb bc34 1e0d cbd4 7aed  ..v}.4...4....z.
        0x02c0:  7490 ae74 af46 741d 63f0 f637 f6f3 d0fd  t..t.Ft.c..7....
        0x02d0:  4c83 8880 e8fe 63e6 4380 1710 bb5b 721a  L.....c.C....[r.
        0x02e0:  ee65 108f 216c 686c 2e44 7df3 df88 25f5  .e..!lhl.D}...%.
        0x02f0:  ae83 e975 0db1 3847 c137 0364 f3eb 7452  ...u..8G.7.d..tR
        0x0300:  1527 9953 0649 4820 cd9e 2dd8 fa7e 502b  .'.S.IH...-..~P+
        0x0310:  587c 14a9 0608 d5e4 e479 ed41 6518 7716  X|.......y.Ae.w.
        0x0320:  adde 0925 a5c6 9e39 d730 e7ab 27a0 b673  ...%...9.0..'..s
        0x0330:  4181 53be 24ae 53a5 dbb1 71e1 9907 8d2e  A.S.$.S...q.....
        0x0340:  6ea8 5812 e226 4a30 ae23 4e36 6e8a e41e  n.X..&J0.#N6n...
        0x0350:  30c1 1022 6ab4 0a1e 7787 49c5 f62b b88f  0.."j...w.I..+..
        0x0360:  0b57 8803 2d7d 70c1 7e4b cabd 0725 e10a  .W..-}p.~K...%..
        0x0370:  1bd3 e1ea f646 e576 cecb a441 8ba5 822d  .....F.v...A...-
        0x0380:  bf7d 8e65 6c8f de59 2717 5f88 d858 cc87  .}.el..Y'._..X..
        0x0390:  692d b137 64f0 847e e840 6d5f 0b80 0bb1  i-.7d..~.@m_....
        0x03a0:  3916 f033 bf24 3e2b 0df3 76f7 4791 ab44  9..3.$>+..v.G..D
        0x03b0:  e6d9 e7c9 be61 ce65 57c4 06df 5556 5584  .....a.eW...UVU.
        0x03c0:  bcf8 e587 b55f 53be fcca 35e5 fb4d bfe6  ....._S...5..M..
        0x03d0:  4b43 742a 8d2d 999e 6cf9 6a21 068e b2cf  KCt*.-..l.j!....
        0x03e0:  c677 2932 fba3 7fbc 57e6 5330 b3aa e7c5  .w)2....W.S0....
        0x03f0:  69e3 fa4b c99a 5ae0 e402 0930 ccc3 1fb1  i..K..Z....0....
        0x0400:  82bc 3454 d4b9 082c 6a2e 812f 241f 2082  ..4T...,j../$...
        0x0410:  ec6c d89c 5cad 69cc a15c 3ddf daaf af21  .l..\.i..\=....!
        0x0420:  9748 57df e0eb ab99 ca9b 7df5 4f65 6737  .HW.......}.Oeg7
        0x0430:  cff8 cf63 368f cc86 83bb c0ca 2228 33df  ...c6......."(3.
        0x0440:  f269 78fb cf75 b931 3f6e e7fb 6cea 5304  .ix..u.1?n..l.S.
        0x0450:  0151 2a65 a54b 1f26 1478 c237 9056 469c  .Q*e.K.&.x.7.VF.
        0x0460:  11d4 c089 7679 0c72 9caf 1d66 4526 6384  ....vy.r...fE&c.
        0x0470:  23ef dd2c f2d1 fc11 d5ed 03dc 3748 a154  #..,........7H.T
        0x0480:  1aca 173e 4593 a1df 7dfa e52c 21f4 3698  ...>E...}..,!.6.
        0x0490:  ed17 d1fd 86ca 5009 8a77 302e 056b 328b  ......P..w0..k2.
        0x04a0:  98fb 0af1 5b08 632d 0ded d294 a340 7a7e  ....[.c-.....@z~
        0x04b0:  58a4 91d3 d271 4894 50a0 fa57 482b 8ccc  X....qH.P..WH+..
        0x04c0:  6579 5e50 4d8f baef 34

@emad-elsaid
Copy link
Author

I tried to do stream with Xsplit and it passed the 30 minutes mark.
Also tried to stream with OBS from my PC (windows) to my laptop (Archlinux) on the same network and it worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant