srs SRT:推流时hooks回调失败

xiozqbni  于 2022-10-27  发布在  其他
关注(0)|答案(4)|浏览(461)

开启SRT和hooks,错误日志如下:

docker logs -f srs-server|grep 139ng145
03:33:29.679184/srs*E:SRT.d: SND-DROPPED 4 packets - lost delaying for 1022ms
03:35:23.059938/SRT:RcvQ:worker*E:SRT.c: IPE: ACK node overwritten when acknowledging 1162 (ack extracted: 1004308388)
03:36:52.965435/SRT:RcvQ:worker*E:SRT.c: IPE: ACK node overwritten when acknowledging 5908 (ack extracted: 1004325252)
03:37:52.910634/SRT:RcvQ:worker*E:SRT.c: IPE: ACK node overwritten when acknowledging 9105 (ack extracted: 1004336704)
03:38:22.886780/SRT:RcvQ:worker*E:SRT.c: IPE: ACK node overwritten when acknowledging 10711 (ack extracted: 1004342323)
[2022-03-04 03:43:20.303][Trace][1][139ng145] RTMP client ip=127.0.0.1:48970, fd=15
[2022-03-04 03:43:20.305][Trace][1][139ng145] complex handshake success
[2022-03-04 03:43:20.305][Trace][1][139ng145] connect app, tcUrl=rtmp://127.0.0.1/live, pageUrl=, swfUrl=, schema=rtmp, vhost=127.0.0.1, port=1935, app=live, args=(obj)
[2022-03-04 03:43:20.305][Trace][1][139ng145] edge-srs ip=172.17.0.4, version=4.0.241, pid=1, id=0
[2022-03-04 03:43:20.305][Trace][1][139ng145] protocol in.buffer=0, in.ack=0, out.ack=0, in.chunk=128, out.chunk=128
[2022-03-04 03:43:20.307][Trace][1][139ng145] client identified, type=flash-publish, vhost=127.0.0.1, app=live, stream=livestream, param=?secret=d6d2be37&vhost=127.0.0.1, duration=0ms
[2022-03-04 03:43:20.324][Trace][1][139ng145] http: on_connect ok, client_id=139ng145, url=http://mgmt.srs.local:2022/terraform/v1/hooks/srs/verify, request={"server_id":"vid-1odw09d","action":"on_connect","client_id":"139ng145","ip":"127.0.0.1","vhost":"__defaultVhost__","app":"live","stream":"livestream","param":"?secret=d6d2be37&vhost=127.0.0.1","tcUrl":"rtmp://127.0.0.1/live","pageUrl":""}, response={"code":0}
[2022-03-04 03:43:20.325][Trace][1][139ng145] connected stream, tcUrl=rtmp://127.0.0.1/live, pageUrl=, swfUrl=, schema=rtmp, vhost=__defaultVhost__, port=1935, app=live, stream=livestream, param=?secret=d6d2be37&vhost=127.0.0.1, args=(obj)
[2022-03-04 03:43:20.325][Trace][1][139ng145] source url=/live/livestream, ip=127.0.0.1, cache=1, is_edge=0, source_id=/h03lh218
[2022-03-04 03:43:20.335][Trace][1][139ng145] http: on_publish ok, client_id=139ng145, url=http://mgmt.srs.local:2022/terraform/v1/hooks/srs/verify, request={"server_id":"vid-1odw09d","action":"on_publish","client_id":"139ng145","ip":"127.0.0.1","vhost":"__defaultVhost__","app":"live","tcUrl":"rtmp://127.0.0.1/live","stream":"livestream","param":"?secret=d6d2be37&vhost=127.0.0.1"}, response={"code":0}
[2022-03-04 03:43:20.336][Trace][1][139ng145] RTC bridge from RTMP, rtmp2rtc=1, keep_bframe=0, merge_nalus=0
[2022-03-04 03:43:20.341][Trace][1][139ng145] hls: win=60000ms, frag=10000ms, prefix=, path=./objs/nginx/html, m3u8=[app]/[stream].m3u8, ts=[app]/[stream]-[seq].ts, aof=2.00, floor=0, clean=1, waitk=1, dispose=0ms, dts_directly=1
[2022-03-04 03:43:20.341][Trace][1][139ng145] ignore disabled exec for vhost=__defaultVhost__
[2022-03-04 03:43:20.341][Trace][1][139ng145] start publish mr=0/350, p1stpt=20000, pnt=5000, tcp_nodelay=0
[2022-03-04 03:43:20.834][Trace][1][139ng145] 4B audio sh, codec(10, profile=LC, 2channels, 0kbps, 48000HZ), flv(16bits, 2channels, 44100HZ)
[2022-03-04 03:43:20.838][Trace][1][139ng145] 44B video sh,  codec(7, profile=Main, level=3.1, 1280x720, 0kbps, 0.0fps, 0.0s)
[2022-03-04 03:43:21.105][Trace][1][139ng145] -> HLS time=652477103ms, sno=15, ts=livestream-14.ts, dur=8ms, dva=0p
[2022-03-04 03:43:31.013][Trace][1][139ng145] -> HLS time=662620958ms, sno=15, ts=livestream-14.ts, dur=7382ms, dva=0p
[2022-03-04 03:43:40.356][Trace][1][139ng145] <- CPB time=0, okbps=1,0,0, ikbps=1162,0,0, mr=0/350, p1stpt=20000, pnt=5000
[2022-03-04 03:43:41.028][Trace][1][139ng145] -> HLS time=672651231ms, sno=16, ts=livestream-15.ts, dur=5372ms, dva=0p
[2022-03-04 03:43:45.449][Trace][1][139ng145] <- CPB time=19816087, okbps=1,0,0, ikbps=1175,0,0, mr=0/350, p1stpt=20000, pnt=5000
[2022-03-04 03:43:51.249][Trace][1][139ng145] -> HLS time=682869366ms, sno=17, ts=livestream-16.ts, dur=400ms, dva=0p
[2022-03-04 03:44:01.112][Trace][1][139ng145] <- CPB time=35470534, okbps=0,0,0, ikbps=1111,1120,0, mr=0/350, p1stpt=20000, pnt=5000
[2022-03-04 03:44:01.391][Trace][1][139ng145] -> HLS time=693037553ms, sno=17, ts=livestream-16.ts, dur=7240ms, dva=0p
[2022-03-04 03:44:04.550][Warn][1][139ng145][62] ignore task failed code=1018 : callback on_hls http://mgmt.srs.local:2022/terraform/v1/hooks/srs/hls : http: post http://mgmt.srs.local:2022/terraform/v1/hooks/srs/hls with {"server_id":"vid-1odw09d","action":"on_hls","client_id":"139ng145","ip":"127.0.0.1","vhost":"__defaultVhost__","app":"live","stream":"livestream","param":"?secret=d6d2be37&vhost=127.0.0.1","duration":10.01,"cwd":"/usr/local/srs","file":"./objs/nginx/html/live/livestream-14.ts","url":"live/livestream-14.ts","m3u8":"./objs/nginx/html/live/livestream.m3u8","m3u8_url":"live/livestream.m3u8","seq_no":14}, status=0, res= : http: client post : http: connect server : http: tcp connect http mgmt.srs.local:2022 to=30000ms, rto=30000ms : tcp: connect mgmt.srs.local:2022 to=30000ms : connect to mgmt.srs.local:2022
thread [1][139ng145]: call() [src/app/srs_app_hls.cpp:122][errno=62]
thread [1][139ng145]: on_hls() [src/app/srs_app_http_hooks.cpp:351][errno=62]
thread [1][139ng145]: do_post() [src/app/srs_app_http_hooks.cpp:505][errno=62]
thread [1][139ng145]: post() [src/protocol/srs_service_http_client.cpp:322][errno=62]
thread [1][139ng145]: connect() [src/protocol/srs_service_http_client.cpp:447][errno=62]
thread [1][139ng145]: connect() [src/protocol/srs_service_st.cpp:642][errno=62]
thread [1][139ng145]: srs_tcp_connect() [src/protocol/srs_service_st.cpp:193][errno=62]
03:44:22.508279/SRT:RcvQ:worker*E:SRT.c: IPE: ACK node overwritten when acknowledging 3144 (ack extracted: 748914324)

这会导致无法录制,录制是依赖HLS的回调触发的。

46qrfjad

46qrfjad1#

看了下,业务后台没有收到回调,应该是没有发起回调。

whlutmcx

whlutmcx2#

这个看起来和流没啥问题,回调的srs_tcp_connect报错了

sxpgvts3

sxpgvts33#

和流没关系,但是它导致了超时,也就是没有调用hooks。

qkf9rpyu

qkf9rpyu4#

我这里触发hls的hooks的时候也遇到了,但不是很频繁,会导致录制丢ts文件
[2022-04-08 15:22:45.731][Warn][74296][533c88o0][4] ignore task failed code=1018 : callback on_hls http://127.0.0.1:5811/liveservice-transport/srs/api/hls : http: post http://127.0.0.1:5811/liveservice-transport/srs/api/hls with {"server_id":"vid-5hy2245","action":"on_hls","client_id":"533c88o0","ip":"192.168.0.1","vhost":"dvr.com","app":"AN185323544007323MR","stream":"lr7057756096120146869343411012","param":"?nvhost=dvr.com&auth_key=86400-1649402406-1-cd37bbeee4af7c20e143abdafbd82c52","duration":12.26,"cwd":"/data/home/push/nvsrs","file":"./objs/nginx/html/AN185323544007323MR/lr7057756096120146869343411012-21.ts","url":"AN185323544007323MR/lr7057756096120146869343411012-21.ts","m3u8":"./objs/nginx/html/AN185323544007323MR/lr7057756096120146869343411012.m3u8","m3u8_url":"AN185323544007323MR/lr7057756096120146869343411012.m3u8","seq_no":21}, status=200, res= : http: client post : http: connect server : http: tcp connect http 127.0.0.1:5811 to=30000ms, rto=30000ms : tcp: connect 127.0.0.1:5811 to=30000ms : connect to 127.0.0.1:5811

相关问题