Error serving generated xml - Windows - Apache - Mongrel

I am attempting to follow the document created by Brain Hogan on
“Serving Multiple Rails Applications on Windows with Apache and Mongrel”
and all seems well except for one issue. One of my actions generates an
xml document and uses the “send_data” method to return the file.
However, this is the error I get when executing this controller action:

Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET
/cbf_dev/admin/generate_spreadsheet_xml/2.

Reason: Error reading from remote server

This function works as expected when calling Mongrel directly, but as
soon as I proxy the call through Apache to Mongrel, the above error.

Can anyone help me solve this issues? I think it is something to do with
the way Apache (and the reverse_proxy_fix.rb file described in document
mentioned above) is attempting to reconcile the name?

This newbie thanks you in advance for any help.

Kevin.

Forget this request. I discovered the problem was due to spaces being in
the name of the file I was sending. As soon as I changed the name from
“CMBS Design.xls” to “CMBS-Design.xls”, everything started working.

Thanks,
Kevin

Well, I thought I fixed this problem entirely, but now it seems to
happen if the xml generation takes too long. Could Apache be timing out
waiting for the “send_data” response?

If so, does anyone know how to fix that issue?

Kevin

@Kevin:
Hey, glad you find that useful.

What version of Apache are you using? Are you tied to that particular
setup
on Windows? I have some alternative solutions you might be able to use
as
well–contact me off-list for that.

You may need to add the right mime type to Apache. It sounds like the
proxy
stuff doesn’t like the response it’s seeing. Anything jump out at you in
the
apache logs?

If you can maybe send me code I can try to replicate it here. I am very
interested in problems with the setups I share with people… :slight_smile:

To follow-up, XML files were coming through as MIME text/xml while all
my generated XML that has no problems is application/xml

I’ve added AddType application/xml to my Apache conf and we’ll see how
that goes.

On Apr 25, 9:17 am, “[email protected][email protected]

This sounds like it might be related to a problem that cropped up with
my app a few weeks ago.

Setup
RHEL 4
Apache 2.2.3
Ruby 1.8.4
Rails 1.1.6
Mongrel 1.0.1 (8 running) with fastthread 0.6.2

After I commented out a line in a flat non generated XML and added one
node in another XML file I’ve noticed errors cropping up serving the
documents getting 404’s not all the time but once out of every 55
times or so.

I have a bit of a different Apache/Mongrel setup. Everything is
ProxyPass’d to Mongrel so the XML file is initially handled by Mongrel
to Apache. That’s why the problem you’re having struck me as possibly
being related.

I removed the commented line from the XML thinking that perhaps there
was a strange character code introduced, a tab or something. The file
passes all validation tests so I’m at a bit of a lost what it is about
these two XML files and just these XML files that Mongrel has problems
with.

Nothing has been changed in the setup other than the XML (well ok a
couple of unrelated views) I can’t roll back the changes to the XML as
I need them.

Is there any other information I can contribute? I’ll keep testing
around.

This is line that was changed for one of the files, I removed it
entirely yesterday and am checking logs for any improvements :

<subSection key=“community” name=“Community News” section_path="/
community/news/" blank_window=“false” auto_select_id=“community_news” /

Hi,
I dont have an answer to your quesion. I just started trying to use
the same document to serve multiple rails applications on Windows.

Page 5 of 13: Section - Link the configurations
Include conf/httpd-webbrick-proxy.conf

After adding this include line into the httpd.conf file, apache does not
restart because it cannot load the httpd-webbrick-proxy.conf file. Do I
have to download this file separately. I do not see the
httpd-webbrick-proxy.conf in the Apache2/conf directory.

I would appreciate any help.
Thanks
Udai

Kevin A. wrote:

I am attempting to follow the document created by Brain Hogan on
“Serving Multiple Rails Applications on Windows with Apache and Mongrel”
and all seems well except for one issue. One of my actions generates an
xml document and uses the “send_data” method to return the file.
However, this is the error I get when executing this controller action:

Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET
/cbf_dev/admin/generate_spreadsheet_xml/2.

Reason: Error reading from remote server

This function works as expected when calling Mongrel directly, but as
soon as I proxy the call through Apache to Mongrel, the above error.

Can anyone help me solve this issues? I think it is something to do with
the way Apache (and the reverse_proxy_fix.rb file described in document
mentioned above) is attempting to reconcile the name?

This newbie thanks you in advance for any help.

Kevin.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs