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

WebRTC: Play stucked when no Internet. #3463

Open
kewell-tsao opened this issue Mar 13, 2023 · 2 comments
Open

WebRTC: Play stucked when no Internet. #3463

kewell-tsao opened this issue Mar 13, 2023 · 2 comments
Assignees
Labels
Bug It might be a bug. EnglishNative This issue is conveyed exclusively in English. Enhancement Improvement or enhancement.

Comments

@kewell-tsao
Copy link

kewell-tsao commented Mar 13, 2023

Description

SRS Version: v4.0-r4

SRS Log:

[2023-03-13 02:09:06.112][Trace][1][413s303w] query release err  : http: connect server : http: tcp connect http api.ossrs.net:80 to=30000ms, rto=30000ms : tcp: connect api.ossrs.net:80 to=30000ms : get address info
[2023-03-13 02:09:06.112][Trace][1][413s303w] Finish query id=vid-q06122l, session=vid-l7bohx4, eip=172.17.0.4, match=4.0.206, stable=4.0.206, cost=20020ms, url=http://api.ossrs.net/service/v1/releases?version=v4.0.268&id=vid-q06122l&session=vid-l7bohx4&role=srs&eip=172.17.0.4&ts=1678673326092802&alive=3900&os=linux&x86=1&docker=1&packager=dcis&rtc=1&api=1&raw=1&vhosts=1&hooks=1&streams=1&clients=3&recv=1216
[2023-03-13 02:09:06.112][Trace][1][mgzt3ml7] Hybrid cpu=2.00%,21MB, cid=32,3, timer=19,0,31, clock=0,13,2,0,0,0,0,0,0, objs=(pkt:142,raw:67,fua:74,msg:185,oth:1,buf:16)
[2023-03-13 02:09:06.112][Trace][1][mgzt3ml7] RTC: Server conns=2, rpkts=(3,rtp:0,stun:1,rtcp:3), spkts=(62,rtp:62,stun:1,rtcp:0), fid=(id:0,fid:3,ffid:0,addr:1,faddr:3)
[2023-03-13 02:09:06.112][Trace][1][07r57i05] <- RTC RECV #10, udp 7, pps 4/0, schedule 7

Replay

Please describe how to replay the bug?

Step 1: Set up an SRS server using Docker according to the documentation, with no external network connection in the local area network.

objs/srs -c conf/rtmp2rtc.conf

Step 2: Use OBS to push RTMP stream, and play it using Chrome WebRTC Player. The video is normal.

Step 3: Wait for about 10~50 minutes, the video playback in Chrome gets stuck, and SRS logs the above information. OBS streaming is normal.

Control Test 1: Restore external network connection in the local area network, and repeat Step 2 without any abnormalities.

Control Test 2: Disconnect external network connection in the local area network, add the configuration line query_latest_version off;, and repeat Step 2 without any abnormalities.

Expect

The version query feature #2424 should not have any impact on the main business under any circumstances.

@winlinvip
Copy link
Member

winlinvip commented Mar 14, 2023

This is essentially due to the DNS resolution blocking, as referenced in #2112

The version query will only query an SRS API domain, so it will trigger this issue.

In fact, when RTC uses a domain name, if the callback has a domain name, this issue will also occur.

Therefore, the final solution to this problem is to resolve issue #2112.

Temporary Workarounds:

  1. Turn off version query: query_latest_version off;
  2. Avoid using domain names in callbacks.
  3. Avoid using domain names in RTC, including CANDIDATE and API.

@winlinvip winlinvip added the Enhancement Improvement or enhancement. label Mar 14, 2023
@winlinvip winlinvip changed the title WebRTC: Play stucked when no Internet. 无外网环境下播放卡死 WebRTC: Play stucked when no Internet. Jul 18, 2023
@winlinvip winlinvip added the Bug It might be a bug. label Jul 18, 2023
@winlinvip winlinvip added the EnglishNative This issue is conveyed exclusively in English. label Jul 29, 2023
@winlinvip
Copy link
Member

winlinvip commented Apr 10, 2024

Update: We have disabled the version querying by query_latest_version off in SRS 5+, see ee6a68d and 84b184d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug It might be a bug. EnglishNative This issue is conveyed exclusively in English. Enhancement Improvement or enhancement.
Projects
None yet
Development

No branches or pull requests

3 participants