ossrs / srs

SRS is a simple, high-efficiency, real-time media server supporting RTMP, WebRTC, HLS, HTTP-FLV, HTTP-TS, SRT, MPEG-DASH, and GB28181.
https://ossrs.io
MIT License
25.32k stars 5.33k forks source link

SRT: Error when startup srt_accept: no pending connection available at the moment. #3554

Closed Bigflyingcrab closed 11 months ago

Bigflyingcrab commented 1 year ago

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

Description

Please description your issue here

  1. SRS Version: 6.0

  2. SRS Log:

root@miivii-tegra:~/srs/trunk# ./objs/srs -c conf/srt.conf
[2023-05-26 09:06:57.498][INFO][14890][7ocz2n90] XCORE-SRS/6.0.45(Bee)
[2023-05-26 09:06:57.499][INFO][14890][7ocz2n90] config parse complete
[2023-05-26 09:06:57.499][INFO][14890][7ocz2n90] write log to console
[2023-05-26 09:06:57.499][INFO][14890][7ocz2n90] SRS/6.0.45(Bee), MIT
[2023-05-26 09:06:57.499][INFO][14890][7ocz2n90] authors: Winlin<winlin@vip.126.com> ZhaoWenjie<zhaowenjie@tal.com> ShiWei<shiwei05@kuaishou.com> XiaoZhihong<hondaxiao@tencent.com> WuPengqiang<pengqiang.wpq@alibaba-inc.com> XiaLixin<xialixin@kanzhun.com> LiPeng<mozhan.lp@alibaba-inc.com> ChenGuanghua<jinxue.cgh@alibaba-inc.com> ChenHaibo<nmgchenhaibo@foxmail.com> and https://github.com/ossrs/srs/blob/develop/trunk/AUTHORS.md#contributors
[2023-05-26 09:06:57.499][INFO][14890][7ocz2n90] cwd=/root/srs/trunk, work_dir=./, build: 2023-05-26 09:05:06, configure: --srt=on --gb28181=on --h265=on, uname: Linux miivii-tegra 4.9.253-tegra #1 SMP PREEMPT Thu Apr 21 11:07:04 CST 2022 aarch64 aarch64 aarch64 GNU/Linux, osx: 0, env: 0, pkg:
[2023-05-26 09:06:57.499][INFO][14890][7ocz2n90] configure detail: --prefix=/usr/local/srs --config=conf/srs.conf --osx=off --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-converter=on --http-api=on --utest=off --cherrypy=off --srt=on --rtc=on --h265=on --gb28181=on --simulator=off --cxx11=on --cxx14=off --backtrace=on --ffmpeg-fit=on --ffmpeg-opus=off --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 --log-level_v2=on --gcov=off --apm=off --debug=off --debug-stats=off --cross-build=off --sanitizer=on --sanitizer-static=off --sanitizer-log=off --cygwin64=off --single-thread=off --generic-linux=off --cc=gcc --cxx=g++ --ar=ar --ld=ld --randlib=randlib
[2023-05-26 09:06:57.499][INFO][14890][7ocz2n90] srs checking config...
[2023-05-26 09:06:57.500][INFO][14890][7ocz2n90] ips, iface[0] eth0 ipv4 0x11043 192.168.0.98, iface[1] eth0 ipv6 0x11043 fe80::77e4:a1c8:a7dd:e1f7%eth0
[2023-05-26 09:06:57.500][INFO][14890][7ocz2n90] devices, intranet eth0 192.168.0.98, intranet eth0 fe80::77e4:a1c8:a7dd:e1f7%eth0
[2023-05-26 09:06:57.500][WARN][14890][7ocz2n90][22] stats network use index=0, ip=192.168.0.98, ifname=eth0
[2023-05-26 09:06:57.500][WARN][14890][7ocz2n90][22] stats disk list: sda sdb xvda xvdb
[2023-05-26 09:06:57.501][INFO][14890][7ocz2n90] write log to console
[2023-05-26 09:06:57.501][INFO][14890][7ocz2n90] features, rch:on, dash:on, hls:on, hds:off, srt:on, hc:on, ha:on, hs:on, hp:on, dvr:on, trans:on, inge:on, stat:on, sc:on
[2023-05-26 09:06:57.501][INFO][14890][7ocz2n90] SRS on aarch64, conf:conf/srt.conf, limit:1000, writev:1024, encoding:little-endian, HZ:100
[2023-05-26 09:06:57.501][INFO][14890][7ocz2n90] mw sleep:350ms. mr enabled:on, default:0, sleep:350ms
[2023-05-26 09:06:57.501][INFO][14890][7ocz2n90] gc:on, pq:30000ms, cscc:[0,16), csa:on, tn:on(may hurts performance), ss:auto(guess by merged write)
[2023-05-26 09:06:57.501][INFO][14890][7ocz2n90] system default latency(ms): mw(0-350) + mr(0-350) + play-queue(0-30000)
[2023-05-26 09:06:57.501][WARN][14890][7ocz2n90][22] SRS/6.0.45 is not stable
[2023-05-26 09:06:57.501][INFO][14890][7ocz2n90] write pid=14890 to ./objs/srs.pid success!
[2023-05-26 09:06:57.501][INFO][14890][7ocz2n90] Thread #1(primordial): init name=srs-master-1, interval=5000ms
[2023-05-26 09:06:57.501][INFO][14890][7ocz2n90] Pool: Start threads primordial=1, hybrids=1 ok
[2023-05-26 09:06:57.502][INFO][14890][61g1k013] Thread #2: run with tid=14891, entry=0x5571232f80, label=hybrid, name=srs-hybrid-2
[2023-05-26 09:06:57.522][INFO][14890][61g1k013] fingerprint=68:55:ED:F9:61:38:B4:16:B7:DE:88:BC:AC:A7:FC:D9:AE:FD:CD:A4:54:DC:B7:0C:24:36:1C:0D:C2:C3:2F:82
[2023-05-26 09:06:57.522][INFO][14890][61g1k013] CircuitBreaker: enabled=1, high=2x90, critical=1x95, dying=5x99
[2023-05-26 09:06:57.522][INFO][14890][61g1k013] http flv live stream, vhost=__defaultVhost__, mount=[vhost]/[app]/[stream].flv
[2023-05-26 09:06:57.522][INFO][14890][61g1k013] http: root mount to ./objs/nginx/html
[2023-05-26 09:06:57.522][INFO][14890][61g1k013] server main cid=61g1k013, pid=14890, ppid=720, asprocess=0
[2023-05-26 09:06:57.523][INFO][14890][61g1k013] RTMP listen at tcp://0.0.0.0:1935, fd=10
[2023-05-26 09:06:57.523][INFO][14890][61g1k013] HTTP-API listen at tcp://0.0.0.0:1985, fd=11
[2023-05-26 09:06:57.524][INFO][14890][61g1k013] HTTP-Server listen at tcp://0.0.0.0:8080, fd=12
[2023-05-26 09:06:57.524][INFO][14890][61g1k013] signal installed, reload=1, reopen=10, fast_quit=15, grace_quit=3
[2023-05-26 09:06:57.524][INFO][14890][61g1k013] http: api mount /console to ./objs/nginx/html/console
[2023-05-26 09:06:57.525][INFO][14890][61g1k013] srt listen at udp://0.0.0.0:10080, fd=913740199
[2023-05-26 09:06:57.526][INFO][14890][pv77mgo0] Hybrid cpu=0.00%,22MB
[2023-05-26 09:06:57.526][WARN][14890][67ys2l12][22] use private address as ip: 192.168.0.98, ifname=eth0
[2023-05-26 09:06:57.526][INFO][14890][67ys2l12] Startup query id=vid-x6a77jg, session=vid-m177km1, eip=192.168.0.98, wait=300s
[2023-05-26 09:06:57.526][INFO][14890][f7s7tz13] TCP: connection manager run, conns=0
[2023-05-26 09:06:57.528][INFO][14890][50143363] GB: connection manager run, conns=0
[2023-05-26 09:06:57.528][ERROR][14890][a87b10hl][11][SRT] /root/srs/trunk/objs/Platform-SRS6-Linux-4.9.253-GCC7.5.0-aarch64/srt-1-fit/srtcore/api.cpp:1116(accept) # : srt_accept: no pending connection available at the moment(Resource temporarily unavailable)
[2023-05-26 09:06:57.529][INFO][14890][8853ld42] SRT: connection manager run, conns=0
[2023-05-26 09:06:57.529][INFO][14890][f2p72rs7] RTC: connection manager run, conns=0
[2023-05-26 09:07:02.502][INFO][14890][pv77mgo0] Hybrid cpu=1.00%,22MB
[2023-05-26 09:07:02.507][INFO][14890][7ocz2n90] Process: cpu=0.00%,22MB, threads=2
^C[2023-05-26 09:07:03.432][INFO][14890][61g1k013] sig=2, user terminate program, fast quit
[2023-05-26 09:07:03.505][INFO][14890][61g1k013] cleanup for quit signal fast=1, grace=0
[2023-05-26 09:07:03.507][INFO][14890][7ocz2n90] quit for thread #2(hybrid) finished
  1. SRS Config:
# SRT config.

listen              1935;
max_connections     1000;
daemon              off;
srs_log_tank        console;

http_api {
    enabled         on;
    listen          1985;
}

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

srt_server {
    enabled on;
    listen 10080;
    maxbw 1000000000;
    connect_timeout 4000;
    peerlatency 0;
    recvlatency 0;
    latency 0;
    tsbpdmode off;
    tlpktdrop off;
    sendbuf 2000000;
    recvbuf 2000000;
}

# @doc https://github.com/ossrs/srs/issues/1147#issuecomment-577607026
vhost __defaultVhost__ {
    srt {
        enabled     on;
        srt_to_rtmp on;
    }

    http_remux {
        enabled     on;
        mount       [vhost]/[app]/[stream].flv;
    }
}

# For SRT to use vhost.
vhost srs.srt.com.cn {
}

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

Replay

Please describe how to replay the bug?

Step 1: xxxxxx

shell command:'

Make sure to maintain the markdown structure.
./configure --srt=on --gb28181=on --h265=on
make
./objs/srs -c conf/srt.conf

Expect

The SRT service reports an error upon startup, and it is unclear what is causing the issue.

When starting, the srt service throws an error, and I don't know what is causing it.

Make sure to maintain the markdown structure.

TRANS_BY_GPT3

winlinvip commented 1 year ago

In short, this is not an Error, but a Warning. The SRT service starts normally, and you can push and pull streams without any issues.

However, this problem needs to be fixed because the printed Error log can cause confusion and interference, making users think that something went wrong.