hr3lxphr6j / bililive-go

一个直播录制工具
GNU General Public License v3.0
3.83k stars 494 forks source link

level=warning msg="failed to get stream url, will retry after 5s..." error="room not exists" #430

Open SoulMateK opened 1 year ago

SoulMateK commented 1 year ago

抓取斗鱼的连接发现这个问题

SoulMateK commented 1 year ago

使用场景docker,部署环境truenas

kira1928 commented 1 year ago

打开 config 里的 debug flag 保存后重启程序再试试看,这样可以取到更多 log 来调查具体原因。

SoulMateK commented 1 year ago

打开 config 里的 debug flag 保存后重启程序再试试看,这样可以取到更多 log 来调查具体原因。

日志如下,后面都是warning了 2023-03-27 16:42:12.055471+00:00time="2023-03-28 00:42:12" level=info msg="BiliLive-go Version: v0.7.8 Link Start" 2023-03-27 16:42:12.055514+00:00time="2023-03-28 00:42:12" level=debug msg="config path: /etc/bililive-go/config.yml." 2023-03-27 16:42:12.055525+00:00time="2023-03-28 00:42:12" level=debug msg="other flags have been ignored." 2023-03-27 16:42:12.055701+00:00time="2023-03-28 00:42:12" level=debug msg="{AppName:BiliLive-go AppVersion:v0.7.8 BuildTime:2023-02-19_11:52:43 GitHash:aedb289f836c1e816bf3b3e88d8f020f44017eac Pid:1 Platform:linux/amd64 GoVersion:go1.19.5}" 2023-03-27 16:42:12.055940+00:00time="2023-03-28 00:42:12" level=debug msg="&{File:/etc/bililive-go/config.yml RPC:{Enable:true Bind:127.0.0.1:8080} Debug:true Interval:20 OutPutPath:./ Log:{OutPutFolder:./ SaveLastLog:true SaveEveryLog:false} Feature:{UseNativeFlvParser:false RemoveSymbolOtherCharacter:false} LiveRooms:[{Url:https://www.douyu.com/2132902 IsListening:true LiveId:}] OutputTmpl: VideoSplitStrategies:{OnRoomNameChanged:false MaxDuration:0s} Cookies:map[] OnRecordFinished:{ConvertToMp4:false DeleteFlvAfterConvert:false} TimeoutInUs:60000000 liveRoomIndexCache:map[https://www.douyu.com/2132902:0]}" 2023-03-27 16:42:12.686457+00:00time="2023-03-28 00:42:12" level=info msg="Server start at 127.0.0.1:8080" 2023-03-27 16:42:12.711016+00:00time="2023-03-28 00:42:12" level=info msg="Live Start" host="陈翔六点半" room="陈翔六点半:兄弟们最喜欢哪个演员" 2023-03-27 16:42:12.711059+00:00time="2023-03-28 00:42:12" level=info msg="Record Start" host="陈翔六点半" room="陈翔六点半:兄弟们最喜欢哪个演员"

SoulMateK commented 1 year ago

然后我这边还发现另外一个问题,如果我挂载/etc/bililive-go文件夹做config持久化时,就会无法访问端口展示webui,但容器在正常运行;如果不挂载则可以展示,但无法持久化config.yml

kira1928 commented 1 year ago

上面的log没包含 level=warning msg="failed to get stream url, will retry after 5s..." error="room not exists" 啊,需要发生问题时的 log。

然后我这边还发现另外一个问题,如果我挂载/etc/bililive-go文件夹做config持久化时,就会无法访问端口展示webui,但容器在正常运行;如果不挂载则可以展示,但无法持久化config.yml

无法展示 webui 是什么症状?当时的 log 有吗? 我是用群晖的 docker 持久化 config 的,你可以参考一下 image

SoulMateK commented 1 year ago

抱歉日志截取少了,启动后立刻会有warning,看了下代码,感觉时获得房间的基本信息失败了,我试了很多斗鱼的房间,都不行,但是bilibili的ok,辛苦帮忙看下 2023-03-28 02:49:33.452674+00:00time="2023-03-28 10:49:33" level=info msg="BiliLive-go Version: v0.7.8 Link Start" 2023-03-28 02:49:33.452880+00:00time="2023-03-28 10:49:33" level=debug msg="config path: /etc/bililive-go/config.yml." 2023-03-28 02:49:33.452900+00:00time="2023-03-28 10:49:33" level=debug msg="other flags have been ignored." 2023-03-28 02:49:33.452921+00:00time="2023-03-28 10:49:33" level=debug msg="{AppName:BiliLive-go AppVersion:v0.7.8 BuildTime:2023-02-19_11:52:43 GitHash:aedb289f836c1e816bf3b3e88d8f020f44017eac Pid:1 Platform:linux/amd64 GoVersion:go1.19.5}" 2023-03-28 02:49:33.452949+00:00time="2023-03-28 10:49:33" level=debug msg="&{File:/etc/bililive-go/config.yml RPC:{Enable:true Bind:127.0.0.1:8080} Debug:true Interval:20 OutPutPath:/srv/bililive/ Log:{OutPutFolder:./ SaveLastLog:true SaveEveryLog:false} Feature:{UseNativeFlvParser:false RemoveSymbolOtherCharacter:false} LiveRooms:[{Url:https://www.douyu.com/2132902 IsListening:true LiveId:}] OutputTmpl: VideoSplitStrategies:{OnRoomNameChanged:false MaxDuration:0s} Cookies:map[] OnRecordFinished:{ConvertToMp4:false DeleteFlvAfterConvert:false} TimeoutInUs:60000000 liveRoomIndexCache:map[https://www.douyu.com/2132902:0]}" 2023-03-28 02:49:33.914050+00:00time="2023-03-28 10:49:33" level=info msg="Server start at 127.0.0.1:8080" 2023-03-28 02:49:33.920618+00:00time="2023-03-28 10:49:33" level=info msg="Live Start" host="陈翔六点半" room="陈翔六点半:兄弟们最喜欢哪个演员" 2023-03-28 02:49:33.920702+00:00time="2023-03-28 10:49:33" level=info msg="Record Start" host="陈翔六点半" room="陈翔六点半:兄弟们最喜欢哪个演员" 2023-03-28 02:49:34.738500+00:00time="2023-03-28 10:49:34" level=warning msg="failed to get stream url, will retry after 5s..." error="room not exists" host="陈翔六点半" room="陈翔六点半:兄弟们最喜欢哪个演员" 2023-03-28 02:49:39.873858+00:00time="2023-03-28 10:49:39" level=warning msg="failed to get stream url, will retry after 5s..." error="room not exists" host="陈翔六点半" room="陈翔六点半:兄弟们最喜欢哪个演员" 2023-03-28 02:49:45.009214+00:00time="2023-03-28 10:49:45" level=warning msg="failed to get stream url, will retry after 5s..." error="room not exists" host="陈翔六点半" room="陈翔六点半:兄弟们最喜欢哪个演员"

SoulMateK commented 1 year ago

config.yml持久化这个,我用的truenas,尝试这么挂载了,单纯从端口访问ERR_CONNECTION_REFUSED,看了下没有相关日志(至少在根的.log文件下没有)如果不挂载着config.yml,就可以正常出web页面。 尝试debug下页面,但是请求没有带回response,感觉很奇怪,不知道卡在哪步了

kira1928 commented 1 year ago

抱歉日志截取少了,启动后立刻会有warning,看了下代码,感觉时获得房间的基本信息失败了,我试了很多斗鱼的房间,都不行,但是bilibili的ok,辛苦帮忙看下

看 debug log 也看不出什么具体原因来,需要程序添加详细的错误信息之后才能进一步调查了。也许下个版本可以为斗鱼相关录制过程加入这些 log,目前我是没有什么头绪了。

config.yml持久化这个,我用的truenas,尝试这么挂载了,单纯从端口访问ERR_CONNECTION_REFUSED,看了下没有相关日志(至少在根的.log文件下没有)如果不挂载着config.yml,就可以正常出web页面。 尝试debug下页面,但是请求没有带回response,感觉很奇怪,不知道卡在哪步了

没有日志是一行都没有吗?有的话就算只是启动时的 log 也想看一下。 我怀疑你持久化 config.yml 后,映射到 /etc/bililive-go/config.yml 位置上的内容不对,或者文件不存在? webui 的启用是 config 中的 rpc 下的 enable 一项控制的,我怀疑实际使用的 config 里没有开启这一项,所以我想看启动 log。debug 状态下,启动 log 会打印整个 config 的内容用来检查。如果没有使用 config 文件启动,log 里也会说明。总之需要有 log 才能做进一步调查。

SoulMateK commented 1 year ago

启动日志

抱歉日志截取少了,启动后立刻会有warning,看了下代码,感觉时获得房间的基本信息失败了,我试了很多斗鱼的房间,都不行,但是bilibili的ok,辛苦帮忙看下 2023-03-28 02:49:33.452674+00:00time="2023-03-28 10:49:33" level=info msg="BiliLive-go Version: v0.7.8 Link Start" 2023-03-28 02:49:33.452880+00:00time="2023-03-28 10:49:33" level=debug msg="config path: /etc/bililive-go/config.yml." 2023-03-28 02:49:33.452900+00:00time="2023-03-28 10:49:33" level=debug msg="other flags have been ignored." 2023-03-28 02:49:33.452921+00:00time="2023-03-28 10:49:33" level=debug msg="{AppName:BiliLive-go AppVersion:v0.7.8 BuildTime:2023-02-19_11:52:43 GitHash:aedb289f836c1e816bf3b3e88d8f020f44017eac Pid:1 Platform:linux/amd64 GoVersion:go1.19.5}" 2023-03-28 02:49:33.452949+00:00time="2023-03-28 10:49:33" level=debug msg="&{File:/etc/bililive-go/config.yml RPC:{Enable:true Bind:127.0.0.1:8080} Debug:true Interval:20 OutPutPath:/srv/bililive/ Log:{OutPutFolder:./ SaveLastLog:true SaveEveryLog:false} Feature:{UseNativeFlvParser:false RemoveSymbolOtherCharacter:false} LiveRooms:[{Url:https://www.douyu.com/2132902 IsListening:true LiveId:}] OutputTmpl: VideoSplitStrategies:{OnRoomNameChanged:false MaxDuration:0s} Cookies:map[] OnRecordFinished:{ConvertToMp4:false DeleteFlvAfterConvert:false} TimeoutInUs:60000000 liveRoomIndexCache:map[https://www.douyu.com/2132902:0]}" 2023-03-28 02:49:33.914050+00:00time="2023-03-28 10:49:33" level=info msg="Server start at 127.0.0.1:8080" 2023-03-28 02:49:33.920618+00:00time="2023-03-28 10:49:33" level=info msg="Live Start" host="陈翔六点半" room="陈翔六点半:兄弟们最喜欢哪个演员" 2023-03-28 02:49:33.920702+00:00time="2023-03-28 10:49:33" level=info msg="Record Start" host="陈翔六点半" room="陈翔六点半:兄弟们最喜欢哪个演员" 2023-03-28 02:49:34.738500+00:00time="2023-03-28 10:49:34" level=warning msg="failed to get stream url, will retry after 5s..." error="room not exists" host="陈翔六点半" room="陈翔六点半:兄弟们最喜欢哪个演员" 2023-03-28 02:49:39.873858+00:00time="2023-03-28 10:49:39" level=warning msg="failed to get stream url, will retry after 5s..." error="room not exists" host="陈翔六点半" room="陈翔六点半:兄弟们最喜欢哪个演员" 2023-03-28 02:49:45.009214+00:00time="2023-03-28 10:49:45" level=warning msg="failed to get stream url, will retry after 5s..." error="room not exists" host="陈翔六点半" room="陈翔六点半:兄弟们最喜欢哪个演员"

启动日志就这么多,和根目录下的一样,具体如下,复制的仓库里的config rpc: enable: true bind: 127.0.0.1:8080 debug: true interval: 20 out_put_path: /srv/bililive/ log: out_put_folder: ./ save_last_log: true save_every_log: false feature: use_native_flv_parser: false live_rooms: - url: https://www.douyu.com/2132902 is_listening: true out_put_tmpl: "" video_split_strategies: on_room_name_changed: false max_duration: 0s cookies: {} on_record_finished: convert_to_mp4: false delete_flv_after_convert: false timeout_in_us: 60000000

1136623363 commented 1 year ago

陈翔六点半都是视频轮播吧,这种的好像是不会录制的

kira1928 commented 1 year ago

@1136623363 确实录播不会录制,但这个频道好像不是斗鱼系统上的录播回放,而是主播自己用视频充当直播在播,斗鱼判定是直播不是轮播,所以是可以录制的。 他说 我试了很多斗鱼的房间,都不行,但是bilibili的ok ,大概是有其他问题吧。

@SoulMateK

启动日志就这么多,和根目录下的一样

如果上面的启动日志就是 挂载/etc/bililive-go文件夹做config持久化时,就会无法访问端口展示webui,但容器在正常运行 时的日志的话,那我确实没什么思路了。 日志显示你的 rpc 是 enable 的,webui 应该就可以访问,你那里却不能访问。我无法理解。。