Skip to main content
February 1, 2011
Question

FMS3 http tunneling not working

  • February 1, 2011
  • 1 reply
  • 734 views

This post is a continuation of this post: http://forums.adobe.com/thread/448295?tstart=1#448295


I never did get HTTP tunneling to work and I hoping someone can help me.


To provide details of where I am.

As you will notice, I am trying to test streaming over port 80 by this line of code and the video does not play: nc.connect("rtmpt://199.204.104.30:80/vod");

NOTE:
If I update this line of code to
nc.connect("rtmp://199.204.104.30:1935/vod"); --- The video streams fine.

In the fms.ini file I have this configured:
ADAPTOR.HOSTPORT = INTERNAL.IP.ADDRESS:1935,80

When I run a netstat –a on the server – I get this as an active connection:
   Proto  Local Address          Foreign Address        State
   TCP    SERVERNAME:http      SERVERNAME:0         LISTENING

This server has IIS and FMS running on it. I have configured 2 internal IP address on the server for each service and bound each service to their own IP address.

I installed and ran Wireshark on the server where FMS is installed when I was testing the video via HTTP tunneling and get this response.

POST /open/1 HTTP/1.1 Content-Type: application/x-fcs User-Agent: Shockwave Flash Host: 199.204.104.30 Content-Length: 1 Connection: Keep-Alive Cache-Control: no-cache

.HTTP/1.1 400 Bad Request Content-Type: text/html Date: Tue, 01 Feb 2011 17:04:38 GMT Connection: close Content-Length: 39

<h1>Bad Request (Invalid Hostname)</h1>

Of course when I test via 1935, the connection is clean.

I would appreciate any help and thanks in advance for your time. Brad


Here is my ActionScript code (AS 3):


package

{

    import flash.display.Sprite;

    import flash.filters.BlurFilter;

                import fl.video.FLVPlayback;

                import flash.display.LoaderInfo;

    import flash.net.NetConnection;

                import flash.events.NetStatusEvent;

                import flash.net.NetStream;

                import flash.media.Video;

    public class Streams extends Sprite

    {

        var nc:NetConnection;

                                var stream:NetStream;

                                var playStream:NetStream;

        var video:Video;

                                var videoPath:String = ""

        public function Streams()

        {

            nc = new NetConnection();

            nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);

                                                nc.connect("rtmpt://199.204.104.30:80/vod");

                                }

                               

        private function netStatusHandler(event:NetStatusEvent):void

        {

            trace("connected is: " + nc.connected );

                                                trace("event.info.level: " + event.info.level);

                                                trace("event.info.code: " + event.info.code);

                                               

            switch (event.info.code)

            {

                case "NetConnection.Connect.Success":

                                trace("Congratulations! you're connected");

                                connectStream(nc);

                                                                                // createPlayList(nc);

                                // instead you can also call createPlayList() here

                                break;

                                                                case "NetConnection.Connect.Failed":

                case "NetConnection.Connect.Rejected":

                                trace ("Oops! the connection was rejected");

                                break;

                            case "NetStream.Play.Stop":

                                trace("The stream has finished playing");

                                break;

                            case "NetStream.Play.StreamNotFound":

                                trace("The server could not find the stream you specified");

                                break;

                            case "NetStream.Publish.BadName":

                                trace("The stream name is already used");

                                break;

                        }

        }

        // play a recorded stream on the server

        private function connectStream(nc:NetConnection):void {

            stream = new NetStream(nc);

            stream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);

            video = new Video();

                                                video.width = 480;

                                                video.height = 360;

            video.attachNetStream(stream);

                                                stream.play("Peter_Christie_widescreen_bloomberg_hr", 0);

            addChild(video);

        }           

    }  

}

    This topic has been closed for replies.

    1 reply

    February 2, 2011

    Hi,

    Although not very sure, I feel your IIS server is taking up both the available IP addresses. There is a feature in IIS called socket pooling due to which it takes up all available IP addresses. There is a way to disable it, which you can check on Microsoft help site for your OS.

    You can check your FMS edge logs to see if it shows something. Also, if that does not give any clue, you can try stopping the IIS service and restart FMS and try. You can also try running FMS in console mode and see if requests are coming to FMS. Hope one of things will work for you.

    Thanks,

    Abhishek

    February 4, 2011

    Thanks Abhishek. I am looking into disabling socket pooling. I will provide an update. - Brad