nICEnnnnnnnLee / BilibiliLiveRecorder

pure-java B站/Acfun/斗鱼/虎牙/快手/抖音/YY/战旗/花椒 直播视频录制。仅需Java环境即可运行【维护模式,不主动新增Feature】
Other
790 stars 108 forks source link

ContOS7 服务器上报错 JSONObject["quality_description"] not found #43

Closed xiaomuzhu closed 4 years ago

xiaomuzhu commented 4 years ago

执行命令:java -Dfile.encoding=utf-8 -jar BiliLiveRecorder.jar "debug=false&check=false&delete=false&qn=150&liver=bili&id=4629447&retry=5&"

报错信息:

org.json.JSONException: JSONObject["quality_description"] not found.
        at org.json.JSONObject.get(JSONObject.java:573)
        at org.json.JSONObject.getJSONArray(JSONObject.java:748)
        at nicelee.bilibili.live.impl.RoomDealerBilibili.getRoomInfo(RoomDealerBilibili.java:52)
        at nicelee.bilibili.Main.main(Main.java:90)

服务器版本:CentOS Linux release 7.6.1810 (Core) Java版本 :openjdk version "1.8.0_252",OpenJDK Runtime Environment (build 1.8.0_252-b09)


但是经测试,在虎牙、斗鱼是可以正常运行的,唯独B站不可用。

在MacOS 上一切正常,唯独在我的ContOS服务器上对B站产生报错。


经过测试发现,如果在MacOS 下开启 ClashX 代理,在B站录制中同样会产生以上报错,当关闭代理后恢复正常。

但是我们ContOS 服务器没有用任何代理。

nICEnnnnnnnLee commented 4 years ago

能把debug=true后的详细log贴一下吗?
我这边拿美国的ip测试了一下查询接口,似乎没有问题

xiaomuzhu commented 4 years ago

命令行:java -Dfile.encoding=utf-8 -jar BiliLiveRecorder.jar "debug=true&check=false&delete=false&qn=150&liver=bili&id=4629447&retry=5&"

报错如下:

bili 直播录制 version v2.7.0
发送GET请求出现异常!java.net.SocketTimeoutException: Read timed out
java.net.SocketTimeoutException: Read timed out
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
        at java.net.SocketInputStream.read(SocketInputStream.java:171)
        at java.net.SocketInputStream.read(SocketInputStream.java:141)
        at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
        at sun.security.ssl.InputRecord.read(InputRecord.java:503)
        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:975)
        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1395)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1379)
        at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:167)
        at nicelee.bilibili.util.HttpRequestUtil.getContent(HttpRequestUtil.java:294)
        at nicelee.bilibili.live.impl.RoomDealerBilibili.getRoomInfo(RoomDealerBilibili.java:32)
        at nicelee.bilibili.Main.main(Main.java:90)
RoomDealerBilibili-getRoomInfo/33 : 
org.json.JSONException: A JSONObject text must begin with '{' at 0 [character 1 line 1]
        at org.json.JSONTokener.syntaxError(JSONTokener.java:507)
        at org.json.JSONObject.<init>(JSONObject.java:222)
        at org.json.JSONObject.<init>(JSONObject.java:406)
        at nicelee.bilibili.live.impl.RoomDealerBilibili.getRoomInfo(RoomDealerBilibili.java:35)
        at nicelee.bilibili.Main.main(Main.java:90)
解析失败!!

@nICEnnnnnnnLee 我去查了一下说是B站直播把阿里云、腾讯云的服务器ip都封锁了,不知道是不是这个原因。

github-actions[bot] commented 4 years ago

由于长期没有状态更新,该问题自动关闭。如有需要可重新打开。