Thoroughly stumped

[I mistakingly tried sending this with the wrong email account. Apologies if two copies of the same message appear!]

Hi Everyone,

I wanted to give FastCGI a try on a Fedora Core 3 server running RT
(I’ve been successfully running it with mod_perl). I’ve used FastCGI
on a Fedora Core 1 server in the past, so I didn’t foresee any problems
this time around: I was wrong!

The interface is working, except for the top left “busted image”
syndrome. I can’t for the life of me figure out why the image is broken
this time around when a similar config worked well on the FC1 machine.

It appears that FastCGI is still attempting to process the image, even
though I’ve configured an Alias in the VirtualHost for the images
directory. Here’s the output from /var/log/httpd/suexec.log that leads
me to believe that FastCGI is trying to process the image:

[2005-03-22 10:42:26]: uid: (rt/rt) gid: (rt/rt) cmd: mason_handler.fcgi
[2005-03-22 10:42:31]: uid: (rt/rt) gid: (rt/rt) cmd: mason_handler.fcgi
[2005-03-22 10:45:07]: uid: (rt/rt) gid: (552/552) cmd: salogo.gif
[2005-03-22 10:45:12]: uid: (rt/rt) gid: (552/552) cmd: salogo.gif
[2005-03-22 10:45:17]: uid: (rt/rt) gid: (552/552) cmd: salogo.gif
[2005-03-22 10:45:22]: uid: (rt/rt) gid: (552/552) cmd: salogo.gif

The first two lines indicate the server start. The remaining four lines
are repeated as the browser tries to load the image.

There is also a curious permissions error, which so far I haven’t been
able to track down either. Here’s the relevant error message
from /var/log/httpd/error_log:

[Tue Mar 22 10:45:07 2005] [warn] FastCGI: (dynamic) server
“/var/www/rt/share/html/NoAuth/images/salogo.gif” (uid 552, gid 552)
started (pid 5477)
failed to open log file
fopen: Permission denied
[Tue Mar 22 10:45:07 2005] [warn] FastCGI: (dynamic) server
“/var/www/rt/share/html/NoAuth/images/salogo.gif” (pid 5477) terminated
by calling exit with status ‘1’

I’ve changed permissions and owners on all of the log directories that I
believe RT/FastCGI would need to write to, but I haven’t been able to
get rid of the error.

Does anyone have any clues about where the problem(s) may lie? Besides
the broken image, RT is running super slow now because Apache/FastCGI is
hanging on images.

Here’s my VirtualHost config for RT. I’d be grateful for any
tips/suggestions.

Request Tracker

FastCGIWrapper /usr/sbin/suexec
FastCgiIpcDir /tmp/fastcgi
FastCgiServer /var/www/rt/bin/mason_handler.fcgi -idle-timeout 300 -
processes 2 -init-start-delay 5 -user rt -group rt

<VirtualHost *:80>
ServerName blah.blah.com
ServerAlias blah.blah.local
ErrorLog /var/log/httpd/rt_error_log
CustomLog /var/log/httpd/rt_access_log combined
DocumentRoot /var/www/rt/share/html
SuexecUserGroup rt rt

Alias /NoAuth/images/ /var/www/rt/share/html/NoAuth/images/
Alias /NoAuth/webrt.css/ /var/www/rt/share/html/NoAuth/webrt.css/
AddHandler fastcgi-script fcgi
ScriptAlias / /var/www/rt/bin/mason_handler.fcgi/

AddDefaultCharset UTF-8 SetHandler fastcgi-script

<Directory /var/www/rt/share/html/>
Options ExecCGI
DirectoryIndex index.html
AllowOverride None
Order deny,allow
Allow from all

Regards,

Ranbir
Kanwar Ranbir Sandhu
Systems Aligned Inc.

The interface is working, except for the top left “busted image”
syndrome. I can’t for the life of me figure out why the image is broken
this time around when a similar config worked well on the FC1 machine.

I’ve managed to get everything working. The logo and CSS are no longer
being whacked by FastCGI, the errors in the logs are gone, and I’m all
smiles.

I spent two days trying to solve the busted image problem, but it was
this page that finally gave me the hint I needed:

http://www.mythic-beasts.com/support/topic_fastcgi.html

Here’s my final working Apache VirtualHost config for RT 3.2.2 on a
Fedora Core 3 server:

FastCGIWrapper /usr/sbin/suexec
FastCgiIpcDir /tmp/fastcgi
FastCgiServer /var/www/rt/bin/mason_handler.fcgi -idle-timeout 300 -
processes 2 -init-start-delay 5 -user rt -group rt

<VirtualHost *:80>
ServerName blah.blah.com
ServerAlias blah.blah.local
ErrorLog /var/log/httpd/rt_error_log
CustomLog /var/log/httpd/rt_access_log combined
DocumentRoot “/var/www/rt/share/html”
AddDefaultCharSet UTF-8
SuexecUserGroup rt rt

Alias /NoAuth/images/ /var/www/rt/share/html/NoAuth/images/
Alias /NoAuth/webrt.css/ /var/www/rt/share/html/NoAuth/webrt.css/

<Location /NoAuth/images>
            SetHandler default-handler
</Location>

<Location /NoAuth/webrt.css>
            SetHandler default-handler
</Location>

ScriptAlias / /var/www/rt/bin/mason_handler.fcgi/

<Directory /var/www/rt/share/html>
            Options +ExecCGI
            SetHandler fastcgi-script
            DirectoryIndex index.html
            AllowOverride None
            Order deny,allow
            Allow from all
</Directory>

Hope that helps someone out.

Regards,

Ranbir

Kanwar Ranbir Sandhu
Systems Aligned Inc.
www.systemsaligned.com