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

Pion drops connection to OME after few seconds #2607

Open
wildfluss opened this issue Oct 26, 2023 · 2 comments
Open

Pion drops connection to OME after few seconds #2607

wildfluss opened this issue Oct 26, 2023 · 2 comments
Labels
bug Something isn't working difficulty:hard

Comments

@wildfluss
Copy link

wildfluss commented Oct 26, 2023

Pion seemingly connects to OME https://github.com/AirenSoft/OvenMediaEngine

ome-to-pion-ome-1             | [2023-10-26 15:00:42.273] I [SPICE-t3478:19] ICE | ice_port.cpp:606  | Turn client has connected : <ClientSocket: 0xffff8f907010, #36, Connected, TCP, Nonblocking, 172.23.0.4:50068>

but after few seconds drops the connection

ome-to-pion-ome-1             | [2023-10-26 15:00:42.276] I [SPRtcSig-t3333:10] Monitor | stream_metrics.cpp:114  | A new session has started playing #default#app/fixme on the WebRTC publisher. WebRTC(1)/Stream total(1)/App total(1)
ome-to-pion-ome-1             | [2023-10-26 15:00:42.276] I [SPRtcSig-t3333:10] ICE | ice_port.cpp:368  | Added session: 0 (ufrag: qj2PGt:ghrTrwNEJpQijbMf)
ome-to-pion-webrtc-pion-1     | 2023/10/26 15:00:47 Blocking forever
ome-to-pion-ome-1             | [2023-10-26 15:01:12.408] I [SPICE-t3478:19] ICE | ice_port.cpp:620  | Turn client has disconnected : <ClientSocket: 0xffff8f907010, #36, Disconnected, TCP, Nonblocking, 172.23.0.4:50068>
ome-to-pion-webrtc-pion-1     | Peer Connection State has changed: failed
ome-to-pion-webrtc-pion-1     | Peer Connection has gone to failed exiting
ome-to-pion-ome-1             | [2023-10-26 15:01:12.420] I [DQICETmout:13] ICE | ice_port.cpp:436  | Removed session(0) from ICEPort | ice_seesions_with_id count(0) ice_sessions_with_ufrag(0) ice_sessions_with_address_pair(0) 
ome-to-pion-ome-1             | [2023-10-26 15:01:12.420] I [DQICETmout:13] WebRTC Publisher | webrtc_publisher.cpp:649  | IcePort is disconnected. : (#default#app/fixme/100) reason(6)
ome-to-pion-ome-1             | [2023-10-26 15:01:12.420] I [DQICETmout:13] WebRTC Publisher | webrtc_publisher.cpp:551  | Stop command received : #default#app/fixme/100
ome-to-pion-ome-1             | [2023-10-26 15:01:12.420] W [DQICETmout:13] ICE | ice_port.cpp:527  | Agent [Unknow, 0] has expired
ome-to-pion-ome-1             | [2023-10-26 15:01:12.421] I [DQICETmout:13] Monitor | stream_metrics.cpp:136  | A session has been stopped playing #default#app/fixme on the WebRTC publisher. Concurrent Viewers[WebRTC(0)/Stream total(0)/App total(0)]
ome-to-pion-ome-1             | [2023-10-26 15:01:12.421] I [DQICETmout:13] Signalling | rtc_signalling_server.cpp:450  | Client is disconnected: HttpConnection(0xffff8c801010) : WebSocket <ClientSocket: 0xffff8f840a10, #34, Connected, TCP, Nonblocking, 172.23.0.4:58704> TLS(Disabled) (#default#app / fixme, ufrag: local: qj2PGt, remote: ghrTrwNEJpQijbMf)
ome-to-pion-ome-1             | [2023-10-26 15:01:12.504] I [SPRtcSig-t3333:10] HTTP.Server | http_server.cpp:216  | Client(<ClientSocket: 0xffff8f840a10, #34, Closed, TCP, Nonblocking, 172.23.0.4:58704>) has been disconnected by *:3333

Repro is here https://github.com/wildfluss/ome-to-pion which is basically reflect example but with OME signaling and few tweaks which I've tried to do by reading other examples (eg unreal-pixel-streaming from example-webrtc-applications )

Disclaimer: I'm WebRTC n00b

@Sean-Der Sean-Der added bug Something isn't working difficulty:hard labels Apr 1, 2024
@adriancable
Copy link
Contributor

@wildfluss - did you ever get to the bottom of this? I am having an issue that seems superficially similar (disconnects after exactly 30 seconds), only the remote is using libjuice not OME. It appears at least in my case that the connection is actually being dropped by the remote (DTLS CloseNotify comes from the remote) with Pion, but with Chrome all is OK. I suspect that Pion is not doing something quite right with keepalives, but despite looking into this for several days and looking at tcpdumps I haven't been able to figure it out.

@wildfluss
Copy link
Author

I suspect that Pion is not doing something quite right with keepalives

@adriancable , unfortunately, same here, Pion lacks documentation and I could not figure out what was that in about a day and gave up on using it, otherwise could be great library but taking into account amount of net layers involved in the protocol it would just take far too long to understand whether its Pion not compliant / remote is funky or what you know :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working difficulty:hard
Projects
None yet
Development

No branches or pull requests

3 participants