[rt-users] rt4, centos, and fastcgi
John Alberts
John.Alberts at exlibrisgroup.com
Fri Jul 1 15:08:27 EDT 2011
I gave it another try using fcgid and now I have errors about running it being configured to run on the wrong port, which makes no sense.
Here is the apache error log
[Fri Jul 01 13:58:24 2011] [warn] module fcgid_module is already loaded, skipping
[Fri Jul 01 13:58:24 2011] [notice] Digest: generating secret for digest authentication ...
[Fri Jul 01 13:58:24 2011] [notice] Digest: done
[Fri Jul 01 13:58:24 2011] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Fri Jul 01 13:58:27 2011] [warn] mod_fcgid: stderr: [Fri Jul 1 18:58:27 2011] [warn]: The actual SERVER_PORT (80) does NOT match the configured WebPort (443). Perhaps you should Set($WebPort, 80); in RT_SiteConfig.pm, otherwise your internal links may be broken. (/opt/rt4/sbin/../lib/RT/Interface/Web.pm:1079)
[Fri Jul 01 13:58:27 2011] [warn] mod_fcgid: stderr: [Fri Jul 1 18:58:27 2011] [warn]: The actual SERVER_NAME (aspdev.hosted.exlibrisgroup.com) does NOT match the configured WebDomain (helpdesk.hosted.exlibrisgroup.com). Perhaps you should Set($WebDomain, 'aspdev.hosted.exlibrisgroup.com'); in R
[Fri Jul 01 13:58:31 2011] [warn] mod_fcgid: stderr: T_SiteConfig.pm, otherwise your internal links may be broken. (/opt/rt4/sbin/../lib/RT/Interface/Web.pm:1092)
[Fri Jul 01 13:58:31 2011] [warn] mod_fcgid: stderr: [Fri Jul 1 18:58:27 2011] [warn]: The actual SCRIPT_NAME () does NOT match the configured WebPath (/rt4). Perhaps you should Set($WebPath, ''); in RT_SiteConfig.pm, otherwise your internal links may be broken. (/opt/rt4/sbin/../lib/RT/Interface/Web.pm:1097)
[Fri Jul 01 13:59:04 2011] [notice] caught SIGTERM, shutting down
[Fri Jul 01 13:59:04 2011] [notice] mod_fcgid: process /opt/rt4/sbin/rt-server.fcgi(22499) exit(shutting down), get stop signal 15
[Fri Jul 01 13:59:19 2011] [notice] Digest: generating secret for digest authentication ...
[Fri Jul 01 13:59:19 2011] [notice] Digest: done
[Fri Jul 01 13:59:20 2011] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
You can see above, after I remove the rt4.conf file, apache works fine.
Here is my fcgid configuration for RT. When yum installed fcgid, it created a fcgid.conf file, so I'm showing that as well.
-=>>cat fcgid.conf
# This is the Apache server configuration file for providing FastCGI support
# through mod_fcgid
#
# Documentation is available at http://fastcgi.coremail.cn/doc.htm
LoadModule fcgid_module modules/mod_fcgid.so
# Use FastCGI to process .fcg .fcgi & .fpl scripts
# Don't do this if mod_fastcgi is present, as it will try to do the same thing
<IfModule !mod_fastcgi.c>
AddHandler fcgid-script fcg fcgi fpl
</IfModule>
# Sane place to put sockets and shared memory file
SocketPath /var/run/mod_fcgid
SharememPath /var/run/mod_fcgid/fcgid_shm
--- .:root at aspdev:. (/etc/httpd/conf.d)
-=>>cat rt4.conf
LoadModule fcgid_module modules/mod_fcgid.so
<VirtualHost helpdesk.hosted.exlibrisgroup.com>
### Optional apache logs for RT
# Ensure that your log rotation scripts know about these files
# ErrorLog /opt/rt4/var/log/apache2.error
# TransferLog /opt/rt4/var/log/apache2.access
# LogLevel debug
AddDefaultCharset UTF-8
Alias /NoAuth/images/ /opt/rt4/share/html/NoAuth/images/
ScriptAlias / /opt/rt4/sbin/rt-server.fcgi/
DocumentRoot "/opt/rt4/share/html"
<Location /rt4>
Order allow,deny
Allow from all
Options +ExecCGI
AddHandler fcgid-script fcgi
</Location>
</VirtualHost>
If I remove the rt4.conf file and restart the server, apache works fine and all of my other sites work just fine, even with ssl.
----------
John Alberts
Cloud Optimization Engineer
Ex Libris (USA) Inc.
1350 E. Touhy Ave. Suite 200 East
Des Plaines, IL 60018
Phone: 1-219-979-6560
Follow Ex Libris on Twitter: @exlibrisgroup<http://twitter.com/ExLibrisGroup>
From: John Alberts <john.alberts at exlibrisgroup.com<mailto:john.alberts at exlibrisgroup.com>>
Date: Fri, 1 Jul 2011 18:15:12 +0000
To: James Moseley <jmoseley at corp.xanadoo.com<mailto:jmoseley at corp.xanadoo.com>>
Cc: "rt-users at lists.bestpractical.com<mailto:rt-users at lists.bestpractical.com>" <rt-users at lists.bestpractical.com<mailto:rt-users at lists.bestpractical.com>>
Subject: Re: [rt-users] rt4, centos, and fastcgi
Thanks. I'll have to give this a try later tonight when I can have some downtime.
----------
John Alberts
Cloud Optimization Engineer
Ex Libris (USA) Inc.
1350 E. Touhy Ave. Suite 200 East
Des Plaines, IL 60018
Phone: 1-219-979-6560
Follow Ex Libris on Twitter: @exlibrisgroup<http://twitter.com/ExLibrisGroup>
From: James Moseley <jmoseley at corp.xanadoo.com<mailto:jmoseley at corp.xanadoo.com>>
Date: Fri, 1 Jul 2011 11:50:39 -0500
To: John Alberts <john.alberts at exlibrisgroup.com<mailto:john.alberts at exlibrisgroup.com>>
Cc: "rt-users at lists.bestpractical.com<mailto:rt-users at lists.bestpractical.com>" <rt-users at lists.bestpractical.com<mailto:rt-users at lists.bestpractical.com>>
Subject: Re: [rt-users] rt4, centos, and fastcgi
mod_fastcgi and mod_fcgid require different configurations. We haven't used mod_fastcgi in quite some time, but here is our config for mod_fcgid:
LoadModule fcgid_module modules/mod_fcgid.so
# Use FastCGI to process .fcg .fcgi & .fpl scripts
# Don't do this if mod_fastcgi is present, as it will try to do the same thing
<IfModule !mod_fastcgi.c>
AddHandler fcgid-script fcg fcgi fpl
</IfModule>
# Sane place to put sockets and shared memory file
SocketPath run/mod_fcgid
SharememPath run/fcgid_shm
# Main instance
Alias /rt/NoAuth/images/ /opt/rt3/share/html/NoAuth/images/
ScriptAlias /rt /opt/rt3/bin/mason_handler.fcgi/
****
Since you have your RT instance inside a virtual host entry, your FastCgiServer directive should also be inside that virtual host entry.
On Fri, Jul 1, 2011 at 10:52 AM, John Alberts <John.Alberts at exlibrisgroup.com<mailto:John.Alberts at exlibrisgroup.com>> wrote:
Hi. I just tried to upgrade to rt4 and I'm having the hardest time getting the web server to work. For rt3, I was using webmux.pl<http://webmux.pl> in my apache configuration.
I'm on CentOS 5.5 and using Apache 2.2.3. I installed mod_fastcgi 2.4.6 from source. I've followed the example configurations in docs/web_deployment.pod for mod_fastcgi and mod_fcgid and both give me errors. I've heard good things about mod_fastcgi, so I would prefer to get that going.
Here is my mod_fastcgi apache config
LoadModule fastcgi_module modules/mod_fastcgi.so
#FastCgiIpcDir /tmp
FastCgiServer /opt/rt4/sbin/rt-server.fcgi -processes 5 -idle-timeout 300
<VirtualHost mysite.com<http://mysite.com>>
### Optional apache logs for RT
# Ensure that your log rotation scripts know about these files
# ErrorLog /opt/rt4/var/log/apache2.error
# TransferLog /opt/rt4/var/log/apache2.access
# LogLevel debug
AddDefaultCharset UTF-8
Alias /NoAuth/images/ /opt/rt4/share/html/NoAuth/images/
ScriptAlias / /opt/rt4/sbin/rt-server.fcgi/
DocumentRoot "/opt/rt4/share/html"
<Location />
Order allow,deny
Allow from all
Options +ExecCGI
AddHandler fastcgi-script fcgi
</Location>
</VirtualHost>
When I start apache, I get the following errors in /var/log/https/error_log
[Fri Jul 01 10:30:32 2011] [error] [client x.x.x.x] (13)Permission denied: FastCGI: failed to connect to server "/opt/rt4/sbin/rt-server.fcgi": connect() failed
[Fri Jul 01 10:30:32 2011] [error] [client x.x.x.x] FastCGI: incomplete headers (0 bytes) received from server "/opt/rt4/sbin/rt-server.fcgi"
[Fri Jul 01 10:30:33 2011] [crit] (13)Permission denied: FastCGI: can't create server "/opt/rt4/sbin/rt-server.fcgi": bind() failed [/etc/httpd/logs/fastcgi/f758b05f8779532382e3166ad1890013]
--
James Moseley
-------- 2011 Training: http://bestpractical.com/services/training.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20110701/be810fe2/attachment.htm>
More information about the rt-users
mailing list