ossrs / srs

SRS is a simple, high-efficiency, real-time video server supporting RTMP, WebRTC, HLS, HTTP-FLV, SRT, MPEG-DASH, and GB28181.

Home Page:https://ossrs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SRS doesn't allow streaming sometimes...

kumaraguru1735 opened this issue · comments

After reboot of server, SRS don't allow incoming stream
SRS log

[2024-03-05 08:31:42.734][INFO][1307][413x65se] TCP: clear zombies=1 resources, conns=384, removing=0, unsubs=0
[2024-03-05 08:31:42.734][INFO][1307][34sw26v3] TCP: disposing #0 resource(RtmpConn)(0x61200027b8c0), conns=384, disposing=1, zombies=0
[2024-03-05 08:31:42.737][INFO][1307][77765003] TCP: before dispose resource(HttpConn)(0x607000322460), conns=383, zombies=0, ign=0, inz=0, ind=0
[2024-03-05 08:31:42.737][WARN][1307][77765003][104] client disconnect peer. ret=1007
[2024-03-05 08:31:42.737][INFO][1307][413x65se] TCP: clear zombies=1 resources, conns=383, removing=0, unsubs=0
[2024-03-05 08:31:42.737][INFO][1307][77765003] TCP: disposing #0 resource(HttpConn)(0x607000322460), conns=383, disposing=1, zombies=0
[2024-03-05 08:31:42.747][INFO][1307][8p339dq9] TCP: before dispose resource(RtmpConn)(0x6120001b1b40), conns=382, zombies=0, ign=0, inz=0, ind=0
[2024-03-05 08:31:42.747][ERROR][1307][8p339dq9][0] serve error code=3064(HttpResponseCode)(No code in HTTP response json object) : service cycle : rtmp: stream service : rtmp: callback on publish : rtmp on_publish https://api.server.ipcloud.live/api/v1/hooks/on_publish : http: on_publish failed, client_id=8p339dq9, url=https://api.server.ipcloud.live/api/v1/hooks/on_publish, request={"server_id":"sid-ipcloud","service_id":"7y22k9v2","action":"on_publish","client_id":"8p339dq9","ip":"103.246.195.186","vhost":"__defaultVhost__","app":"jrptv","tcUrl":"rtmp://ipcloud.live:1935/jrptv","stream":"7thchannel","param":"","stream_url":"/jrptv/7thchannel","stream_id":"vid-30bwve0"}, response={"code":100,"msg":"Failed"}, code=200 : http: response object code 100 {"code":100,"msg":"Failed"}
thread [1307][8p339dq9]: do_cycle() [./src/app/srs_app_rtmp_conn.cpp:263][errno=0]
thread [1307][8p339dq9]: service_cycle() [./src/app/srs_app_rtmp_conn.cpp:457][errno=0]
thread [1307][8p339dq9]: publishing() [./src/app/srs_app_rtmp_conn.cpp:946][errno=0]
thread [1307][8p339dq9]: http_hooks_on_publish() [./src/app/srs_app_rtmp_conn.cpp:1486][errno=0]
thread [1307][8p339dq9]: on_publish() [./src/app/srs_app_http_hooks.cpp:157][errno=0]
thread [1307][8p339dq9]: do_post() [./src/app/srs_app_http_hooks.cpp:669][errno=0]
[2024-03-05 08:31:42.747][INFO][1307][413x65se] TCP: clear zombies=1 resources, conns=382, removing=0, unsubs=0
[2024-03-05 08:31:42.747][INFO][1307][8p339dq9] TCP: disposing #0 resource(RtmpConn)(0x6120001b1b40), conns=382, disposing=1, zombies=0
[2024-03-05 08:31:42.775][INFO][1307][4l2888p4] HTTP #0 117.221.3.181:45870 GET http://ipcloud.live:8080/karthick/karthicktv-4406.ts, content-length=-1
[2024-03-05 08:31:42.776][INFO][1307][4l2888p4] http match file=./objs/nginx/html/karthick/karthicktv-4406.ts, pattern=/, upath=/karthick/karthicktv-4406.ts
[2024-03-05 08:31:42.798][INFO][1307][n4s38049] https: connected to https://api.server.ipcloud.live:443, cost=104ms
[2024-03-05 08:31:42.826][INFO][1307][z7g2j99g] HTTP #0 127.0.0.1:40688 GET http://ipcloud.live/mullaitv/mullaitv-5046.ts, content-length=-1
[2024-03-05 08:31:42.827][INFO][1307][z7g2j99g] http match file=./objs/nginx/html/mullaitv/mullaitv-5046.ts, pattern=/, upath=/mullaitv/mullaitv-5046.ts
[2024-03-05 08:31:42.829][INFO][1307][z7g2j99g] TCP: before dispose resource(HttpConn)(0x6070003fbaf0), conns=383, zombies=0, ign=0, inz=0, ind=0
[2024-03-05 08:31:42.829][INFO][1307][z7g2j99g] client finished.
[2024-03-05 08:31:42.829][INFO][1307][413x65se] TCP: clear zombies=1 resources, conns=383, removing=0, unsubs=0
[2024-03-05 08:31:42.829][INFO][1307][z7g2j99g] TCP: disposing #0 resource(HttpConn)(0x6070003fbaf0), conns=383, disposing=1, zombies=0
[2024-03-05 08:31:42.901][INFO][1307][8342cd18] Hybrid cpu=72.00%,694MB, cid=233,88, timer=62,0,0, clock=0,45,2,1,0,1,1,0,0, free=12, objs=(pkt:0,raw:0,fua:0,msg:38624,oth:0,buf:0)
[2024-03-05 08:31:42.918][INFO][1307][n4s38049] http: on_unpublish ok, client_id=n4s38049, url=https://api.server.ipcloud.live/api/v1/hooks/on_unpublish, request={"server_id":"sid-ipcloud","service_id":"7y22k9v2","action":"on_unpublish","client_id":"n4s38049","ip":"152.58.213.155","vhost":"__defaultVhost__","app":"jrtv","tcUrl":"rtmp://ipcloud.live/jrtv","stream":"jrtvhd","param":"","stream_url":"/jrtv/jrtvhd","stream_id":"vid-00k8q4u"}, response={"code":0,"msg":"OK"}
[2024-03-05 08:31:42.918][INFO][1307][n4s38049] TCP: before dispose resource(RtmpConn)(0x6120001132c0), conns=382, zombies=0, ign=0, inz=0, ind=0
[2024-03-05 08:31:42.918][ERROR][1307][n4s38049][0] serve error code=3001(HlsDecode)(HLS decode av stream failed) : service cycle : rtmp: stream service : rtmp: receive thread : handle publish message : rtmp: consume message : rtmp: consume video : format consume video : demux NALU : avc demux annexb : not annexb
thread [1307][n4s38049]: do_cycle() [./src/app/srs_app_rtmp_conn.cpp:263][errno=0]
thread [1307][n4s38049]: service_cycle() [./src/app/srs_app_rtmp_conn.cpp:457][errno=0]
thread [1307][n4s38049]: do_publishing() [./src/app/srs_app_rtmp_conn.cpp:1030][errno=11]
thread [1307][n4s38049]: consume() [./src/app/srs_app_recv_thread.cpp:380][errno=11]
thread [1307][n4s38049]: handle_publish_message() [./src/app/srs_app_rtmp_conn.cpp:1185][errno=11]
thread [1307][n4s38049]: process_publish_message() [./src/app/srs_app_rtmp_conn.cpp:1213][errno=11]
thread [1307][n4s38049]: on_video_imp() [./src/app/srs_app_source.cpp:2412][errno=11]
thread [1307][n4s38049]: video_avc_demux() [./src/kernel/srs_kernel_codec.cpp:1028][errno=11]
thread [1307][n4s38049]: video_nalu_demux() [./src/kernel/srs_kernel_codec.cpp:2501][errno=11]
thread [1307][n4s38049]: do_avc_demux_annexb_format() [./src/kernel/srs_kernel_codec.cpp:2540][errno=11]
[2024-03-05 08:31:42.918][INFO][1307][413x65se] TCP: clear zombies=1 resources, conns=382, removing=0, unsubs=0

on the log I clearly noted that serve error code=3001(HlsDecode)(HLS decode av stream failed) : service cycle : rtmp: stream service : rtmp: receive thread : handle publish message : rtmp: consume message : rtmp: consume video : format consume video : demux NALU : avc demux annexb : not annexb

SRS version: 6.0.103
os: ubuntu 24

According to the error logs of SRS, your service responded with an error for the HTTP callback to SRS. SRS received an error response from your service, so SRS rejected the connection.

{"code":100,"msg":"Failed"}

So, you should check why your service responded with an error to SRS, but not why SRS rejected the collection. It should reject the collection because that's what you instructed it to do.

It seems there is another error concerning Annex B. So, please avoid describing multiple errors or problems in one issue, as that confuses us about what you are referring to.

both are different, don't confuse them...

I had this problem for 8 months, still not fixed!

Please do not describe multiple issues in one thread. I will close this issue. If you have two issues, please file them in two separate threads. I'm confused; I'm totally confused.