Reserved SRT port (mpegts_ingest.yml) closes permanently after an unclean publisher disconnect

vsl

New Member
WCS build: 5.3.483
OS: Ubuntu 24.04, Azure Standard_D8as_v5, heap 16 GB
Topology: CDN origin (SRT ingest) + edges (WebRTC playback); the problem is on the origin
Impact: production. During a live event an encoder's connection dropped twice (most likely a network interruption at the venue); each time the stream could not be restored on the same port, only a WCS restart brought it back.

Summary
We publish SRT (MPEG-TS) to ports reserved in mpegts_ingest.yml. When the publisher's session ends, WCS ends the reserved stream ("Stopped by session disconnect") and about 16 s later closes the reserved UDP port. The port is never reopened: the encoder keeps trying to reconnect, but nothing listens until WCS is restarted. We reproduced it by stopping and restarting the encoder's SRT output; in production the trigger was a dropped connection.

Configuration
flashphoner.properties (relevant part, mpegts_stream_timeout not set):
Code:
cdn_enabled=true
cdn_role=origin
media_port_from=31001
media_port_to=32000
mpegts_reserved_port_from=39990
mpegts_reserved_port_to=40000
mpegts_ingest.yml (srt1 and srt3 identical, ports 39992 and 39996):
Code:
streams:
  srt2:
    port: 39994
    transport: srt
    timeout: 90000
    hasAudio: true
    hasVideo: true
    maxTimeStampDiff: 90000

Steps to reproduce
  1. Start WCS. 39992, 39994 and 39996 all listen (ss -uanp).
  2. Publish to 39994 with vMix 29.0.0.50 (SRT Caller, latency 100 ms, H264 1920x1080 2.5 Mbps, AAC 192 kbps). Playback works.
  3. Disable the SRT output in vMix. In our run the encoder had a short stall with a timestamp discontinuity just before.
  4. Enable it again (after ~18 s, and again after ~1.5 min). vMix tries to reconnect to 39994.
Expected: the reserved stream accepts the publisher again on 39994 (reserved streams are documented to exist permanently).
Actual: the stream is gone and 39994 is closed ~16 s after the session ended. Reconnect packets reach the server, but nothing listens. Only systemctl restart webcallserver restores the port.

Evidence (4 Dec 2026, UTC)
Encoder (vMix log):
Code:
10:11:06  SRT.Caller.NewSend: <server>:39994   connected
10:14:59  TS.Discontinuity / TS.SkipVideo      short stall
10:15:02  SRT.Shutdown                         output stopped
10:15:20  SRT.Startup, no NewSend              never connects
10:16:36  SRT.Startup, no NewSend              never connects
Server, srt2 ingest polled every 2 s from /?action=stat&format=prometheus&groups=publish_streams:
Code:
10:14:58 srt2 video=2320176 fps=30  sock39994=1
10:15:00 srt2 video=299032  fps=5   sock39994=1  <- stall
10:15:02 srt2 not listed            sock39994=1  <- session ended
10:15:18 srt2 not listed            sock39994=0  <- port closed
CDR (stream created at WCS start, ended when the session ended):
Code:
2026-12-04 06:21:20;MPEGTS;srt2;fba2f578-a104-4b26-a8a0-bab7f8028aeb;03:53:41;FAILED;Stopped by session disconnect;;PUBLISH;1;srt://10.30.1.4:39994-3e1837da-0b57-4cdb-afb7-370630e612e4;
2026-12-04 06:21:20;srt://10.30.1.4:39994-3e1837da-0b57-4cdb-afb7-370630e612e4;DISCONNECTED;null;14021;
Two minutes later: 39994 closed, reconnect packets still arriving, srt2 missing from find_all:
Code:
$ ss -uanp | grep 3999
UNCONN 0 0 10.30.1.4:39992 0.0.0.0:* users:(("java",...))
UNCONN 0 0 10.30.1.4:39996 0.0.0.0:* users:(("java",...))
$ timeout 5 tcpdump -n -i any udp port 39994 | wc -l
4
$ curl -X POST http://127.0.0.1:8081/rest-api/mpegts/find_all
[ {"localStreamName":"srt1",...}, {"localStreamName":"srt3",...} ]
flashphoner.log (level error) at that moment:
Code:
ERROR PullAgent - API-ASYNC-pool-2-thread-NNN Stream failed
ERROR PullAgent - Thread-NN Agent activity thread working with state FAILED
 
Top