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

SRT: When pushing SRT protocol video streams, if the source station receiving the video stream goes down, it will cause the edge station to go down as well. RTMP will automatically switch to other source stations. #2317

Closed
mochadangao opened this issue Apr 27, 2021 · 1 comment · Fixed by #2429
Assignees
Labels
SRT It's about SRT protocol. TransByAI Translated by AI/GPT.
Milestone

Comments

@mochadangao
Copy link

mochadangao commented Apr 27, 2021

Description'

Please ensure that the markdown structure is maintained.

When pushing SRT protocol video streams, if the source server receiving the video stream goes down, it will cause the edge server to go down as well. RTMP will automatically switch to other source servers.'

Please ensure that the markdown structure is maintained.

  1. SRS version: 4.0release/4.0.84
  2. The log of SRS is as follows:

Please ensure that the markdown structure is maintained.

[2021-04-27 10:46:22.887][Trace][19019][819400el] <- EPB time=30103602, msgs=41, okbps=2513,2513,0, ikbps=1,1,0
[2021-04-27 10:46:24.949][Trace][19019][3fguh6z6] Hybrid cpu=7.65%,11MB, cid=10,0, timer=51,0,0, clock=1,33,13,1,0,0,0,0,0, objs=(pkt:0,raw:0,fua:0,msg:242,oth:0,buf:0,drop:0)
[2021-04-27 10:46:30.213][Trace][19019][3fguh6z6] Hybrid cpu=11.32%,11MB, cid=10,0, timer=47,0,0, clock=0,22,16,3,3,0,0,0,0, objs=(pkt:0,raw:0,fua:0,msg:239,oth:0,buf:0,drop:0)
[2021-04-27 10:46:32.783][Trace][19019][819400el] <- CPB time=34988199, okbps=0,1,0, ikbps=2584,2594,0, mr=0/350, p1stpt=20000, pnt=5000
[2021-04-27 10:46:32.920][Trace][19019][819400el] <- EPB time=40131633, msgs=41, okbps=2556,2513,0, ikbps=0,1,0
[2021-04-27 10:46:35.383][Trace][19019][3fguh6z6] Hybrid cpu=10.99%,11MB, cid=10,0, timer=47,0,0, clock=0,22,16,3,3,0,0,0,0, objs=(pkt:0,raw:0,fua:0,msg:239,oth:0,buf:0,drop:0)
[2021-04-27 10:46:37.323][Error][19019][819400el][104] edge push get server control message failed. err=code=1007 : recv interlaced message : read basic header : basic header requires 1 bytes : read bytes : read
thread [19019][819400el]: recv_message() [src/protocol/srs_rtmp_stack.cpp:403][errno=104]
thread [19019][819400el]: recv_interlaced_message() [src/protocol/srs_rtmp_stack.cpp:913][errno=104]
thread [19019][819400el]: read_basic_header() [src/protocol/srs_rtmp_stack.cpp:1008][errno=104]
thread [19019][819400el]: grow() [src/protocol/srs_protocol_stream.cpp:179][errno=104]
thread [19019][819400el]: read() [src/protocol/srs_service_st.cpp:524][errno=104](Connection reset by peer)
[2021-04-27 10:46:37.336][Trace][19019][819400el] edge change from 200 to state 0 (init).
[2021-04-27 10:46:37.336][Trace][19019][819400el] TCP: before dispose resource(RtmpConn)(0x2a63db0), conns=1, zombies=0, ign=0, inz=0, ind=0
[2021-04-27 10:46:37.336][Warn][19019][819400el][4] client disconnect peer. ret=1007
[2021-04-27 10:46:37.336][Trace][19019][wi27453d] TCP: clear zombies=1 resources, conns=1, removing=0, unsubs=0
[2021-04-27 10:46:37.336][Trace][19019][819400el] TCP: disposing #0 resource(RtmpConn)(0x2a63db0), conns=1, disposing=1, zombies=0
[2021-04-27 10:46:37.364][Trace][19019][340hf3a7] rtmp client close url:rtmp://127.0.0.1:1935/live/livestream
  1. The configuration of SRS is as follows:

Please ensure that the markdown structure is maintained.

# the config for srs origin-edge cluster
# @see https://github.com/ossrs/srs/wiki/v3_EN_OriginCluster
# @see full.conf for detail config.

listen              1935;
max_connections     1000;
pid                 objs/edgeA.pid;
daemon              on;
srs_log_tank        file;
srs_log_file        ./objs/edgeA.log;

http_server {
    enabled         on;
    listen          8080;
    dir             ./objs/nginx/html;
}

srt_server {
    enabled on;
    listen 10080;
    maxbw 1000000000;
    connect_timeout 4000;
    peerlatency 300;
    recvlatency 300;
}


vhost srs.srt.com.cn {
}

stats {
    network         0;
	disk            sda sdb xvda xvdb;
}

vhost __defaultVhost__ {
    http_remux {
        enabled     on;
        mount       [vhost]/[app]/[stream].flv;
    }
    cluster {
        mode            remote;
        origin          192.168.80.128:19350 192.168.80.131:19350;
    }
}

Replay

Please ensure that the markdown structure is maintained.

How to replay bug?

Please ensure that the markdown structure is maintained.

Steps to replay the bug:

  1. Start the origin server and edge server normally.
  2. Push SRT video stream to the edge server.
  3. Stop the origin server that receives the video stream.
  4. The edge server will crash along with it.

Please ensure that the markdown structure is maintained.

Expected behavior:

Please ensure that the markdown structure is maintained.

Expected behavior:

When the origin server is down, it should automatically switch to another origin server.

Please ensure that the markdown structure is maintained.

TRANS_BY_GPT3

@winlinvip winlinvip added the SRT It's about SRT protocol. label Jun 16, 2021
@runner365 runner365 linked a pull request Jun 25, 2021 that will close this issue
@winlinvip winlinvip changed the title 推送SRT协议视频流时,当接收视频流的源站挂掉会导致边缘站一起挂掉,rtmp会自动切换到其他源站 SRT: 推送SRT协议视频流时,当接收视频流的源站挂掉会导致边缘站一起挂掉,rtmp会自动切换到其他源站 Aug 19, 2021
@winlinvip
Copy link
Member

winlinvip commented Aug 19, 2021

Fixed

Only solved the crash issue, edge does not support SRT.

TRANS_BY_GPT3

@winlinvip winlinvip added this to the 4.0 milestone Sep 4, 2021
@winlinvip winlinvip changed the title SRT: 推送SRT协议视频流时,当接收视频流的源站挂掉会导致边缘站一起挂掉,rtmp会自动切换到其他源站 SRT: When pushing SRT protocol video streams, if the source station receiving the video stream goes down, it will cause the edge station to go down as well. RTMP will automatically switch to other source stations. Jul 29, 2023
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SRT It's about SRT protocol. TransByAI Translated by AI/GPT.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants