最近看Kingkong的时候他们又坏掉了。某一部分主播总是没办法看,并且控制台显示加载404。
前情
就和简介说的一样,Kingkong直播最近又有一部份主播无法加载了。我不是很确定这到底是地区性的影响还是房间问题,但是过了这么久时间都没修,我也来咸鱼一下这个问题。
咸鱼过程
由于Firefox的特性,我一向用Chrome来做别的事的,例如说看直播。Chrome的控制台大概显示这样的东西:
GET https://1gr4uqmtt8y41hcjigazdqpo.ourdvsss.com/video-ws-kk.lv-play.com/obslive/直播号.flv?wshc_tag=1&wsts_tag=忘了是啥&wsid_tag=好像是我的账号&wsiphost=ipdbm 404 (Not Found) liveRoom.5d7f9413.js?v=1.2.14:422
[IOController] > Loader error, code = 404, msg = Not Found liveRoom.5d7f9413.js?v=1.2.14:422
value @ liveRoom.5d7f9413.js?v=1.2.14:422
(anonymous) @ liveRoom.5d7f9413.js?v=1.2.14:422
Promise.then (async)
value @ liveRoom.5d7f9413.js?v=1.2.14:422
value @ liveRoom.5d7f9413.js?v=1.2.14:422
value @ liveRoom.5d7f9413.js?v=1.2.14:422
value @ liveRoom.5d7f9413.js?v=1.2.14:422
value @ liveRoom.5d7f9413.js?v=1.2.14:422
value @ liveRoom.5d7f9413.js?v=1.2.14:422
(anonymous) @ liveRoom.5d7f9413.js?v=1.2.14:422
n.emit @ liveRoom.5d7f9413.js?v=1.2.14:422
value @ liveRoom.5d7f9413.js?v=1.2.14:422
[TransmuxingController] > IOException: type = HttpStatusCodeInvalid, code = 404, msg = Not Found liveRoom.5d7f9413.js?v=1.2.14:422
value @ liveRoom.5d7f9413.js?v=1.2.14:422
value @ liveRoom.5d7f9413.js?v=1.2.14:422
value @ liveRoom.5d7f9413.js?v=1.2.14:422
(anonymous) @ liveRoom.5d7f9413.js?v=1.2.14:422
Promise.then (async)
value @ liveRoom.5d7f9413.js?v=1.2.14:422
value @ liveRoom.5d7f9413.js?v=1.2.14:422
value @ liveRoom.5d7f9413.js?v=1.2.14:422
value @ liveRoom.5d7f9413.js?v=1.2.14:422
value @ liveRoom.5d7f9413.js?v=1.2.14:422
value @ liveRoom.5d7f9413.js?v=1.2.14:422
(anonymous) @ liveRoom.5d7f9413.js?v=1.2.14:422
n.emit @ liveRoom.5d7f9413.js?v=1.2.14:422
value @ liveRoom.5d7f9413.js?v=1.2.14:422
Uncaught (in promise) Error: Uncaught, unspecified "error" event. (NetworkError) liveRoom.5d7f9413.js?v=1.2.14:422
at n.emit (liveRoom.5d7f9413.js?v=1.2.14:422)
at n.<anonymous> (liveRoom.5d7f9413.js?v=1.2.14:422)
at n.emit (liveRoom.5d7f9413.js?v=1.2.14:422)
at liveRoom.5d7f9413.js?v=1.2.14:422
总共有4个报错,看起来就像是一起的。无法加载视频流的原因是404,似乎很合理。但是问题是,为什么只有一部分直播间会出这个问题呢?
幸好有一部分直播间还能看,我去找了这个一下两个的规律。它们(能看的和不能看的请求)分别长这样:
https://1gr4uqmtt8y41hcjigazdqpa.ourdvsss.com/video-ws-kk.lv-play.com/obslive/直播号.flv?wshc_tag=1&wsts_tag=忘了是啥&wsid_tag=好像是我的账号&wsiphost=ipdbm
https://1gr4uqmtt8y41hcjigazdqpo.ourdvsss.com/video-ws-kk.lv-play.com/obslive/直播号.flv?wshc_tag=1&wsts_tag=忘了是啥&wsid_tag=好像是我的账号&wsiphost=ipdbm
emmmmmmmm…
结果
我dig了一下这两个域名,发现就差一丁点儿:
1gr4uqmtt8y41hcjigazdqpa.ourdvsss.com. 4697 IN A 157.185.156.77
1gr4uqmtt8y41hcjigazdqpo.ourdvsss.com. 70610 IN A 157.185.156.76
机智的我想到,HTTPS不能随便改,那我强行把两个地址搞到一起去不就好了吗!
在hosts文件上加了一行157.185.156.77 1gr4uqmtt8y41hcjigazdqpo.ourdvsss.com
以后好了。