Forum: Ruby on Rails Incomplete Headers (35 bytes)

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Yoav B. (Guest)
on 2005-11-25 00:02
Hello

I am trying to run RoR on Fedora with FastCGI/Apache. Same RoR
application works on my os x, and works using dispatch.cgi.
When I try to use dispatch.fcgi though I get this error in server.log:
Wed Nov 23 10:42:39 2005] [error] [client 127.0.0.1] FastCGI: incomplete
headers (35 bytes) received from server
"/home/virtual/site1/fst/var/www/html/public/dispatch.fcgi"

Any ideas what I should look for?
As I said, dispatch.cgi runs the application, it just doesn't work with
dispatch.fcgi (I get a "Rails application failed to start properly"
error).


Also, running dispatch.fcgi from the shell gives me a 500 Error message.

Thanks :)
Brad D. (Guest)
on 2005-11-25 03:06
Sounds like a permission problem. Make sure dispatch.fcgi has
permissions set to 755...

stakadush wrote:
> Hello
>
> I am trying to run RoR on Fedora with FastCGI/Apache. Same RoR
> application works on my os x, and works using dispatch.cgi.
> When I try to use dispatch.fcgi though I get this error in server.log:
> Wed Nov 23 10:42:39 2005] [error] [client 127.0.0.1] FastCGI: incomplete
> headers (35 bytes) received from server
> "/home/virtual/site1/fst/var/www/html/public/dispatch.fcgi"
>
> Any ideas what I should look for?
> As I said, dispatch.cgi runs the application, it just doesn't work with
> dispatch.fcgi (I get a "Rails application failed to start properly"
> error).
>
>
> Also, running dispatch.fcgi from the shell gives me a 500 Error message.
>
> Thanks :)
vanweerd (Guest)
on 2005-11-25 06:08
(Received via mailing list)
And the log directory.
Yoav B. (Guest)
on 2005-11-25 09:02
Both dispatch.fcgi & log directory are accesible, and executable. Still
not working...

Just in case I did now 'chmod -R 755 *' on the application directory,
but still doesn't work.

Is there any other log file I can check that should produce more
informative error message? How can I know what's causing the application
stop?
And why does it work with dispatch.cgi?
KiteSurfer <> (Guest)
on 2005-11-25 16:48
Try looking at the apache server logs. It will sometime give you a hint
of what's wrong. Should be in $APACHE_HOME/logs. Also check the shebang
in your dispatch.fcgi and make sure it's using the right ruby
interpreter.

-F
twa (Guest)
on 2005-11-25 19:52
(Received via mailing list)
If it still doesn't work make sure you do not have any "puts" lines in
your code
Yoav B. (Guest)
on 2005-11-25 23:40
The shebang is OK, there are no error messages in the Apache error_log
file (execpt for the Incomplete Headers one) and there are no "puts" in
my code.

Still doesn't work :(

Sholdn't be that hard to get the application running with FastCGI should
it? :o
It was a matter of minutes doing it on my os x Apache.

fastcgi.crash.log has this success message (running as an apache
FastCgiServer):
[24/Nov/2005:00:22:21 :: 15145] starting


Which means it's running, so why do I keep getting the "Rails
application failed to start properly" message all the time? How can I
get verbose error messages from Rails?

I tried also running it normaly (not as a FastCgiServer) but didn't
matter.


I know the application is configured correctly because dispatch.cgi
works. So it must be something with the FastCGI. I just can't figure out
what...


Thanks.
justin (Guest)
on 2005-11-26 16:05
(Received via mailing list)
yoav ba wrote:
> fastcgi.crash.log has this success message (running as an apache
>
>
> I know the application is configured correctly because dispatch.cgi
> works. So it must be something with the FastCGI. I just can't figure out
> what...
>
>
> Thanks.
>
I have this problem on OS X, having once succeeded in getting FastCGI
running on Windows... it would be really useful to have a definitive
source of guidance on this setup (I've been comparing the advice from 11
different sources), and on how to do diagnosis of FastCGI problems.

    Justin
ettinger (Guest)
on 2005-12-09 03:44
(Received via mailing list)
If you've recently updated Rails, you may need to re-rails it.

Make a backup, and go to the root of your project and do `rails .`
then merge in your changes.

~ Andrew Ettinger ~
justin (Guest)
on 2005-12-09 04:04
(Received via mailing list)
Andrew Ettinger wrote:
> If you've recently updated Rails, you may need to re-rails it.
>
> Make a backup, and go to the root of your project and do `rails .`
> then merge in your changes.
>
> ~ Andrew Ettinger ~

Good advice, but this was on a new project. I've moved to
lighttpd/fastcgi, which appears to be OK.

thanks,

   Justin
This topic is locked and can not be replied to.