Incomplete Headers (35 bytes)


#1

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 :slight_smile:


#2

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 :slight_smile:


#3

And the log directory.


#4

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?


#5

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


#6

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 :frowning:

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.


#7

If it still doesn’t work make sure you do not have any “puts” lines in
your code


#8

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

#9

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 ~


#10

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