2 Replies Latest reply on Sep 18, 2012 9:09 AM by mattparisi

    FMS not failing over from port 443 which is reserved for RTMPS

    mattparisi

      We have port 443 reserved for RTMPS on our

      FMS.  As a result, the standard failover mechanism by Adobe does not

      entirely work.  It goes from 1935->443, which freezes.


      From Adobe:


      Problem is there when we specify the use of port 443 for secure

      connections. FMS expects that connections on this port will be secure

      and rejects

      any non secure connection which in this leads to an error on the

      client side. And upon receiving an error the flash player stops resolving

      for back up ports.

      The port is switched only when the formerly given port is blocked or

      FMS is not listening on it. This may be handled on the client side as

      FMS in this case working fine.


      Adobe has sent us the following code to put in our client players:


      var trialNum = 0;

      var ncConnectTimer = NULL;

      var ncConnectTimeout = 5000; //5ms

      var nc = new NetConnection();

      nc.onStatus = function(statuscode)

      {

        if(statuscode.code == NetConnection.Connect.Failed ||

            statuscode.code == NetConnection.Connect.Rejected)

              {

                 tryToConnect();

              }

        if(statuscode.code == NetConnection.Connect.Success)

          {

                if(ncConnectTimer) {clearInterval(ncConnectTimer); ncConnectTimer=0} ;

              }

      }


      tryToConnect()

      {

        trialNum++;

        if(ncConnectTimer) {clearInterval(ncConnectTimer); ncConnectTimer=0} ;

        if(trialNum == 1) { nc.connect("rtmp://<server>:1935/App/Inst"); }

        else if(trialNum == 2) { nc.connect("rtmp://<server>:443/App/Inst"); }

        else if(trialNum == 3) { nc.connect("rtmp://<server>:80/App/Inst");}

        else

        {

           return;

        }

        ncConnectTimer = setInterval("tryToConnect", ncConnectTimeout);

      }


      This would have to go in a core OSMF class which I wouldn't feel

      comfortable changing. Is this something that is going to be added to OSMF?

      Any thoughts or recommendations?


      Thanks.

        • 1. Re: FMS not failing over from port 443 which is reserved for RTMPS
          Silviu Vergoti Adobe Employee

          Hi Mattparisi,

           

          OSMF uses a shotgun approach. Instead of making one connection at a time, it makes all in parallel and if one succeds it closes the others. Does the OSMF player stop on a failed port?

           

          S. 

          • 2. Re: FMS not failing over from port 443 which is reserved for RTMPS
            mattparisi Level 1

            Yes, when using an rtmps-enabled fms server, connection attempts look like this:

             

            [24843 NET] Attempting connection to rtmp://fms001.mediaplatform.com:1935/

            [24843 NET] NetConnection attempt failed: rtmp://fms001.mediaplatform.com:1935/

            [24843 NET] Attempting connection to rtmp://fms001.mediaplatform.com:443/

            [24843 NET] NetConnection attempt failed: rtmp://fms001.mediaplatform.com:443/

            [24843 NET] Attempting connection to rtmp://fms001.mediaplatform.com:80/

            [26896 NET] Attempting connection to rtmpt://fms001.mediaplatform.com:1935/

            [26896 NET] NetConnection attempt failed: rtmpt://fms001.mediaplatform.com:1935/

            [26896 NET] NetConnection attempt failed: rtmp://fms001.mediaplatform.com:80/ (11): Connection attempt rejected by FMS server

            [26896 NET] NetConnection failed for: rtmp://fms001.mediaplatform.com/

             

            When using a non-rtmps-enabled fms server connection attempts look like this:

             

            [69548 NET] Attempting connection to rtmp://fms003.mediaplatform.com:1935/

            [69548 NET] NetConnection attempt failed: rtmp://fms003.mediaplatform.com:1935/

            [69548 NET] Attempting connection to rtmp://fms003.mediaplatform.com:443/

            [69548 NET] NetConnection attempt failed: rtmp://fms003.mediaplatform.com:443/

            [69548 NET] Attempting connection to rtmp://fms003.mediaplatform.com:80/

            [69548 NET] Attempting connection to rtmpt://fms003.mediaplatform.com:1935/

            [69548 NET] NetConnection attempt failed: rtmpt://fms003.mediaplatform.com:1935/

            [70553 NET] Attempting connection to rtmpt://fms003.mediaplatform.com:443/

            [70553 NET] Attempting connection to rtmpt://fms003.mediaplatform.com:80/

            [70553 NET] Attempting connection to rtmps://fms003.mediaplatform.com:1935/

            [70553 NET] NetConnection attempt failed: rtmps://fms003.mediaplatform.com:1935/

            [70553 NET] Attempting connection to rtmps://fms003.mediaplatform.com:443/

            [70553 NET] Attempting connection to rtmps://fms003.mediaplatform.com:80/

            [71604 NET] NetConnection attempt failed: rtmps://fms003.mediaplatform.com:443/

            [71604 NET] NetConnection attempt failed: rtmpt://fms003.mediaplatform.com:80/

            [72597 NET] NetConnection attempt failed: rtmps://fms003.mediaplatform.com:80/

            [93583 NET] NetConnection attempt failed: (14): Timed-out trying to establish a NetConnection, or timed out due to an idle NetConnection

            [93583 NET] NetConnection failed for: rtmp://fms003.mediaplatform.com/

             

            As you can see there are quite a few more attempts on the non-rtmp-enabled server. the rtmps-enabled server seems to quit trying.

             

            Thoughts?