Skip navigation
rootplaner
Currently Being Moderated

FMS 3.5 Server with non included Apache 2.2 Webserver

Feb 25, 2009 8:28 AM

Hello,

I have installed FMS 3.5 on a Linux root server with openSUSE 10.3 without included Apache 2.2. That is why the webserver is already installed and running. Now I should know next steps to configure both FMS and Apache to make it work for streaming recorded .flv files via HTTP and the VOD application. Starting Apache manually after FMS server is running always ends up in failure and error message: 'Address already in use. Could not bind to address [::]:80. If I start Apache first and then FMS server everything is running. But I guess this is not correct because the manual mentioned first starting FMS server.

Thanks for any advise how I should proceed.

 
Replies
  • Currently Being Moderated
    Feb 25, 2009 12:58 PM   in reply to rootplaner
    Hi Rootplaner --

    Does everything work correctly as long as you start Apache first? If so, I'd just start Apache first. You're using your own installation of Apache, correct? The instructions in the docs were for FMS/Apache installations.

    Jody
     
    |
    Mark as:
  • Currently Being Moderated
    Feb 25, 2009 1:51 PM   in reply to rootplaner
    The reason you're getting the bind error message is likely because you have apache and FMS listening on the same IP address.

    If you start FMS first, it binds to port 80, and therefore Apache cannot bind to port 80 on the same IP (you can only bind one device to a given port on a given IP at a time)

    The solution is to add another IP address to the network interface. Bind FMS to one IP, and Apache to the other.
     
    |
    Mark as:
  • Currently Being Moderated
    Feb 27, 2009 10:05 AM   in reply to rootplaner
    Hey Rootplaner,

    Jay does have the best solution -- in case FMS ever needs to use port 80 for tunneling, for example, it'd be better to bind FMS and Apache to their own IPs.

    Jody
     
    |
    Mark as:
  • Currently Being Moderated
    Feb 27, 2009 1:51 PM   in reply to rootplaner
    Rootplaner, I won't let this thread die!

    I've updated the docs with more information:
    http://help.adobe.com/en_US/FlashMediaServer/3.5_AdminGuide/WSE2A5A7B9 -E118-496f-92F9-E295038DB7DB.html

    Check out the comment at the bottom of that page.

    Jody
     
    |
    Mark as:
  • Currently Being Moderated
    Mar 27, 2009 12:02 PM   in reply to rootplaner
    Hi, I've ran into a small issue with my FMS instalation. Like rootplanner i already had my apache installation on my linux box so i don't want to use the one coming with FMS.

    I've managed to setup FMS to proxy all incoming HTTP requests to my Apache webserver runnig on port 8134.

    It all goes well and I can access php scripts for example residing on my apache installation. The problem is that when i'm trying to send a form with POST, instead of parsing the script, the connection gets terminated and i'm offered to download the php script which is an empty file.

    As far as i've understood by reading the FMS's configuration files only the first connection is treated like an unknown http request. When having a second connection ( eg. sending the post to the php file ) FMS reports the following:

    2009-03-27 20:07:20 10178 (e)2611029 Bad network data; terminating connection : bad chunk version 117 on input stream
    2009-03-27 20:07:20 10178 (e)2631029 Bad network data; terminating connection : (Adaptor: _defaultRoot_, VHost: Unknown, IP: , App:, Protocol: tunnel)

    Am i doing something wrong or is this a bug ?
     
    |
    Mark as:
  • Currently Being Moderated
    Mar 27, 2009 2:33 PM   in reply to gkoo.ansis
    Hi again. I've left behind the idea of using my own apache server and i've installed the one provided in FMS.
    I thought i've misconfigured something in my Apache. After adding PHP support to the apache provided by FMS i still get the error listed earlier.
    To be more specific i have a html containing a form that submits data through POST to a php script. The HTTP Request containing the POST is submited to the FMS Edge listening on port 80 which instead of forwarding it to the http daemon ( running on port 8134) to parse it using php, it just drops the connection giving the error stated earlier.
    Am i doing something wrong ? Can anybody explain this situation ?
     
    |
    Mark as:
  • Currently Being Moderated
    Mar 30, 2009 3:00 PM   in reply to rootplaner
    Sounds to me that FMS isn't set up to handle POST data, and therefore cannot pass it along to Apache. Perhaps someone from the FMS engineering team can confirm that or correct me.

    IMO... trying to get FMS to proxy all of your HTTP traffic is going to be more headaches that it's worth. I would just run FMS and the HTTPD server separately on separate IP's, and let FMS pass HTTP requests for video files off to the existing HTTPD server.
     
    |
    Mark as:
  • Currently Being Moderated
    Mar 30, 2009 10:43 PM   in reply to rootplaner
    I've sent a message to an FMS eng, hope to hear back soon.

    Jody
     
    |
    Mark as:
  • Currently Being Moderated
    Mar 31, 2009 4:19 AM   in reply to Jody Bleyle
    Thanks for your answers. This really is a majour issue in FMS if you don't have 2 separate IPs.
    Hope the FMS Engenieers fix this quick.
     
    |
    Mark as:
  • Currently Being Moderated
    Mar 31, 2009 1:46 PM   in reply to JayCharles
    Lots of separate questions in this thread, so I'll try to get to all of them.
    quote:

    Originally posted by: JayCharles
    IMO... trying to get FMS to proxy all of your HTTP traffic is going to be more headaches that it's worth. I would just run FMS and the HTTPD server separately on separate IP's, and let FMS pass HTTP requests for video files off to the existing HTTPD server.

    I agree, anyone who can get twice as many IP addresses and/or NICs really is better off running FMS and the webserver on separate addresses, unless they have some good reason not to (e.g., some crazy corporate firewalls will only let RTMPT through if it comes from the same address and port as an earlier "real" HTTP response). It's simpler, it's more efficient, you don't have to worry about namespace collision (e.g., if you have a web directory called "/open"), and you only have to deal with one product's bugs at a time.

    And you don't need to get FMS to pass PD requests off to the other IP; make the Player app go straight to that other IP in the first place, and you can completely disable the HTTP proxying on FMS.

    Also, if you don't need tunneling or port-80 RTMP (e.g., absolutely none of your viewers are behind firewalls), you can share an IP address, and just let FMS take port 1935 and the webserver take port 80.

    If you can't do that (only have one IP, have to deal with those crazy firewalls, etc.), then you are going to have to share port 80, and that means setting FMS up as a proxy. If you're using the included apache, that's set up out of the box; otherwise, you have to change your webserver to listen to some other port (and maybe to localhost only--although leaving it open is nice for testing), and configure FMS to proxy to that port.

    quote:

    Originally posted by: JayCharles
    Sounds to me that FMS isn't set up to handle POST data, and therefore cannot pass it along to Apache. Perhaps someone from the FMS engineering team can confirm that or correct me.

    Well, we have definitely tested it with POST requests in the past. And I can hit a test CGI locally with a POST request and have it parse and log the values. So it's obviously not completely broken. (That doesn't mean there can't be any bugs, of course. We surprisingly have had almost no feedback from anyone outside who's using CGI or PHP that takes POST inputs, so I don't know how extensively it's really been exercised.)

    quote:

    Originally posted by: gkoo.ansis
    As far as i've understood by reading the FMS's configuration files only the first connection is treated like an unknown http request.

    I'm not sure I understand what you mean, but I can try to explain how it works, and hopefully that will relieve some confusion.

    With HTTP (including tunneling), each connection can have as many requests as the client wants to send, and each request is interpreted individually. You can send a "GET /swfs/my.swf HTTP/1.1" request followed by a "POST /open/12345678 HTTP/1.1" request, in which case the first one will be proxied to the webserver, the second will open a RTMPT tunneling session (or, more likely, give you an error because I got the syntax wrong, but you get the idea). You can also send a "POST /scripts/foo.php HTTP/1.1" after that, and it'll be proxied to the webserver. (Technically, you shouldn't be pipelining anything after a non-idempotent request, but we're not going to check that and reject it, and webserver won't even see the POST in between.)

    The very first request on any connection is special, in that if it starts with a byte from 0-31, we assume it isn't an HTTP/tunneling connection at all, but a binary RTMP connection.

    However, there should be no difference between the first connection and another connection. If you use an old HTTP/1.0 browser (or just wait long enough between clicks), every request will go over a new connection. FMS doesn't even know that it has other connections from you; each one is treated independently (even in the case of tunneling--it's only after we map the HTTP requests back to tunneling sessions that we might have to demultiplex things).
    quote:

    Originally posted by: gkoo.ansis
    When having a second connection ( eg. sending the post to the php file ) FMS reports the following:

    2009-03-27 20:07:20 10178 (e)2611029 Bad network data; terminating connection : bad chunk version 117 on input stream
    2009-03-27 20:07:20 10178 (e)2631029 Bad network data; terminating connection : (Adaptor: _defaultRoot_, VHost: Unknown, IP: , App:, Protocol: tunnel)

    It looks like FMS is interpreting this as a tunneling request.

    This could be a bug in the code. Or I could be misremembering what we log for "Protocol". But is it possible that your PHP script's location starts with one of the special names listed somewhere in the documentation (off the top of my head, "/open", "/close", "/idle", "/send", "/fms", "/fcs")? If so, that's not going to work; the way tunneling works is by stealing part of the URI namespace, and only proxying requests outside that namespace.

    If that's not the problem, then something that both might be worth testing (to help us fix it) and might also be usable as a workaround: If you can change the form to send the equivalent GET request (with the variables encoded in the query string instead of in the body), and that works, then it _is_ probably something wrong with our POST handling (or, more likely, with handling request bodies).

    Beyond that, if you can record all of the HTTP traffic between your client and server (e.g., with the Firefox LiveHeaders addon, or even Wireshark if you want to go nuts), and bundle that up with the FMS logs and the webserver logs, that would help to figure out what's going on.

    Or you could just post a quick summary here. Something like this: "I sent a GET /index.html followed by a POST /play/select.php; the edge log saw the first one correctly but the second one gave exactly that bad network data message mentioned above; apache saw the GET and got a new connection for the POST but then timed out 60 seconds later."
     
    |
    Mark as:
  • Currently Being Moderated
    Mar 31, 2009 1:53 PM   in reply to gkoo.ansis
    quote:

    Originally posted by: gkoo.ansis
    It all goes well and I can access php scripts for example residing on my apache installation. The problem is that when i'm trying to send a form with POST, instead of parsing the script, the connection gets terminated and i'm offered to download the php script which is an empty file.

    Apologies; I missed this part when writing the last message.

    It looks like your browser got something back--presumably some of the headers--before the connection was dropped, or I can't imagine why it would do that. If you could capture the details with LiveHeaders (or make an equivalent request from the terminal with wget or curl, if you know how to do that), it would be very helpful.

    Another thing I forgot to suggest: try sending the POST directly to the webserver (e.g., http://example.com:8134/scripts/foo.php instead of just http://example.com/scripts/foo.php) and make sure that works--and, if you can record the headers send that way, it would be really helpful. There are some corners of the HTTP protocol we didn't test in great detail, so it's always possible that the server response has somehow confused fmsedge, and that's why it drops your connection.

    Also, headers from the previous request and response would be useful as well. There are a few cases where some agents send slightly wrong data (e.g., count the final CRLF as one byte instead of two, which means the next pipelined request ends up starting with a spurious LF, which could easily confuse the edge), and we may not be handling all of them properly.

    Sorry to ask for all this information for what may turn out to be a ridiculously simple bug in our code or mistake in your setup, but it's hard to diagnose which it is without knowing everything....
     
    |
    Mark as:
  • Currently Being Moderated
    Jun 28, 2009 12:30 PM   in reply to abarnert

    Hi everyone

    Abarnert, I hope you have not left this thread already.Two days ago I installed the FMS with the included Apache server. I also installed PHP after that ( I believe it is the same set up as user "gkoo.ansis" had). And I ran into exactly the same problem he/she did with the POST method. After reading your last message in this post I tried sending the POST directly to the server (e.g.,  http://example.com:8134/scripts/foo.php instead of just  http://example.com/scripts/foo.php) and it WORKED. This however is bit inconvenient because when I try to run phpMyAdmin (for example) it naturally doesn't work and I guess I have to "fix" the POST methods in the files...anyways

    I have attached the headers in the two cases - when I send the post to the default port (which doesn't work) and when I send it directly to 8134 (which works)

    I hope the information is helpful (and still relevant of course, I see that the last response from you was almost 3 months ago)...

    Any idea of how I might fix this is very appreciated as well

     

    Thank you

    Yavor

    Attachments:
     
    |
    Mark as:
  • Currently Being Moderated
    Jun 28, 2009 4:16 PM   in reply to abarnert

    Hi, me again

    I was browsing through the configuration files of FMS and I found this (the text pasted underheath) in the _defaultRoot_\Adaptor.xml file. Excuse me if I am completely out of line here since this is really new to me..but the errors we got from the POST method sound like they are caused by the failure of FMS to proxy the "unknown" requests therefore closing the connection.

    I installed the FMS with the included Apache so by default the proxying should be set up ( I double checked and it really should be on with the correct settings)

     

    <!-- This specifies whether we are redirecting unknown requests  -->
            <!-- to an external server. An unknown request may come in only  -->
            <!-- as the first request on a newly accepted connection, at any -->
            <!-- other time it is considered an error, and the connection is -->
            <!-- closed.
    Unknown requests are redirected by byte proxying to -->
            <!-- the specified redirect host. For redirection to work http   -->
            <!-- tunneling must be enabled.                                  -->
            <!-- Request redirection to a specific host can be further       -->
            <!-- controlled based upon port on which the request arrived.    -->
            <!-- The maxbuf attribute determines how big the io buffers are. -->
            <!-- Flow control kicks in when the buffer in either direction   -->
            <!-- fills up, automatically handling the case when producers    -->
            <!-- and consumers differ widely in bandwidth.                   -->
            <Redirect enable="false" maxbuf="16384">
                <Host port="80">:8080</Host>
                <Host port="443">:8443</Host>
            </Redirect>

     

            <!-- This specifies whether we are proxying unknown requests to  -->
            <!-- to an external server. An unknown request may come in at    -->
            <!-- at any time, intermingled with tunneling requests. Unknown  -->
            <!-- requests are handled by byte proxying to the specified      -->
            <!-- proxy host, with some basic HTTP protocol handling. For     -->
            <!-- proxying to work, HTTP tunneling must be enabled.           -->
            <!-- Request proxying to a specific host can be further          -->
            <!-- controlled based upon port on which the request arrived.    -->
            <!-- The maxbuf attribute determines how big the io buffers are. -->
            <!-- Flow control kicks in when the buffer in either direction   -->
            <!-- fills up, automatically handling the case when producers    -->
            <!-- and consumers differ widely in bandwidth.                   -->
            <HttpProxy enable="true" maxbuf="16384">
                <Host port="80">${HTTPPROXY.HOST}</Host>
            </HttpProxy>

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 13, 2009 4:44 PM   in reply to abarnert

    Hi!

     

    How's that bug working out for you guys at Adobe? Just wanted to drop a line and say that I'm having the same problem with some POST requests not hitting the proxyed server on a single-IP machine. Love to help out with any logs or something if I can.

     

    Hope to heare some good news.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 26, 2010 2:45 AM   in reply to Jacek Dargiel

    I am using FMS Development Edition 3.5.3 with the Apache installation that is delivered in the bundle. I installed PHP 5.3.2 on top of it.

     

    The problem still exists. When I send a form parameters using the GET method, the request is processed correctly, the PHP script executes fine and everything works as expected. When I change my form to send a POST request to the server (together with changing the PHP script to receive the POST parameters), the request is not processed at all and I get an empty answer no matter what should come from the script. But if I change the form request to POST request addressed directly to port 8134, everything works fine again. Seems like the FMS can't forward POST requests properly to Apache.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 27, 2010 10:19 AM   in reply to AMPO webdesign&multimedia

    Hi Ampo,

     

    Would you mind emailing me awhilloc@adobe.com directly about this offlist.  I'll assist in getting to the bottom of this reported issue.


    Asa

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 3, 2010 1:09 PM   in reply to flying_fingersyka

    was this issue ever solved? I am having difficulties with phpmyadmin running on FMS. I am able to get PHP working and the Apache server itself seems to be running fine. However, every time I try to login to phpmyadmin I am given a dialog box asking me "do you want to open or save this file" and the script itself never executes. I've been all over the web searching for an aswer to this and this forum matches my problem most closely. Previously I had the same configuration running with a standalone Apache server and had no problems at all. Please let me know if there is a solution to this.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 3, 2010 1:15 PM   in reply to bbones

    By the way, in reference to my previous comment, I get the following errors in the server log:

     

    Bad network data; terminating connection : bad chunck version 112 on input stream 01903308

    Bad network data; terminating connection : (Adaptor: +defaultRoot_, VHost: Unknown, IP: , Protocol: Tunnel) : phpMyAdmin

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 29, 2011 2:23 AM   in reply to Asa - FMS

    Hello,

     

    I have the same problem that most users.

     

    Impossible to send post data with FMS configured as a proxy server.

     

    HTTP server : Apache (not the one included) configured as the apache2.2 bundled with FMS.

    FMS : 4.02

    CentOs : 5.6

     

     

    Any workaround or I can only get method ?

     

    Many thanks.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points