Results 1 to 4 of 4

Thread: edges try to reconnect to a non-existing stream on Origin and never end

  1. #1

    Default edges try to reconnect to a non-existing stream on Origin and never end

    Hi

    I start origin-edge servers and customize my own resolveStreamAlias() @ edge to convert stream url on Origin. I found if what the player subscribes is a non-existing stream on Origin then the Edge server would retry to connect again and again, it never stops even the player disconnects from edge.
    The log:
    LiveMediaStreamReceiver.doWatchdog: streamTimeout[live-origin/_definst_/mystream_aac]: Resetting connection: wowz://<origin>:1935/live-origin/_definst_/mystream_aacLiveMediaStreamReceiver.resetConnection: (SOCKET, R: /<origin>:1935, L: /172.31.26.6:37824, S: /<origin>:1935)
    LiveMediaStreamReceiver.sessionClosed: 	
    LiveMediaStreamReceiver.sessionClosed: reconnect: isCurrentSession:false tryConnect:true
    LiveMediaStreamReceiver.doWatchdog: streamTimeout[live-origin/_definst_/mystream_aac]: Resetting connection: wowz://<origin>:1935/live-origin/_definst_/mystream_aac
    LiveMediaStreamReceiver.resetConnection: (SOCKET, R: /<origin>:1935, L: /172.31.26.6:37825, S: /<origin>:1935)
    LiveMediaStreamReceiver.sessionClosed:
    LiveMediaStreamReceiver.sessionClosed: reconnect: isCurrentSession:false tryConnect:true
    LiveMediaStreamReceiver.doWatchdog: streamTimeout[live-origin/_definst_/mystream_aac]: Resetting connection: wowz://<origin>:1935/live-origin/_definst_/mystream_aac
    I saw the similar post here and here but no clear comments to fix that.

    I help the edge server could stop the retry once the player disconnects from edge, how could I do?

    andy_c
    Last edited by andy_c; 04-17-2014 at 12:59 AM.

  2. #2

    Default

    Hi Andy,

    If the application stream type is liverepeater-edge then the player connections should control the starting and stopping of the mediaCasters. If there is a player trying to start the stream then the mediaCaster will continue to try to connect. You should disconnect all of the players to let the mediaCaster shut down on it's own.

    If you are starting the mediaCaster manually using the api methods or stream manager etc then you can use the IMediaCasterNotify2 interface. Each time a mediaCaster tries to connect or reconnect, it will call onConnectStart. When it has a successful connection, it will call onConnectSuccess and will call onStreamStart when the stream starts. If the connection failed to connect to the remote server then it will call onConnectFailure

    When it resets, it will call onStreamStop if the stream actually started and then onConnectStart again. If the stream never started then it will just call onConnectStart.

    You should always return a valid url from resolveStreamAlias. By the time this is called, the mediaCaster is already created and is looking for the url to connect to.

    You can return null from resolvePlayAlias to prevent the player from playing back a stream and from starting the mediaCaster. You could validate the player request here and only return the stream name if the request is for a valid stream.

    Roger.

  3. #3

    Default

    Hi Roger,

    Starting the mediaCaster manually is a very good choice for me. Now I have already applied it. Could you share more information on :
    1. Suppose the source stream already connects to origin server, do I need to retry the connect (for example, retry 3 times) on edge to handle origin busy then no response case?
    2. If the Q1's answer is 'Yes', when I count down the retry-count on onConnectFailure, how do I close the retry and tell player 'stream not exist' (I don't want player to wait anymore) ?
    3. If the Q1's answer is 'No', I suppose I should query origin server on resolvePlayAlias to know whether the require stream exist, how to do it?

    Thanks again for your helpful answer
    andy_c
    Last edited by andy_c; 05-21-2014 at 09:13 PM.

  4. #4

    Default

    Hi Andy,

    When you start the mediaCaster manually, it will continue to try to connect until you shut it down. Any second call to start a mediaCaster that is already running will be ignored.

    You can query the origin server(s) anyway you like. You will have to have something running on them to process the request as there isn't anything built in.

    Roger.

Similar Threads

  1. Replies: 1
    Last Post: 12-08-2013, 02:47 PM
  2. How to stop sending conecctions from origin to edges
    By mdiaz00147 in forum General Forum
    Replies: 2
    Last Post: 11-15-2013, 08:35 AM
  3. Get in Origin info about all edges
    By _2in1_ in forum Server-side Modules and Code Samples Discussion
    Replies: 1
    Last Post: 05-16-2012, 09:02 AM
  4. IIS MediaServices as origin Wowza3 on edges?
    By mcaron in forum General Forum
    Replies: 2
    Last Post: 10-20-2011, 03:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •