RE: FastCGI problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I see I probably replied without reading everything you've done, my
assertions may not be correct if you've not gotten anything to work
through Apache. You can try increasing the amount/level of error logging
in Apache.

--Mark 
Mark Lavi, Enterprise Web Management Team @ SGI
mailto:mlavi@xxxxxxx || phone:+1-650-933-7707

-----Original Message-----
From: Mark Lavi [mailto:mlavi@xxxxxxx] 
Sent: Thursday, March 15, 2007 3:44 PM
To: users@xxxxxxxxxxxxxxxx
Subject: RE:  FastCGI problem

Caveat: I have no direct experience with Ruby, Plesk, or FastCGI.

I do think that by verifying that your example RoR app works via Apache
and then observing that the other database RoR app does not, you've
isolated the problem to the latter application!

"Premature end of script headers" is what I've seen whenever a PERL CGI
crashes or generates an error condition that doesn't let it output
anything (such as a syntax error). At that point, I try running the CGI
directly from the command line to partially simulate what Apache tries
to execute, e.g.: perl whateverproblem.cgi -- but this is not always
identical to what Apache encounters, it's just another step for
troubleshooting. I have no idea if you could do the same for Ruby and
your app.

Hope this helps,

--Mark 
Mark Lavi, Enterprise Web Management Team @ SGI
mailto:mlavi@xxxxxxx || phone:+1-650-933-7707

-----Original Message-----
From: Dragon [mailto:dragon@xxxxxxxxxxxxxxxxxx] 
Sent: Thursday, March 15, 2007 3:12 PM
To: users@xxxxxxxxxxxxxxxx
Subject:  FastCGI problem

Hello all,

I am attempting to help a non-profit organization setup a new server 
and migrate over their old stuff. One of the things they want to use 
is a database application using Ruby on Rails.

This system is an up to date FC4 distribution running Plesk 8.1 
control panel, instead of the "standard" FastCGI module, they use one 
called mod_fcgid that is supposed to play better with Plesk. Plesk 
also says that enabling RoR is a simple matter of enabling FastCGI 
support, all I can say to that is it isn't as simple as they say. 
Just do a Google on "Plesk Ruby Rails" and you will see how much 
trouble people have gone through trying to get this to work in that 
environment (but I digress...)

I have been having a hell of a time attempting to get this to work 
and have come down to the point where I believe I have diagnosed the 
problem to be that both mod_fcgid and mod_cgi choke and exit giving 
an error that says "Premature end of script headers"

I have verified that Ruby and Rails are working using the test 
browser they provide, the application functions fine when I do that. 
When attempting to use Apache to serve the application via either 
FastCGI or regular CGI, it simply will not work. This is not only 
true of this Ruby-based application but also for any script or 
program I attempt to execute via FastCGI or regular CGI (Perl, 
binary, shell script, etc.).

I do get errors in my httpd error log when using FastCGI but I have 
no idea what they are really telling me. The underlying cause of the 
error is not given in the errors. Here is what I typically get when I 
try to access the script:

[Thu Mar 15 14:43:20 2007] [notice] mod_fcgid: server 
/var/www/vhosts/example.org/httpdocs/fighter/public/dispatch.fcgi(29959)

started
[Thu Mar 15 14:43:21 2007] [notice] mod_fcgid: server 
/var/www/vhosts/example.org/httpdocs/fighter/public/dispatch.fcgi(29960)

started
[Thu Mar 15 14:43:22 2007] [notice] mod_fcgid: server 
/var/www/vhosts/example.org/httpdocs/fighter/public/dispatch.fcgi(29963)

started
[Thu Mar 15 14:43:25 2007] [notice] mod_fcgid: process 
/var/www/vhosts/example.org/httpdocs/fighter/public/dispatch.fcgi(29963)

exit(communication error), terminated by calling exit(), return code:
120
[Thu Mar 15 14:43:25 2007] [notice] mod_fcgid: process 
/var/www/vhosts/example.org/httpdocs/fighter/public/dispatch.fcgi(29960)

exit(server exited), terminated by calling exit(), return code: 120
[Thu Mar 15 14:43:25 2007] [notice] mod_fcgid: process 
/var/www/vhosts/example.org/httpdocs/fighter/public/dispatch.fcgi(29959)

exit(server exited), terminated by calling exit(), return code: 120


If I use regular CGI, all I get is the premature end of script 
headers error without any further information.

I am at a loss on how to proceed from here.

If anyone can help me figure out how to configure this system to get 
CGI and FastCGI working, I would greatly appreciate it. I have been 
working on this for nearly a week and it is making me crazy.

Dragon

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Venimus, Saltavimus, Bibimus (et naribus canium capti sumus)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux