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 over tcp (tcp connection was frequently disconnected ) #3772

Closed
gavin88 opened this issue Aug 18, 2023 · 3 comments
Closed

webrtc over tcp (tcp connection was frequently disconnected ) #3772

gavin88 opened this issue Aug 18, 2023 · 3 comments
Labels
EnglishNative This issue is conveyed exclusively in English.

Comments

@gavin88
Copy link

gavin88 commented Aug 18, 2023

Description

In the process of using webrtc over tcp. we found that the tcp connection was frequently disconnected during an irregular periods of time. The server seems to destroy the rtc session without giving the client a chance to reconnect.

  1. SRS Version: SRS/5.0.170(Bee)

  2. SRS Log:

[2023-08-17 13:17:48.345][INFO][1][23gh7t50] TCP: before dispose resource(Tcp)(0x60c000027d00), conns=5, zombies=0, ign=0, inz=0, ind=0
�[31m[2023-08-17 13:17:48.345][ERROR][1][q5ln2h46][0] serve error code=1070(StThreadInterrupt)(ST thread is interrupted) : rtc tcp conn : interrupted
thread [1][q5ln2h46]: do_cycle() [./src/app/srs_app_rtc_network.cpp:811][errno=0]
thread [1][q5ln2h46]: interrupt() [./src/app/srs_app_st.cpp:257][errno=0]

Additional error log, It may not be the core error log, it may be just a normal prompt.

[2023-08-17 12:34:27.173][ERROR][1][q8b9918f][11] serve error code=5035(RtcUnique)(RTC only support one UDP or TCP network) : process rtc tcp pkt : only support one network
thread [1][q8b9918f]: do_cycle() [./src/app/srs_app_rtc_network.cpp:805][errno=11]
thread [1][q8b9918f]: handshake() [./src/app/srs_app_rtc_network.cpp:867][errno=11](Resource temporarily unavailable)
[31m[2023-08-17 13:19:33.442][ERROR][1][23gh7t50][11] serve error code=5034(RtcTcpSession)(RTC TCP packet is invalid for session not found) : process rtc tcp pkt : no session, stun username=nr555r47:A+It
thread [1][23gh7t50]: do_cycle() [./src/app/srs_app_rtc_network.cpp:805][errno=11]
thread [1][23gh7t50]: handshake() [./src/app/srs_app_rtc_network.cpp:853][errno=11](Resource temporarily unavailable)
  1. SRS Config:
rtc_server {
    enabled         on;
    listen 19000; 
    tcp {
        enabled on;
        listen 19000;
    }
    protocol tcp;
    candidate   xx.xx.xx.xx;
}

Replay

Step 1: webrtc over tcp streaming normally

Step 2: switch the network

Step 3: the connnection is disconnected and the stream needs to be republish.

Expect

Hope to be able to use webrtc over tcp for stable communication.

@winlinvip winlinvip added the EnglishNative This issue is conveyed exclusively in English. label Aug 18, 2023
@yiippee
Copy link

yiippee commented Sep 17, 2023

me too

@Li20230828
Copy link

I got the error when I use the same TCP port for API and webRTC

@winlinvip
Copy link
Member

Duplicated to #3784

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EnglishNative This issue is conveyed exclusively in English.
Projects
None yet
Development

No branches or pull requests

4 participants