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 :) -- Posted via http://www.ruby-forum.com/.
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 :)-- Posted via http://www.ruby-forum.com/.
And the log directory. On 11/24/05, Brad Daily <brad-gF2YUKaa3i2Mzk71e9gJXA@public.gmane.org> wrote:> > 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 :) > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
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? -- Posted via http://www.ruby-forum.com/.
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 -- Posted via http://www.ruby-forum.com/.
If it still doesn''t work make sure you do not have any "puts" lines in your code KiteSurfer <fernand-YPVloBjEdNw@public.gmane.org> wrote:>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 > > > >
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. -- Posted via http://www.ruby-forum.com/.
yoav ba wrote:> 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. >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
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 ~
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