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

编译运行之后日志正常但是sip和rtc的端口都未启动,以服务形式运行则不能正常启动,但是没有有效的错误日志 #55

Open
qnyh9527 opened this issue Jun 15, 2022 · 1 comment

Comments

@qnyh9527
Copy link

编译运行之后日志正常但是sip和rtc的端口都未启动,以服务形式运行则不能正常启动,但是没有有效的错误日志

  1. SRS版本(Version): SRS/5.0.26(Leo), MIT

  2. SRS的日志如下(Log):
    [2022-06-15 13:32:26.260][Trace][3366][64qy7h14] XCORE-SRS/5.0.26(Leo)
    [2022-06-15 13:32:26.261][Trace][3366][64qy7h14] config parse complete
    [2022-06-15 13:32:26.261][Warn][3366][64qy7h14][22] transform: vhost.rtc.bframe to vhost.rtc.keep_bframe off
    [2022-06-15 13:32:26.261][Trace][3366][64qy7h14] write log to console
    [2022-06-15 13:32:26.261][Trace][3366][64qy7h14][MAIN] SRS/5.0.26(Leo), MIT
    [2022-06-15 13:32:26.261][Trace][3366][64qy7h14] authors: Winlin[email protected] ZhaoWenjie[email protected] ShiWei[email protected] XiaoZhihong[email protected] WuPengqiang[email protected] XiaLixin[email protected] LiPeng[email protected] ChenGuanghua[email protected] ChenHaibo[email protected] Johzzy[email protected] Zhouxiaojun2008[email protected] Pengfei.ma[email protected] ZhangJunqin[email protected] and https://github.com/ossrs/srs/blob/develop/trunk/AUTHORS.md#contributors
    [2022-06-15 13:32:26.261][Trace][3366][64qy7h14] cwd=/home/srs-gb28181-feature-gb28181/trunk, work_dir=./, build: 2022-06-15 13:27:19, configure: --x86-x64 --with-gb28181, uname: Linux localhost.localdomain 3.10.0-957.el7.x86_64 GB28181: fixed crash when deleting gb28181 channel  #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux, osx: 0, pkg: , region: , source:
    [2022-06-15 13:32:26.261][Trace][3366][64qy7h14] 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=off --rtc=on --simulator=off --gb28181=on --iconv=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-06-15 13:32:26.261][Trace][3366][64qy7h14] srs checking config...
    [2022-06-15 13:32:26.263][Trace][3366][64qy7h14] ips, iface[0] ens192 ipv4 0x11043 192.168.41.8, iface[1] ens192 ipv6 0x11043 fe80::e655:86af:184e:9d09%ens192, iface[2] ens192 ipv6 0x11043 fe80::8dba:e362:bb62:4d51%ens192, iface[3] ens192 ipv6 0x11043 fe80::b501:2507:c9d2:5971%ens192
    [2022-06-15 13:32:26.263][Trace][3366][64qy7h14] devices, intranet ens192 192.168.41.8, intranet ens192 fe80::e655:86af:184e:9d09%ens192, intranet ens192 fe80::8dba:e362:bb62:4d51%ens192, intranet ens192 fe80::b501:2507:c9d2:5971%ens192
    [2022-06-15 13:32:26.263][Warn][3366][64qy7h14][22] stats network use index=0, ip=192.168.41.8, ifname=ens192
    [2022-06-15 13:32:26.263][Warn][3366][64qy7h14][22] stats disk not configed, disk iops disabled.
    [2022-06-15 13:32:26.263][Trace][3366][64qy7h14] write log to console
    [2022-06-15 13:32:26.263][Trace][3366][64qy7h14] features, rch:on, dash:on, hls:on, hds:off, srt:off, hc:on, ha:on, hs:on, hp:on, dvr:on, trans:on, inge:on, stat:on, sc:on
    [2022-06-15 13:32:26.263][Trace][3366][64qy7h14] SRS on amd64 x86_64, conf:conf/push.gb28181.conf, limit:1000, writev:1024, encoding:little-endian, HZ:100
    [2022-06-15 13:32:26.263][Trace][3366][64qy7h14] mw sleep:350ms. mr enabled:on, default:0, sleep:350ms
    [2022-06-15 13:32:26.263][Trace][3366][64qy7h14] gc:on, pq:30000ms, cscc:[0,16), csa:on, tn:on(may hurts performance), ss:auto(guess by merged write)
    [2022-06-15 13:32:26.263][Trace][3366][64qy7h14] system default latency(ms): mw(0-350) + mr(0-350) + play-queue(0-30000)
    [2022-06-15 13:32:26.263][Warn][3366][64qy7h14][22] SRS/5.0.26 is not stable
    [2022-06-15 13:32:26.269][Trace][3366][64qy7h14] fingerprint=D7:C7:E2:AA:4D:CC:02:D9:82:92:83:5C:67:A6:9A:12:F2:61:6B:32:C4:1C:0D:2F:C9:C5:6E:84:FB:60:C9:56
    [2022-06-15 13:32:26.269][Trace][3366][64qy7h14] CircuitBreaker: enabled=1, high=2x90, critical=1x95, dying=5x99
    [2022-06-15 13:32:26.269][Trace][3366][64qy7h14] http flv live stream, vhost=defaultVhost, mount=[vhost]/[app]/[stream].flv
    [2022-06-15 13:32:26.269][Trace][3366][64qy7h14] http: root mount to ./objs/nginx/html
    [2022-06-15 13:32:26.269][Trace][3366][64qy7h14] server main cid=64qy7h14, pid=3366, ppid=6498, asprocess=0
    [2022-06-15 13:32:26.269][Trace][3366][64qy7h14] write pid=3366 to ./objs/srs.pid success!
    [2022-06-15 13:32:26.270][Trace][3366][64qy7h14] RTMP listen at tcp://0.0.0.0:1935, fd=7
    [2022-06-15 13:32:26.270][Trace][3366][64qy7h14] HTTP-API listen at tcp://0.0.0.0:1985, fd=8
    [2022-06-15 13:32:26.270][Trace][3366][64qy7h14] HTTP-Server listen at tcp://0.0.0.0:8080, fd=9
    [2022-06-15 13:32:26.272][Trace][3366][64qy7h14] UDP GB28181:DVR失败,只有48B;重新初始化摄像头后会好用, 但过一段时间重现 #2705 #10 LISTEN at 0.0.0.0:5060, SO_SNDBUF(default=212992, expect=10485760, actual=425984, r0=0), SO_RCVBUF(default=212992, expect=10485760, actual=425984, r0=0)
    [2022-06-15 13:32:26.272][Trace][3366][64qy7h14] GB28181-SIP over UDP listen at udp://0.0.0.0:5060, fd=10
    [2022-06-15 13:32:26.278][Trace][3366][64qy7h14] signal installed, reload=1, reopen=10, fast_quit=15, grace_quit=3
    [2022-06-15 13:32:26.278][Trace][3366][64qy7h14] http: api mount /console to ./objs/nginx/html/console
    [2022-06-15 13:32:26.278][Trace][3366][64qy7h14] rtc listen at udp://0.0.0.0:8000, fd=12
    [2022-06-15 13:32:26.279][Trace][3366][647u8487] Hybrid cpu=0.00%,13MB
    [2022-06-15 13:32:26.279][Warn][3366][93x860os][22] use private address as ip: 192.168.41.8, ifname=ens192
    [2022-06-15 13:32:26.279][Trace][3366][93x860os] Startup query id=8a4ef526ec6c11ec9dd7f7feefe43c6a, eip=192.168.41.8, wait=542s
    [2022-06-15 13:32:26.279][Trace][3366][s0488umj] GB28181: connection manager run, conns=0
    [2022-06-15 13:32:26.279][Trace][3366][x10o9m30] GB28181TCP: connection manager run, conns=0
    [2022-06-15 13:32:26.279][Trace][3366][29058m18] TCP: connection manager run, conns=0
    [2022-06-15 13:32:26.280][Trace][3366][94u69208] UDP GB28181: SRS 60路摄像头推流转发为hls后频繁奔溃 #2624 #12 LISTEN at 0.0.0.0:8000, SO_SNDBUF(default=212992, expect=10485760, actual=425984, r0=0), SO_RCVBUF(default=212992, expect=10485760, actual=425984, r0=0)
    [2022-06-15 13:32:26.280][Trace][3366][2k64fs3s] RTC: connection manager run, conns=0

  3. SRS的配置如下(Config):

push gb28181 stream to SRS.

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

http_api {
enabled on;
listen 1985;
}

http_server {
enabled on;
listen 8080;
}

stats {
network 0;
}

stream_caster {
enabled on;
caster gb28181;

# 转发流到rtmp服务器地址与端口
# TODO: https://github.com/ossrs/srs/pull/1679/files#r400875104
# [stream] is VideoChannelCodecID(视频通道编码ID) for sip
# 自动创建的道通[stream] 是‘chid[ssrc]’ [ssrc]是rtp的ssrc
# [ssrc] rtp中的ssrc
output              rtmp://127.0.0.1:1935/live/[stream];

# 接收设备端rtp流的多路复用端口
listen              9000;
# 多路复用端口类型,on为tcp,off为udp
# 默认:on
tcp_enable            on;

# rtp接收监听端口范围,最小值
rtp_port_min        58200;
# rtp接收监听端口范围,最大值
rtp_port_max        58300;

# 是否等待关键帧之后,再转发,
# off:不需等待,直接转发
# on:等第一个关键帧后,再转发
wait_keyframe       on;

# rtp包空闲等待时间,如果指定时间没有收到任何包
# rtp监听连接自动停止,发送BYE命令
rtp_idle_timeout    30;

# 是否转发音频流
# 目前只支持aac格式,所以需要设备支持aac格式
# on:转发音频
# off:不转发音频,只有视频
# *注意*!!!:flv 只支持11025  22050  44100 三种
# 如果设备端没有三种中任何一个,转发时为自动选择一种格式
# 同时也会将adts的头封装在flv aac raw数据中
# 这样的话播放器为自动通过adts头自动选择采样频率
# 像ffplay, vlc都可以,但是flash是没有声音,
# 因为flash,只支持11025 22050 44100
audio_enable        off;


# 服务器主机号,可以域名或ip地址
# 也就是设备端将媒体发送的地址,如果是服务器是内外网
# 需要写外网地址,
# 调用api创建stream session时返回ip地址也是host
# $CANDIDATE 是系统环境变量,从环境变量获取地址,如果没有配置,用*
# *代表指定stats network 的网卡号地址,如果没有配置network,默认则是第0号网卡地址
# TODO: https://github.com/ossrs/srs/pull/1679/files#r400917594
host       192.168.41.8;

#根据收到ps rtp包自带创建rtmp媒体通道,不需要api接口创建
#rtmp地址参数[stream] 就是通道id  格式chid[ssrc]
auto_create_channel   off;

sip {
    # 是否启用srs内部sip信令
    # 为on信令走srs, off 只转发ps流
    enabled on;
    
    # sip监听udp端口
    listen              5060;
    
    # SIP server ID(SIP服务器ID).
    # 设备端配置编号需要与该值一致,否则无法注册
    serial              34020000002000000001;

    # SIP server domain(SIP服务器域)
    realm               3402000000;

    # 服务端发送ack后,接收回应的超时时间,单位为秒
    # 如果指定时间没有回应,认为失败
    ack_timeout         30;

    # 设备心跳维持时间,如果指定时间内(秒)没有接收一个心跳
    # 认为设备离线
    keepalive_timeout   120;

    # 注册之后是否自动给设备端发送invite
    # on: 是  off 不是,需要通过api控制
    auto_play           on;
    # 设备将流发送的端口,是否固定
    # on 发送流到多路复用端口 如9000
    # off 自动从rtp_mix_port - rtp_max_port 之间的值中
    # 选一个可以用的端口
    invite_port_fixed     on;

    # 向设备或下级域查询设备列表的间隔,单位(秒)
    # 默认60秒
    query_catalog_interval  60;
}

}

