docker 方式部署,推流和多人通话持续约几小时后srs容器崩溃
- SRS Version(版本):
v4.0
- SRS Log(日志):
[2022-08-12 17:51:17.024][Trace][1][s608m511] dvr stream wksscadmin to file ./objs/nginx/html/record/728661/wksscadmin/2022/08/12/17:51:17.mp4
[2022-08-12 17:51:17.024][Trace][1][s608m511] ignore disabled exec for vhost=__defaultVhost__
[2022-08-12 17:51:17.294][Trace][1][37idt5gu] RTC: Need PLI ssrc=1754233306, play=[37idt5gu], publish=[s608m511], count=1/1
[2022-08-12 17:51:17.294][Trace][1][s608m511] RTC: Request PLI ssrc=1754233306, play=[37idt5gu], count=1/1, bytes=12B
[2022-08-12 17:51:17.403][Trace][1][1j5e7r19] <- RTC RECV #13, udp 737, pps 79/73, schedule 737
[2022-08-12 17:51:19.584][Trace][1][37idt5gu] Hybrid cpu=0.00%,251MB, cid=8,4, timer=61,7,35, clock=0,45,3,0,1,0,1,0,0, free=1, objs=(pkt:82,raw:75,fua:6,msg:133,oth:1,buf:62)
[2022-08-12 17:51:19.584][Trace][1][37idt5gu] RTC: Server conns=1, rpkts=(64,rtp:62,stun:1,rtcp:1), spkts=(10,rtp:0,stun:1,rtcp:17), rtcp=(pli:1,twcc:7,rr:1), snk=(70,a:35,v:35,h:0), fid=(id:1,fid:64,ffid:0,addr:1,faddr:64)
[2022-08-13 15:15:36.634][Trace][1][62269h54][MAIN] SRS/4.0.251(Leo), MIT
[2022-08-13 15:15:36.634][Trace][1][62269h54] authors: https://github.com/ossrs/srs/blob/4.0release/trunk/AUTHORS.txt
[2022-08-13 15:15:36.634][Trace][1][62269h54] contributors:
2022-08-13 15:15:36.634][Trace][1][62269h54] cwd=/usr/local/srs, work_dir=./, build: 2022-03-19 05:11:35, configure: --x86-x64 --srt=on --jobs=2, uname: Linux c15743c99b3b 5.11.0-1028-azure #31~20.04.2-Ubuntu SMP Tue Jan 18 08:46:15 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux, osx: 0, pkg: dcis, region: , source:
[2022-08-13 15:15:36.634][Trace][1][62269h54] configure detail: --prefix=/usr/local/srs --config=conf/srs.conf --hls=on --hds=off --dvr=on --ssl=on --https=on --ssl-1-0=off --ssl-local=off --sys-ssl=off --transcode=on --ingest=on --stat=on --http-callback=on --http-server=on --stream-caster=on --http-api=on --utest=off --cherrypy=off --srt=on --rtc=on --simulator=off --cxx11=on --cxx14=off --ffmpeg-fit=on --nasm=on --srtp-nasm=on --clean=on --gperf=off --gmc=off --gmd=off --gmp=off --gcp=off --gprof=off --static=off --shared-st=off --shared-srt=off --shared-ffmpeg=off --log-verbose=off --log-info=off --log-trace=on --gcov=off --debug=off --debug-stats=off --cross-build=off --cc=gcc --cxx=g++ --ar=ar --ld=ld --randlib=randlib
[2022-08-13 15:15:36.634][Trace][1][62269h54] srs checking config...
[2022-08-13 15:15:36.634][Trace][1][62269h54] ips, iface[0] eth0 ipv4 0x11043 172.17.0.2, iface[1] eth0 ipv6 0x11043 fe80::42:acff:fe11:2%eth0
[2022-08-13 15:15:36.634][Trace][1][62269h54] devices, intranet eth0 172.17.0.2, intranet eth0 fe80::42:acff:fe11:2%eth0
[2022-08-13 15:15:36.634][Warn][1][62269h54][22] stats network use index=0, ip=172.17.0.2, ifname=eth0
[2022-08-13 15:15:36.634][Warn][1][62269h54][22] stats disk list: sda sdb xvda xvdb vda
[2022-08-13 15:15:36.634][Trace][1][62269h54] you can check log by: tail -n 30 -f ./conf/log/hrtc.log
- 系统 Log(日志):
Aug 12 17:51:14 VM-0-3-centos journal: 当客户端停止发布流时
Aug 12 17:51:14 VM-0-3-centos journal:
Aug 12 17:51:14 VM-0-3-centos journal: {app=728661, vhost=__defaultVhost__, stream=wksscadmin, param=upstream=rtc, ip=113.89.70.180, action=on_unpublish, server_id=vid-b6qzmfd, client_id=yca7ajd9}
Aug 12 17:51:14 VM-0-3-centos journal: 当DVR录制关闭一个flv文件时
Aug 12 17:51:14 VM-0-3-centos journal:
Aug 12 17:51:14 VM-0-3-centos journal: {app=728661, vhost=__defaultVhost__, cwd=/usr/local/srs, file=./objs/nginx/html/record/728661/wksscadmin/2022/08/12/17:51:07.mp4, stream=wksscadmin, param=upstream=rtc, ip=113.89.70.180, action=on_dvr, server_id=vid-b6qzmfd, client_id=yca7ajd9}
Aug 12 17:51:15 VM-0-3-centos journal: [trace] 2022/08/12 17:51:15.920384 [1][1002] Proxy addr header map[Accept-Encoding:[gzip, deflate, br] Accept-Language:[zh-CN,zh;q=0.9] Cache-Control:[no-cache] Connection:[Upgrade] Origin:[https://192.168.0.124:1470] Pragma:[no-cache] Sec-Websocket-Extensions:[permessage-deflate; client_max_window_bits] Sec-Websocket-Key:[FM6jlTui2/QpWqMxrLLOaA==] Sec-Websocket-Version:[13] Upgrade:[websocket] User-Agent:[Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36] X-Real-Ip:[113.89.70.180] X-Real-Schema:[https]]
Aug 12 17:51:15 VM-0-3-centos journal: [trace] 2022/08/12 17:51:15.920426 [1][1002] proxy http rip=113.89.70.180, addr=113.89.70.180:2910 GET http://159.75.247.221:1989/sig/v1/rtc?room=728661&display=wksscadmin with headers map[Accept-Encoding:[gzip, deflate, br] Accept-Language:[zh-CN,zh;q=0.9] Cache-Control:[no-cache] Connection:[Upgrade] Origin:[https://192.168.0.124:1470] Pragma:[no-cache] Sec-Websocket-Extensions:[permessage-deflate; client_max_window_bits] Sec-Websocket-Key:[FM6jlTui2/QpWqMxrLLOaA==] Sec-Websocket-Version:[13] Upgrade:[websocket] User-Agent:[Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36] X-Forwarded-Host:[hrtc.huanjianit.com] X-Real-Ip:[113.89.70.180] X-Real-Schema:[https]]
Aug 12 17:51:15 VM-0-3-centos journal: [trace] 2022/08/12 17:51:15.921218 [1][1713] Serve client 159.75.247.221:35106 at /sig/v1/rtc?room=728661&display=wksscadmin
Aug 12 17:51:15 VM-0-3-centos journal: [trace] 2022/08/12 17:51:15.940985 [1][1713] Join display=wksscadmin, room=728661 ok
Aug 12 17:51:16 VM-0-3-centos journal: [trace] 2022/08/12 17:51:16.932809 [1][1002] Proxy addr header map[Accept:[application/json, text/javascript, */*; q=0.01] Accept-Encoding:[gzip, deflate, br] Accept-Language:[zh-CN,zh;q=0.9] Content-Length:[6061] Content-Type:[application/json] Origin:[https://192.168.0.124:1470] Referer:[https://192.168.0.124:1470/] Sec-Ch-Ua:[".Not/A)Brand";v="99", "Google Chrome";v="103", "Chromium";v="103"] Sec-Ch-Ua-Mobile:[?0] Sec-Ch-Ua-Platform:["Windows"] Sec-Fetch-Dest:[empty] Sec-Fetch-Mode:[cors] Sec-Fetch-Site:[cross-site] User-Agent:[Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36] X-Real-Ip:[113.89.70.180] X-Real-Schema:[https]]
Aug 12 17:51:16 VM-0-3-centos journal: [trace] 2022/08/12 17:51:16.932873 [1][1002] proxy http rip=113.89.70.180, addr=113.89.70.180:2823 POST http://159.75.247.221:1985/rtc/v1/publish/ with headers map[Accept:[application/json, text/javascript, */*; q=0.01] Accept-Encoding:[gzip, deflate, br] Accept-Language:[zh-CN,zh;q=0.9] Content-Length:[6061] Content-Type:[application/json] Origin:[https://192.168.0.124:1470] Referer:[https://192.168.0.124:1470/] Sec-Ch-Ua:[".Not/A)Brand";v="99", "Google Chrome";v="103", "Chromium";v="103"] Sec-Ch-Ua-Mobile:[?0] Sec-Ch-Ua-Platform:["Windows"] Sec-Fetch-Dest:[empty] Sec-Fetch-Mode:[cors] Sec-Fetch-Site:[cross-site] User-Agent:[Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36] X-Forwarded-Host:[hrtc.huanjianit.com] X-Real-Ip:[113.89.70.180] X-Real-Schema:[https]]
Aug 12 17:51:16 VM-0-3-centos journal: 当客户端发布流时,譬如flash/FMLE方式推流到服务器
Aug 12 17:51:16 VM-0-3-centos journal:
Aug 12 17:51:16 VM-0-3-centos journal: {app=728661, tcUrl=webrtc://hrtc.huanjianit.com/728661, vhost=__defaultVhost__, stream=wksscadmin, param=upstream=rtc, ip=113.89.70.180, action=on_publish, server_id=vid-b6qzmfd, client_id=s608m511}
Aug 12 17:51:19 VM-0-3-centos kernel: srs[11962]: segfault at d8 ip 0000000000618d54 sp 00007f02a36b8470 error 4 in srs[400000+7c7000]
Aug 12 17:51:21 VM-0-3-centos kernel: docker0: port 1(veth2b00b81) entered disabled state
Aug 12 17:51:21 VM-0-3-centos kernel: docker0: port 1(veth2b00b81) entered disabled state
Aug 12 17:51:21 VM-0-3-centos kernel: device veth2b00b81 left promiscuous mode
Aug 12 17:51:21 VM-0-3-centos kernel: docker0: port 1(veth2b00b81) entered disabled state
Aug 12 17:51:21 VM-0-3-centos dockerd-current: time="2022-08-12T17:51:21.592545595+08:00" level=warning msg="98bea75598ed59705a593a989de5236f7181073e5761a540e1b0ae8ea21a592a cleanup: failed to unmount secrets: invalid argument"
Aug 12 17:51:24 VM-0-3-centos journal: [warn] 2022/08/12 17:51:24.081372 [1][1713] Ignore err EOF for 159.75.247.221:35106
Aug 12 17:51:24 VM-0-3-centos journal: #033[33m#033[0m[trace] 2022/08/12 17:51:24.081420 [1][1713] Remove client display=wksscadmin, room=728661
Aug 12 17:52:01 VM-0-3-centos systemd: Started Session 130241 of user root.
Aug 12 17:52:07 VM-0-3-centos journal: 2022-08-12 17:52:07.123 INFO 1 --- [nio-8021-exec-6] c.h.c.l.c.r.NacosSameClusterWeightedRule : 选择的示例是 port = 8888, instance = {"clusterName":"DEFAULT","enabled":true,"ephemeral":true,"healthy":true,"instanceHeartBeatInterval":5000,"instanceHeartBeatTimeOut":15000,"instanceId":"172.16.0.13#8888#DEFAULT#DEFAULT_GROUP@@hjkj-auth","ip":"172.16.0.13","ipDeleteTimeout":30000,"metadata":{"preserved.register.source":"SPRING_CLOUD"},"port":8888,"serviceName":"DEFAULT_GROUP@@hjkj-auth","weight":1.0}
Aug 12 17:52:07 VM-0-3-centos journal: 2022-08-12 17:52:07.126 INFO 1 --- [nio-8021-exec-6] c.h.c.l.c.r.NacosSameClusterWeightedRule : 选择的示例是 port = 8888, instance = {"clusterName":"DEFAULT","enabled":true,"ephemeral":true,"healthy":true,"instanceHeartBeatInterval":5000,"instanceHeartBeatTimeOut":15000,"instanceId":"172.16.0.13#8888#DEFAULT#DEFAULT_GROUP@@hjkj-auth","ip":"172.16.0.13","ipDeleteTimeout":30000,"metadata":{"preserved.register.source":"SPRING_CLOUD"},"port":8888,"serviceName":"DEFAULT_GROUP@@hjkj-auth","weight":1.0}
Aug 12 17:52:07 VM-0-3-centos journal: Creating a new SqlSession
Aug 12 17:52:07 VM-0-3-centos journal: SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@36163863] was not registered for synchronization because synchronization is not active
Aug 12 17:52:07 VM-0-3-centos journal: JDBC Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@c49578a] will not be managed by Spring
Aug 12 17:52:07 VM-0-3-centos journal: ==>
- SRS Config(配置):
listen 1935;
max_connections 1000;
srs_log_tank file;
srs_log_file ./conf/log/srs.log;
daemon on;
http_api {
enabled on;
listen 1985;
raw_api {
enabled on;
allow_reload on;
allow_query on;
allow_update on;
}
https {
enabled on;
listen 443;
key ./conf/fan_***.com_NGINX.key;
cert ./conf/fan_***.com_NGINX.crt;
}
}
http_server {
enabled on;
listen 8080;
dir ./objs/nginx/html;
https {
enabled on;
listen 1990;
key ./conf/fan_***.com_NGINX.key;
cert ./conf/fan_***.com_NGINX.crt;
}
}
stats {
network 0;
disk sda sdb xvda xvdb vda;
}
rtc_server {
enabled on;
listen 8000;
candidate***.***.***.221;
}
vhost __defaultVhost__ {
http_hooks {
enabled on;
on_connect https://***.***.com/hjkj-video-center/srsCallback/onConnectCallBack;
on_close https://***.***.com/hjkj-video-center/srsCallback/onCloseCallBack;
on_publish https://***.***.com/hjkj-video-center/srsCallback/onPublishCallBack;
on_unpublish https://******.com/hjkj-video-center/srsCallback/onUnPublishCallBack;
on_play https://***.***.com/hjkj-video-center/srsCallback/onPlayCallBack;
on_stop https://***.***.com/hjkj-video-center/srsCallback/onStopCallBack;
on_dvr https://***.***.com/hjkj-video-center/srsCallback/onDvrCallBack;
}
tcp_nodelay on;
min_latency on;
dvr {
enabled on;
dvr_path ./objs/nginx/html/record/[app]/[stream]/[2006]/[01]/[02]/[15]:[04]:[05].mp4;
dvr_plan session;
dvr_duration 10;
dvr_wait_keyframe on;
dvr_apply all;
}
hls {
enabled on;
}
rtc {
enabled on;
bframe discard;
rtc_to_rtmp on;
rtmp_to_rtc on;
stun_timeout 3;
nack on;
twcc on;
}
http_remux {
enabled on;
mount [vhost]/[app]/[stream].flv;
}
play {
gop_cache off;
queue_length 10;
mw_latency 100;
}
publish {
mr off;
}
}
Replay(重现)
Please describe how to replay the bug? (重现Bug的步骤)
当设备推流和房间多人通话持续5-6个小时候srs docker容器会奔溃
报错信息srs[11962]: segfault at d8 ip 0000000000618d54 sp 00007f02a36b8470 error 4 in srs[400000+7c7000]
Expect(期望行为)
Please describe your expectation(描述你期望发生的事情)
1:容器不崩溃正常
3条答案
按热度按时间pvabu6sv1#
信息不够,看是否能提供更多的信息,麻烦微信联系下?
h7appiyu2#
1:srs日志- 在2022-08:12 17:51:19 s容器崩溃
2:经过查看日志 /var/log/message 显示如下信息,在2022-08:12 17:51:19 s 提示报错信息srs[11962]: segfault at d8 ip 0000000000618d54 sp 00007f02a36b8470 error 4 in srs[400000+7c7000]
3:其它需要提供那些信息呢?
rlcwz9us3#
麻烦提供以下信息: