Random edge pull error

wyvasi

Member
On origin I get sometimes random stream failed for stream pull from edge server for some reason that I can't understand,
I get rare 'ICE state changed from Completed to Failed by ICE keep alive' other times I get 'ICE state changed from Completed to Terminated',
This logs comes from origin.
I get in logs 'Stopped by publisher stop' but there is no unpublish or disconnections before it, might be something between edge and origin also is ok lowercase transport: 'tcp' for mediaType: 'pull'?

Code:
  Agent - DISCONNECT-CLIENT-pool-10-thread-25 ICE state changed from Completed to Terminated. Local ufrag 5fc4135b/e3e4/4267/b024/176c93433b546joeh1hf4oduaa
16:32:31,880 INFO  ergingDatagramSocket - DISCONNECT-CLIENT-pool-10-thread-25 Closing.
16:32:31,880 INFO         StunTcpSocket - DISCONNECT-CLIENT-pool-10-thread-25 Close socket
16:32:31,880 ERROR            TcpClient - DISCONNECT-CLIENT-pool-10-thread-25 Close channel 1608021624
16:32:31,880 ERROR            TcpClient - DISCONNECT-CLIENT-pool-10-thread-25 Release external resources, 1608021624
16:32:31,880 INFO          MediaSession - DISCONNECT-CLIENT-pool-10-thread-25 Stop MediaSession id: 5fc4135b-e3e4-4267-b024-176c93433b54
16:32:31,880 INFO          MediaSession - DISCONNECT-CLIENT-pool-10-thread-25 '5fc4135b-e3e4-4267-b024-176c93433b54' has been terminated
16:32:31,881 INFO          MediaSession - DISCONNECT-CLIENT-pool-10-thread-25 '4DBB43F3-B660-4622-9A25-E13CB31849AC' has been terminated
16:32:31,881 INFO            RestClient - API-ASYNC-pool-17-thread-4 SEND REST OBJECT ==>
URL:https://interact.loyalfans.com/api/v1/defaultApp/StreamStatusEvent
OBJECT:
{
  "nodeId" : "UzSeK6HbFldn3Al2De290Q88yQ0nrIxr",
  "appKey" : "defaultApp",
  "sessionId" : "/:8080-691fe539-af3d-4110-86f1-89aed75af88b",
  "mediaSessionId" : "5fc4135b-e3e4-4267-b024-176c93433b54",
  "name" : "vc",
  "published" : false,
  "hasVideo" : true,
  "hasAudio" : true,
  "status" : "FAILED",
  "audioCodec" : "opus/48000/2",
  "videoCodec" : "H264",
  "info" : "Stopped by publisher stop",
  "record" : false,
  "width" : 720,
  "height" : 960,
  "bitrate" : 0,
  "minBitrate" : 0,
  "maxBitrate" : 0,
  "quality" : 0,
  "parentMediaSessionId" : "4DBB43F3-B660-4622-9A25-E13CB31849AC",
  "history" : false,
  "gop" : 0,
  "fps" : 0,
  "audioBitrate" : 0,
  "codecImpl" : "",
  "transport" : "tcp",
  "cvoExtension" : true,
  "createDate" : 1699893147978,
  "mediaType" : "pull",
  "audioState" : {
    "muted" : false
  },
  "videoState" : {
    "muted" : false
  },
  "mediaProvider" : "WebRTC",
  "origin" : ""
 
Last edited:

Max

Administrator
Staff member
Good day.
I get in logs 'Stopped by publisher stop' but there is no unpublish or disconnections before it
This works as follows:
1. Publisher publishes a stream on origin. The publishing mediasession is created on the server for the stream.
2. Edge pulls the stream from origin. The playing mediasession is created to play the stream.
3. If publishing fails, the publishing mediasession is closed with some error (we do not see it in log fragment provided)
4. Then the playing mediasession is closed with Stopped by publisher stop reason. That's we see in the log fragment.
So the main reason is the publishing stream is failed or stopped by publisher. Please check the logs for it.
 

wyvasi

Member
We are publishing from an iphone and after 30-60 seconds we get 'Failed by rtp activity', video shows up for like none or 1-2 seconds then is loading until fail is received and I have no idea why. Tried both tcp and udp, for udp video shows a little longer for tcp there is no video at all.
Tried both wifi and mobile data.
 
Last edited:

Max

Administrator
Staff member

Max

Administrator
Staff member
yes, it's on 2 way streaming, also running on iOS 17.1.1 and having SDK version as 2.6.115.
We cannot reproduce the problem on iOS 15.7.7 using Two Way Streaming Swift example (iOS SDK 2.6.115).
Seems like the problem is in network provider. Please try to use another mobile operator. Try to change WebRTC transport from UDP to TCP and vice versa (you can do this from Media Devices Web SDK example in Safari browser).
Also check if stream is publishing from a PC in the same network using WebSDK examples.
 
Top