rtc_server {
enabled on;
# Listen at udp://8000
listen 8000;
#
# The $CANDIDATE means fetch from env, if not configed, use * as default.
#
# The * means retrieving server IP automatically, from all network interfaces,
# @see ossrs/srs#307 (comment)
candidate 192.168.41.8;
}

vhost defaultVhost {
rtc {
enabled on;
bframe discard;
}

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

}

@qnyh9527
Copy link
Author

[2022-06-15 14:37:53.488][Trace][3389][8j42d648] RTC: connection manager run, conns=0
[2022-06-15 14:37:53.635][Trace][3389][755538r2] sip: Notify cmdtype=Alarm not processed
[2022-06-15 14:37:53.635][Trace][3389][755538r2] gb28181: 9171 client not registered
[2022-06-15 14:37:54.634][Trace][3389][755538r2] sip: Notify cmdtype=Alarm not processed
[2022-06-15 14:37:54.634][Trace][3389][755538r2] gb28181: 9171 client not registered
[2022-06-15 14:37:55.382][Trace][3389][755538r2] gb28181: request client id=9171 peer(192.168.19.33, 5060)
[2022-06-15 14:37:55.382][Trace][3389][755538r2] gb28181: request method=REGISTER, uri=sip:34020000002000000001@3402000000, version=SIP/2.0 expires=3600
[2022-06-15 14:37:56.633][Trace][3389][755538r2] sip: Notify cmdtype=Alarm not processed
[2022-06-15 14:37:57.383][Trace][3389][v0ck2s84] gb28181: sip session=9171 peer(192.168.19.33, 5060) status(RegisterOk,AliveOk) duration(2,0)
[2022-06-15 14:37:57.645][Trace][3389][755538r2] sip: Notify cmdtype=Alarm not processed
[2022-06-15 14:37:58.476][Trace][3389][a18fx3d8] Hybrid cpu=0.00%,13MB
[2022-06-15 14:37:58.644][Trace][3389][755538r2] sip: Notify cmdtype=Alarm not processed
没有5060端口后端还能收到注册信息,设备上也显示注册成功。但是srs控制台没流,也不能播放

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant