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

GB28181: Tested by srs-bench, a large number of warning logs #3601

Open
kelpliu opened this issue Jun 25, 2023 · 1 comment
Open

GB28181: Tested by srs-bench, a large number of warning logs #3601

kelpliu opened this issue Jun 25, 2023 · 1 comment
Assignees
Labels
GB28181 For GB28181. TransByAI Translated by AI/GPT.

Comments

@kelpliu
Copy link

kelpliu commented Jun 25, 2023

Note: Please read FAQ before file an issue, see #2716

Description

Please description your issue here

GB28181-Using srs-bench to test streaming, there are a large number of warning logs in the srs service. May I ask what is the reason?

  1. SRS Version: v5.0-b1

  2. SRS Log:

[2023-06-25 12:44:04.135][INFO][1][6u823afp] Process: cpu=0.00%,100MB, threads=2
[2023-06-25 12:44:06.097][INFO][1][6652r843] Session: Alive=71s, packs=282, recover=12, reserved=320, msgs=747, drop=25, media(id=10, alive=71s, packs=282 recover=12, reserved=320, msgs=747, drop=25)
[2023-06-25 12:44:07.383][INFO][1][10esy757] Hybrid cpu=2.00%,100MB, cid=1,0, timer=61,0,0, clock=0,48,1,0,0,0,0,0,0
[2023-06-25 12:44:08.236][WARN][1][6652r843][11] SIP: Re-invite for got REGISTER in state=Inviting
[2023-06-25 12:44:08.237][INFO][1][6652r843] SIP: INVITE device=sip:3402000000@3402000000, branch=9usumn, tag=x6404738, call=oftw05p1k4j61b28, ssrc=0200005877, sdp is v=0\r\no=3402000000 0 0 IN IP4 192.168.50.236\r\ns=Play\r\nc=IN IP4 192.168.50.236\r\nt=0 0\r\nm=video 9000 TCP/RTP/AVP 96\r\na=recvonly\r\na=rtpmap:96 PS/90000\r\ny=0200005877\r\n
[2023-06-25 12:44:08.242][INFO][1][6652r843] SIP: Change device=3402000000, state=Inviting->Trying
[2023-06-25 12:44:08.343][INFO][1][6652r843] SIP: Change device=3402000000, state=Trying->Stable
[2023-06-25 12:44:08.348][INFO][1][6652r843] PS: Reserved bytes for next loop, pos=12, left=20, total=32, bytes=[00 00 01 ba 44 00 04 46 54 01 09 c3 47 fe ff ff]
[2023-06-25 12:44:08.348][INFO][1][6652r843] PS: Consume reserved=20B, length=36, bytes=[80 60 00 02 00 00 08 ca 0b eb d8 f5 00 00 01 bb]
[2023-06-25 12:44:08.348][INFO][1][6652r843] PS: Reserved bytes for next loop, pos=12, left=24, total=36, bytes=[00 00 01 bc 00 12 60 ff 00 00 00 08 1b e0 00 00]
[2023-06-25 12:44:08.348][INFO][1][6652r843] PS: Consume reserved=24B, length=60, bytes=[80 60 00 04 00 00 08 ca 0b eb d8 f5 00 00 01 e0]
[2023-06-25 12:44:08.348][WARN][1][6652r843][11] PS: Enter recover=1, seq=4, ts=2250, pt=96, pack=2, msgs=0, lsopm=0, last=0/0, bytes=[00 00 01 e0 00 2a 80 c0], pos=24, left=48 for err code=4048(GbPsHeader)(Invalid PS header for GB28181) : decode pack : decode psm : invalid indicator of 0x0x60
thread [1][6652r843]: decode() [./src/app/srs_app_gb28181.cpp:2380][errno=11]
thread [1][6652r843]: decode() [./src/kernel/srs_kernel_ps.cpp:123][errno=11]
thread [1][6652r843]: decode() [./src/kernel/srs_kernel_ps.cpp:434][errno=11]
[2023-06-25 12:44:08.349][WARN][1][6652r843][11] PS: Enter recover=2, seq=5, ts=2250, pt=96, pack=2, msgs=0, lsopm=0, last=0/0, bytes=[00 00 01 e0 00 16 80 c0], pos=0, left=28 for err code=4048(GbPsHeader)(Invalid PS header for GB28181) : no pack
thread [1][6652r843]: decode() [./src/app/srs_app_gb28181.cpp:2373][errno=11]
[2023-06-25 12:44:08.349][WARN][1][6652r843][11] PS: Enter recover=3, seq=6, ts=2250, pt=96, pack=2, msgs=0, lsopm=0, last=0/0, bytes=[00 00 01 e0 04 d4 80 c0], pos=0, left=1242 for err code=4048(GbPsHeader)(Invalid PS header for GB28181) : no pack
thread [1][6652r843]: decode() [./src/app/srs_app_gb28181.cpp:2373][errno=11]
[2023-06-25 12:44:08.349][WARN][1][6652r843][11] PS: Enter recover=4, seq=7, ts=2089, pt=96, pack=2, msgs=0, lsopm=0, last=0/0, bytes=[00 00 01 c0 00 af 80 c0], pos=0, left=181 for err code=4048(GbPsHeader)(Invalid PS header for GB28181) : no pack
thread [1][6652r843]: decode() [./src/app/srs_app_gb28181.cpp:2373][errno=11]
[2023-06-25 12:44:08.349][WARN][1][6652r843][11] PS: Enter recover=5, seq=8, ts=4179, pt=96, pack=2, msgs=0, lsopm=0, last=0/0, bytes=[00 00 01 c0 00 d7 80 c0], pos=0, left=221 for err code=4048(GbPsHeader)(Invalid PS header for GB28181) : no pack
thread [1][6652r843]: decode() [./src/app/srs_app_gb28181.cpp:2373][errno=11]
[2023-06-25 12:44:08.396][WARN][1][6652r843][11] PS: Quit recover=5, seq=9, bytes=[00 00 01 ba 44 00 04 8c], pos=0, left=20
[2023-06-25 12:44:08.396][INFO][1][6652r843] PS: Reserved bytes for next loop, pos=12, left=20, total=32, bytes=[00 00 01 ba 44 00 04 8c a4 01 09 c3 47 fe ff ff]
[2023-06-25 12:44:08.397][INFO][1][6652r843] PS: Consume reserved=20B, length=70, bytes=[80 60 00 0a 00 00 11 94 0b eb d8 f5 00 00 01 e0]
[2023-06-25 12:44:08.397][INFO][1][6652r843] PS: Reserved bytes for next loop, pos=12, left=20, total=32, bytes=[00 00 01 ba 44 00 04 d2 f4 01 09 c3 47 fe ff ff]
[2023-06-25 12:44:08.397][INFO][1][6652r843] PS: Consume reserved=20B, length=623, bytes=[80 60 00 0d 00 00 1a 5e 0b eb d8 f5 00 00 01 e0]
[2023-06-25 12:44:08.397][INFO][1][6652r843] PS: Media connected
[2023-06-25 12:44:08.397][WARN][1][6652r843][11] Muxer: Ignore video err code=3043(DropBeforeSequence)(Drop frames before get sps and pps) : ts: consume video : write frame : drop for no sps/pps
thread [1][6652r843]: on_ts_message() [./src/app/srs_app_gb28181.cpp:1589][errno=11]
thread [1][6652r843]: on_ts_video() [./src/app/srs_app_gb28181.cpp:1682][errno=11]
thread [1][6652r843]: write_h264_ipb_frame() [./src/app/srs_app_gb28181.cpp:1736][errno=11]
[2023-06-25 12:44:08.442][INFO][1][6652r843] PS: Reserved bytes for next loop, pos=12, left=20, total=32, bytes=[00 00 01 ba 44 00 05 19 44 01 09 c3 47 fe ff ff]
[2023-06-25 12:44:08.442][INFO][1][6652r843] PS: Consume reserved=20B, length=1237, bytes=[80 60 00 10 00 00 23 28 0b eb d8 f5 00 00 01 e0]
[2023-06-25 12:44:08.443][WARN][1][6652r843][32] Muxer: Ignore audio err code=1009(SocketWrite)(Socket write data failed) : ts: consume audio : write audio raw frame : send messages : send messages : send iovs : writev : writev
thread [1][6652r843]: on_ts_message() [./src/app/srs_app_gb28181.cpp:1593][errno=32]
thread [1][6652r843]: on_ts_audio() [./src/app/srs_app_gb28181.cpp:1813][errno=32]
thread [1][6652r843]: rtmp_write_packet() [./src/app/srs_app_gb28181.cpp:1867][errno=32]
thread [1][6652r843]: send_and_free_messages() [./src/protocol/srs_protocol_rtmp_stack.cpp:755][errno=32]
thread [1][6652r843]: do_send_messages() [./src/protocol/srs_protocol_rtmp_stack.cpp:497][errno=32]
thread [1][6652r843]: srs_write_large_iovs() [./src/protocol/srs_protocol_utility.cpp:376][errno=32]
thread [1][6652r843]: writev() [./src/protocol/srs_protocol_st.cpp:667][errno=32]
[2023-06-25 12:44:08.443][INFO][1][6652r843] Muxer: Convert GB to RTMP rtmp://127.0.0.1/live/3402000000
[2023-06-25 12:44:08.444][INFO][1][xtst38jk] RTMP client ip=127.0.0.1:38846, fd=28
[2023-06-25 12:44:08.448][INFO][1][6652r843] complex handshake success.
[2023-06-25 12:44:08.449][INFO][1][6652r843] protocol in.buffer=0, in.ack=0, out.ack=0, in.chunk=128, out.chunk=128
[2023-06-25 12:44:08.449][INFO][1][xtst38jk] complex handshake success
[2023-06-25 12:44:08.449][INFO][1][xtst38jk] connect app, tcUrl=rtmp://127.0.0.1/live, pageUrl=, swfUrl=, schema=rtmp, vhost=127.0.0.1, port=1935, app=live, args=(obj)
[2023-06-25 12:44:08.449][INFO][1][xtst38jk] edge-srs ip=10.233.70.65, version=5.0.157, pid=1, id=0
[2023-06-25 12:44:08.450][INFO][1][xtst38jk] protocol in.buffer=0, in.ack=0, out.ack=0, in.chunk=128, out.chunk=128
[2023-06-25 12:44:08.450][INFO][1][6652r843] connected, version=5.0.157.0, ip=127.0.0.1, pid=1, id=0, dsu=1
[2023-06-25 12:44:08.451][WARN][1][6652r843][11] Muxer: Ignore video err code=3043(DropBeforeSequence)(Drop frames before get sps and pps) : ts: consume video : write frame : drop for no sps/pps
thread [1][6652r843]: on_ts_message() [./src/app/srs_app_gb28181.cpp:1589][errno=11]
thread [1][6652r843]: on_ts_video() [./src/app/srs_app_gb28181.cpp:1682][errno=11]
thread [1][6652r843]: write_h264_ipb_frame() [./src/app/srs_app_gb28181.cpp:1736][errno=11]
[2023-06-25 12:44:08.451][INFO][1][6652r843] PS: Reserved bytes for next loop, pos=12, left=20, total=32, bytes=[00 00 01 ba 44 00 05 5f 94 01 09 c3 47 fe ff ff]
[2023-06-25 12:44:08.451][INFO][1][6652r843] PS: Consume reserved=20B, length=1130, bytes=[80 60 00 13 00 00 2b f2 0b eb d8 f5 00 00 01 e0]
[2023-06-25 12:44:08.452][WARN][1][6652r843][11] Muxer: Ignore video err code=3043(DropBeforeSequence)(Drop frames before get sps and pps) : ts: consume video : write frame : drop for no sps/pps
thread [1][6652r843]: on_ts_message() [./src/app/srs_app_gb28181.cpp:1589][errno=11]
thread [1][6652r843]: on_ts_video() [./src/app/srs_app_gb28181.cpp:1682][errno=11]
thread [1][6652r843]: write_h264_ipb_frame() [./src/app/srs_app_gb28181.cpp:1736][errno=11]
[2023-06-25 12:44:08.452][INFO][1][xtst38jk] client identified, type=flash-publish, vhost=127.0.0.1, app=live, stream=3402000000, param=?vhost=127.0.0.1, duration=0ms
[2023-06-25 12:44:08.452][INFO][1][xtst38jk] connected stream, tcUrl=rtmp://127.0.0.1/live, pageUrl=, swfUrl=, schema=rtmp, vhost=__defaultVhost__, port=1935, app=live, stream=3402000000, param=?vhost=127.0.0.1, args=(obj)
[2023-06-25 12:44:08.452][INFO][1][xtst38jk] source url=/live/3402000000, ip=127.0.0.1, cache=1/2500, is_edge=0, source_id=/vg0yg624
[2023-06-25 12:44:08.452][INFO][1][xtst38jk] RTC bridge from RTMP, rtmp2rtc=1, keep_bframe=0, merge_nalus=0
[2023-06-25 12:44:08.453][INFO][1][xtst38jk] 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
[2023-06-25 12:44:08.454][INFO][1][xtst38jk] ignore disabled exec for vhost=__defaultVhost__
[2023-06-25 12:44:08.454][INFO][1][xtst38jk] start publish mr=0/350, p1stpt=20000, pnt=5000, tcp_nodelay=0
[2023-06-25 12:44:08.454][INFO][1][xtst38jk] 4B audio sh, codec(10, profile=LC, 2channels, 0kbps, 44100HZ), flv(16bits, 2channels, 44100HZ)
[2023-06-25 12:44:08.455][INFO][1][xtst38jk] RTMP2RTC: Init audio codec to 10(AAC)
[2023-06-25 12:44:08.488][INFO][1][6652r843] PS: Reserved bytes for next loop, pos=12, left=20, total=32, bytes=[00 00 01 ba 44 00 05 a5 e4 01 09 c3 47 fe ff ff]



  1. SRS Config:
apiVersion: v1
kind: ConfigMap
metadata:
  name: srs-config
data:
  srs.conf: |-
    listen 1935;
    max_connections 1000;
    daemon off;
    srs_log_tank console;
    
    stream_caster {
        enabled on;
        caster gb28181;
        output rtmp://127.0.0.1/live/[stream];
        listen 9000;
        sip {
            enabled on;
            listen 5060;
            # @see https://ossrs.net/lts/zh-cn/docs/v5/doc/gb28181#config-candidate
            candidate $CANDIDATE;
        }
    }
    
    http_server {
        enabled on;
        listen 8590;
        dir ./objs/nginx/html;
    }
    
    http_api {
        enabled on;
        listen 1985;
    }
    stats {
        network 0;
    }
    rtc_server {
        enabled on;
        listen 8000; # UDP port
        # @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#config-candidate
        candidate $CANDIDATE;
    }
    
    vhost __defaultVhost__ {
        rtc {
            enabled on;
            # @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#rtmp-to-rtc
            rtmp_to_rtc on;
            # @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#rtc-to-rtmp
            rtc_to_rtmp on;
        }
        http_remux {
            enabled on;
            mount [vhost]/[app]/[stream].flv;
        }
        hls {
            enabled on;
        }
    }
    


---

apiVersion: apps/v1
kind: Deployment
metadata:
  name: srs-deployment
  labels:
    app: srs
spec:
  replicas: 1
  selector:
    matchLabels:
      app: srs
  template:
    metadata:
      labels:
        app: srs
    spec:
      volumes:
      - name: config-volume
        configMap:
          name: srs-config
      containers:
      - name: srs
        image: ossrs/srs:v5.0-b1
        ports:
        - containerPort: 1935
        - containerPort: 1985
        - containerPort: 8590
        - containerPort: 8000
          protocol: UDP
        - containerPort: 5060
        - containerPort: 9000
        env:
          - name: CANDIDATE
            valueFrom:
              configMapKeyRef:
                name: common-config
                key: outerServerIP
          - name: SRS_HTTP_SERVER_DIR
            value: ./objs/nginx/html/players
        volumeMounts:
        - name: config-volume
          mountPath: /usr/local/srs/conf

Replay

Please describe how to replay the bug?

Step 1: Use the above yaml to enable the image ossrs/srs:v5.0-b1.

kubectl apply -f srs.yaml

Step 2: Track the logs of the SRS service.

Step 2: Track the logs of the SRS service.

Run the following command to track the logs of the SRS service pod:

kubectl logs --tail 10 -f <pod_name_of_SRS_service>
Step 3: Push the stream using the srs-bench branch feature/rtc, following the commands in the official documentation.

To push the stream, use the commands mentioned in the official documentation for the srs-bench branch feature/rtc.

./objs/srs_bench -sfu gb28181 -pr tcp://192.168.0.xxx:5060 -user 3402000000 -random 10 \
  -server 34020000002000000001 -domain 3402000000 -sa avatar.aac \
  -sv avatar.h264 -fps 25

Expect

Please describe your expectation.

First time deploying the SRS service and hoping to understand the reasons behind any abnormal logs. How should I resolve or avoid them?

To address or prevent any abnormal logs, it is important to understand the root causes. Here are some steps to help resolve or mitigate the issues:

1. Review the exception logs: Carefully examine the exception logs to identify any error messages or stack traces that can provide insights into the issue.

2. Check the documentation: Consult the official documentation of SRS to understand the possible causes and solutions for the specific exception or error message.

3. Search for similar issues: Look for similar issues reported by other users or developers in online forums, communities, or support channels. This can provide valuable information on how others have resolved or worked around similar problems.

4. Update SRS version: Ensure that you are using the latest stable version of SRS. Sometimes, issues are already fixed in newer releases.

5. Verify the configuration: Double-check the configuration files for any errors or misconfigurations that might be causing the abnormal logs. Make sure all the necessary settings are properly configured.

6. Debugging and logging: Enable debugging and detailed logging options in the SRS configuration to get more information about the issue. This can help in identifying the root cause.

7. Seek help from the community: If you are unable to resolve the issue on your own, seek assistance from the SRS community or support channels. Provide detailed information about the problem, including the exception logs and any relevant configuration details.

By following these steps, you can effectively troubleshoot and resolve any abnormal logs encountered during the deployment of the SRS service.

TRANS_BY_GPT3

@winlinvip winlinvip changed the title GB28181-使用srs-bench测试推流,srs服务出现大量告警日志 GB28181-Using srs-bench to test streaming, srs service generates a large number of warning logs. Jul 29, 2023
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 29, 2023
@winlinvip winlinvip self-assigned this Apr 7, 2024
@winlinvip winlinvip changed the title GB28181-Using srs-bench to test streaming, srs service generates a large number of warning logs. GB28181: Tested by srs-bench, a large number of warning logs Apr 7, 2024
@winlinvip winlinvip added the GB28181 For GB28181. label Apr 7, 2024
@winlinvip
Copy link
Member

With srs-bench test tool, avoiding duplicated warning logs is important. But we need to reproduce this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GB28181 For GB28181. TransByAI Translated by AI/GPT.
Projects
None yet
Development

No branches or pull requests

2 participants