rtp2httpd icon indicating copy to clipboard operation
rtp2httpd copied to clipboard

3.8.2已断开连接无法释放问题

Open icetnt opened this issue 10 months ago • 4 comments

Image 如图之前3.8.0必现,3.8.1偶现,现在3.8.2又必现了,客户端均使用APTV播放,烦请大佬看下 (NAT网络环境无法使用3.7.0)

icetnt avatar Feb 04 '26 01:02 icetnt

需要提供一下单个RTSP从开始播放到断开连接的完整DEBUG日志,我分析一下

stackia avatar Feb 04 '26 05:02 stackia

13:44:22 INFO [Supervisor] Received SIGUSR1, restarting workers, sending SIGTERM to 1 workers 13:44:22 WARN [Supervisor] Worker 0 (pid 29163) exited with status 0 13:44:22 INFO [Supervisor] Restarting worker 0 13:44:22 INFO [Supervisor] Spawned worker 0 with pid 30520 13:44:22 INFO [Worker 0] Worker 0 started (pid=30520) 13:44:22 INFO [Worker 0] Listening on 0.0.0.0 port 35140 13:44:22 INFO [Worker 0] Listening on :: port 35140 13:44:22 INFO [Worker 0] Zero-copy: Using regular send (default). Enable zerocopy-on-send for better performance on supported devices. 13:44:22 INFO [Worker 0] Server initialization complete, ready to accept connections 13:44:23 INFO [Worker 0] New client 172.22.217.51:2499 requested URL: /status/sse (method: GET) 13:44:34 INFO [Worker 0] New client 172.22.33.66:59913 requested URL: /rtsp/172.222.222.22:1554/iptv/import/Tvod/iptv/001/001/ch00000000000000000000.rsc/00000_Uni.sdp (method: GET) 13:44:34 DEBUG [Worker 0] Parsed RTSP URL: rtsp://172.222.222.22:1554/iptv/import/Tvod/iptv/001/001/ch00000000000000000000.rsc/00000_Uni.sdp 13:44:34 DEBUG [Worker 0] Timezone: No TZ marker in User-Agent 13:44:34 DEBUG [Worker 0] RTSP: Parsed URL - host=172.222.222.22, port=1554, path=/iptv/import/Tvod/iptv/001/001/ch00000000000000000000.rsc/00000_Uni.sdp 13:44:34 DEBUG [Worker 0] RTSP: Setting up UDP sockets 13:44:34 DEBUG [Worker 0] RTSP: RTP socket registered with epoll 13:44:34 DEBUG [Worker 0] RTSP: RTCP socket registered with epoll 13:44:34 DEBUG [Worker 0] RTSP: UDP sockets bound to ports 16248 (RTP) and 16249 (RTCP) 13:44:34 DEBUG [Worker 0] STUN: Sent Binding Request to stun.l.google.com:19302 (attempt 1/3) 13:44:34 DEBUG [Worker 0] RTSP: Started STUN discovery before TCP connect 13:44:34 DEBUG [Worker 0] RTSP: Connection to 172.222.222.22:1554 in progress (async) 13:44:34 DEBUG [Worker 0] RTSP: Socket registered with epoll for connection completion 13:44:34 DEBUG [Worker 0] RTSP: Async connection initiated, state=1 13:44:34 INFO [Worker 0] RTSP: Connected to 172.222.222.22:1554 13:44:34 DEBUG [Worker 0] RTSP: Connection to 172.222.222.22:1554 completed successfully 13:44:34 DEBUG [Worker 0] RTSP: Prepared request: OPTIONS rtsp://172.222.222.22:1554/iptv/import/Tvod/iptv/001/001/ch00000000000000000000.rsc/00000_Uni.sdp RTSP/1.0 CSeq: 1 User-Agent: rtp2httpd/3.8.2

13:44:34 DEBUG [Worker 0] RTSP: Request sent completely (156 bytes) 13:44:34 DEBUG [Worker 0] RTSP: Request sent completely, waiting for response 13:44:34 DEBUG [Worker 0] RTSP: Server supports GET_PARAMETER for keepalive 13:44:34 DEBUG [Worker 0] RTSP: Server advertised methods: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, OPTIONS, ANNOUNCE, GET_PARAMETER, SET_PARAMETER, REDIRECT, RECORD 13:44:34 DEBUG [Worker 0] RTSP: Received complete header: RTSP/1.0 200 OK Server: ZMSS_ChinaTelcom2.2 CSeq: 1 Public: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, OPTIONS, ANNOUNCE, GET_PARAMETER, SET_PARAMETER, REDIRECT, RECORD

13:44:34 DEBUG [Worker 0] RTSP: Prepared request: DESCRIBE rtsp://172.222.222.22:1554/iptv/import/Tvod/iptv/001/001/ch00000000000000000000.rsc/00000_Uni.sdp RTSP/1.0 CSeq: 2 User-Agent: rtp2httpd/3.8.2 Accept: application/sdp

13:44:34 DEBUG [Worker 0] RTSP: Request sent completely (182 bytes) 13:44:34 DEBUG [Worker 0] RTSP: Request sent completely, waiting for response 13:44:34 DEBUG [Worker 0] RTSP: Received complete header: RTSP/1.0 200 OK Server: ZMSS_ChinaTelcom2.2 CSeq: 2 Cache-Control: no-cache Content-length: 424 Date: Wed, 04 Feb 2026 05:44:34 GMT Expires: Wed, 04 Feb 2026 05:44:34 GMT Content-Type: application/sdp Content-Base: rtsp://172.222.222.22:1554/iptv/import/Tvod/iptv/001/001/ch00000000000000000000.rsc/00000_Uni.sdp/

13:44:34 DEBUG [Worker 0] RTSP: Response body data (state=6): v=0 o=- 2209339155 0 IN IP4 172.222.222.22 s=enviviob31 c=IN IP4 0.0.0.0 b=AS:9058 t=0 0 a=x-ZMSSForceUnicast a=control:* a=x-zmssvbr:0 a=x-ZMSSTimeShiftLift:10800 a=x-ZMSSCCBitrate:9058 a=x-ZMSSShmFile:ch00000000000000000000_001 a=x-ZMSSProcessMode:2 a=range:clock=19700101T000000.00Z-19700101T000000.00Z a=x-ZMSSCCStartTime:20250711T020448 m=video 0 RTP/AVP 33 a=rtpmap:33 MP2T/90000 a=control:trackID=2 13:44:34 DEBUG [Worker 0] RTSP: Waiting for STUN response before sending SETUP 13:44:34 INFO [Worker 0] STUN: Discovered mapped address 39.66.241.189:50454 13:44:34 INFO [Worker 0] RTSP: STUN discovery completed, mapped RTP port: 50454 13:44:34 DEBUG [Worker 0] RTSP: Using STUN mapped ports 50454-50455 for SETUP Transport 13:44:34 DEBUG [Worker 0] RTSP: Prepared request: SETUP rtsp://172.222.222.22:1554/iptv/import/Tvod/iptv/001/001/ch00000000000000000000.rsc/00000_Uni.sdp RTSP/1.0 CSeq: 3 User-Agent: rtp2httpd/3.8.2 Transport: MP2T/RTP/TCP;unicast;interleaved=0-1,MP2T/TCP;unicast;interleaved=0-1,RTP/AVP/TCP;unicast;interleaved=0-1,MP2T/RTP/UDP;unicast;client_port=50454-50455,MP2T/UDP;unicast;client_port=50454-50455,RTP/AVP;unicast;client_port=50454-50455

13:44:34 DEBUG [Worker 0] RTSP: Request sent completely (398 bytes) 13:44:34 DEBUG [Worker 0] RTSP: Request sent completely, waiting for response 13:44:34 DEBUG [Worker 0] RTSP: Parsing server transport response: MP2T/RTP/UDP;unicast;source=172.222.222.22;client_port=50454-50455;server_port=32370-32371 13:44:34 INFO [Worker 0] RTSP: Server selected MP2T/RTP transport 13:44:34 INFO [Worker 0] RTSP: Using UDP transport 13:44:34 DEBUG [Worker 0] RTSP: Server UDP source address: 172.222.222.22 13:44:34 DEBUG [Worker 0] RTSP: Server RTP/RTCP ports: 32370/32371 13:44:34 DEBUG [Worker 0] RTSP: Server confirmed client ports: 50454/50455 13:44:34 DEBUG [Worker 0] RTSP: Sent NAT probe packets to 172.222.222.22:32370/32371 13:44:34 DEBUG [Worker 0] RTSP: Received complete header: RTSP/1.0 200 OK Server: ZMSS_ChinaTelcom2.2 CSeq: 3 Session: 7449433266456619827 Date: Wed, 04 Feb 2026 05:44:34 GMT Expires: Wed, 04 Feb 2026 05:44:34 GMT Transport: MP2T/RTP/UDP;unicast;source=172.222.222.22;client_port=50454-50455;server_port=32370-32371

13:44:34 DEBUG [Worker 0] RTSP: Prepared request: PLAY rtsp://172.222.222.22:1554/iptv/import/Tvod/iptv/001/001/ch00000000000000000000.rsc/00000_Uni.sdp RTSP/1.0 CSeq: 4 User-Agent: rtp2httpd/3.8.2 Session: 7449433266456619827

13:44:34 DEBUG [Worker 0] RTSP: Request sent completely (183 bytes) 13:44:34 DEBUG [Worker 0] RTSP: Request sent completely, waiting for response 13:44:34 DEBUG [Worker 0] RTSP: Received complete header: RTSP/1.0 200 OK Server: ZMSS_ChinaTelcom2.2 CSeq: 4 Session: 7449433266456619827 Range: clock=20260204T054434.40Z- Scale: 1.0 RTP-Info: url=rtsp://172.222.222.22:32370/iptv/import/Tvod/iptv/001/001/ch00000000000000000000.rsc/00000_Uni.sdp

13:44:34 INFO [Worker 0] RTSP: Stream started successfully 13:44:34 DEBUG [Worker 0] RTP reorder: Init complete, base_seq=57271 (8 packets collected) 13:44:34 DEBUG [Worker 0] RTP reorder: Recovered 7 out-of-order packets (seq 57274-57280) 13:44:43 DEBUG [Worker 0] Client connection error: Connection reset by peer 13:44:43 INFO [Worker 0] RTSP: Cleanup requested in state 13, initiating TEARDOWN 13:44:43 DEBUG [Worker 0] RTSP: Prepared request: TEARDOWN rtsp://172.222.222.22:1554/iptv/import/Tvod/iptv/001/001/ch00000000000000000000.rsc/00000_Uni.sdp RTSP/1.0 CSeq: 5 User-Agent: rtp2httpd/3.8.2 Session: 7449433266456619827

13:44:43 DEBUG [Worker 0] RTSP: TEARDOWN request prepared, will send asynchronously 13:44:43 DEBUG [Worker 0] RTSP: TEARDOWN initiated, waiting for async completion 13:44:43 DEBUG [Worker 0] Stream: RTSP async TEARDOWN initiated, deferring final cleanup 13:44:43 DEBUG [Worker 0] Worker: Async RTSP TEARDOWN initiated, deferring connection cleanup 13:44:43 DEBUG [Worker 0] Worker: Deferred cleanup - waiting for RTSP TEARDOWN completion 13:44:43 WARN [Supervisor] Worker 0 (pid 30520) killed by signal 11 13:44:43 INFO [Supervisor] Restarting worker 0 13:44:43 INFO [Supervisor] Spawned worker 0 with pid 30838 13:44:43 INFO [Worker 0] Worker 0 started (pid=30838) 13:44:43 INFO [Worker 0] Listening on 0.0.0.0 port 35140 13:44:43 INFO [Worker 0] Listening on :: port 35140 13:44:43 INFO [Worker 0] Zero-copy: Using regular send (default). Enable zerocopy-on-send for better performance on supported devices. 13:44:43 INFO [Worker 0] Server initialization complete, ready to accept connections 13:44:44 INFO [Worker 0] New client 172.22.217.51:2483 requested URL: /status/sse (method: GET)

icetnt avatar Feb 04 '26 05:02 icetnt

以上是重启工作进程后,播放单个频道到停止播放后的完整debug日志,停止播放后控制台一直如截图所示:

Image

icetnt avatar Feb 04 '26 05:02 icetnt

确认是 bug,v3.8.3 已修复,感谢反馈

stackia avatar Feb 04 '26 11:02 stackia