Configure fastcgi with RT on RHEL 64-bit

Hi,

I’m trying to configure RT with fastcgi on a linux host running RHEL 4.0 Update 2 on a x86_64 server. During the make for fastcgi I get the following messages

[root@ewf05 mod_fastcgi-2.4.2]# make

/bin/sh /usr/lib64/apr/build/libtool --silent --mode=compile gcc -pthread -O2 -g -pipe -m64 -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -DAP_HAVE_DESIGNATED_INITIALIZER -DSSL_EXPERIMENTAL_ENGINE -I/usr/include/pcre -I/usr/include/httpd -I/usr/include/apr-0 -I/usr/include/openssl -DAP_FNAME=“mod_fastcgi.c” -prefer-pic -c mod_fastcgi.c && touch mod_fastcgi.slo

/bin/sh /usr/lib64/apr/build/libtool --silent --mode=compile gcc -pthread -O2 -g -pipe -m64 -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -DAP_HAVE_DESIGNATED_INITIALIZER -DSSL_EXPERIMENTAL_ENGINE -I/usr/include/pcre -I/usr/include/httpd -I/usr/include/apr-0 -I/usr/include/openssl -DAP_FNAME=“fcgi_pm.c” -prefer-pic -c fcgi_pm.c && touch fcgi_pm.slo

/bin/sh /usr/lib64/apr/build/libtool --silent --mode=compile gcc -pthread -O2 -g -pipe -m64 -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -DAP_HAVE_DESIGNATED_INITIALIZER -DSSL_EXPERIMENTAL_ENGINE -I/usr/include/pcre -I/usr/include/httpd -I/usr/include/apr-0 -I/usr/include/openssl -DAP_FNAME=“fcgi_util.c” -prefer-pic -c fcgi_util.c && touch fcgi_util.slo

/bin/sh /usr/lib64/apr/build/libtool --silent --mode=compile gcc -pthread -O2 -g -pipe -m64 -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -DAP_HAVE_DESIGNATED_INITIALIZER -DSSL_EXPERIMENTAL_ENGINE -I/usr/include/pcre -I/usr/include/httpd -I/usr/include/apr-0 -I/usr/include/openssl -DAP_FNAME=“fcgi_protocol.c” -prefer-pic -c fcgi_protocol.c && touch fcgi_protocol.slo

/bin/sh /usr/lib64/apr/build/libtool --silent --mode=compile gcc -pthread -O2 -g -pipe -m64 -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -DAP_HAVE_DESIGNATED_INITIALIZER -DSSL_EXPERIMENTAL_ENGINE -I/usr/include/pcre -I/usr/include/httpd -I/usr/include/apr-0 -I/usr/include/openssl -DAP_FNAME=“fcgi_buf.c” -prefer-pic -c fcgi_buf.c && touch fcgi_buf.slo

/bin/sh /usr/lib64/apr/build/libtool --silent --mode=compile gcc -pthread -O2 -g -pipe -m64 -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -DAP_HAVE_DESIGNATED_INITIALIZER -DSSL_EXPERIMENTAL_ENGINE -I/usr/include/pcre -I/usr/include/httpd -I/usr/include/apr-0 -I/usr/include/openssl -DAP_FNAME=“fcgi_config.c” -prefer-pic -c fcgi_config.c && touch fcgi_config.slo

fcgi_config.c: In function `fcgi_config_new_auth_server’:

fcgi_config.c:1193: warning: cast from pointer to integer of different size

/bin/sh /usr/lib64/apr/build/libtool --silent --mode=link gcc -pthread -O2 -g -pipe -m64 -L/usr/lib64 -o mod_fastcgi.la -rpath /usr/lib64/httpd/modules -module -avoid-version mod_fastcgi.lo fcgi_pm.lo fcgi_util.lo fcgi_protocol.lo fcgi_buf.lo fcgi_config.lo

And When I try to start up Apache with fastcgi I get the following errors in the error_log

Unable to load DBIx::SearchBuilder database handle for ‘Oracle’.

Perhaps you’ve picked an invalid database type or spelled it incorrectly.

Can’t load ‘/usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: libclntsh.so.10.1: cannot open shared object file: No such file or directory at /usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi/DynaLoader.pm line 230.

at /usr/lib/perl5/site_perl/5.8.5/DBIx/SearchBuilder/Handle/Oracle.pm line 10

Compilation failed in require at /usr/lib/perl5/site_perl/5.8.5/DBIx/SearchBuilder/Handle/Oracle.pm line 10.

BEGIN failed–compilation aborted at /usr/lib/perl5/site_perl/5.8.5/DBIx/SearchBuilder/Handle/Oracle.pm line 10.

Compilation failed in require at (eval 204) line 1.

BEGIN failed–compilation aborted at (eval 204) line 1.

Compilation failed in require at /opt/rt3/lib/RT.pm line 216.

[Mon Aug 13 16:54:19 2007] [warn] FastCGI: server “/opt/rt3/bin/mason_handler.fcgi” (pid 9829) terminated by calling exit with status ‘2’

[Mon Aug 13 16:54:19 2007] [warn] FastCGI: server “/opt/rt3/bin/mason_handler.fcgi” has failed to remain running for 30 seconds given 3 attempts, its restart interval has been backed off to 600 seconds

….

The Apache config is as follows:

NameVirtualHost <host_name>:80

<VirtualHost <host_name>:80>

ServerAdmin <admin_user>

ServerName <host_name>

DocumentRoot /opt/rt3/share/html/

AddDefaultCharset UTF-8

# Adding the following for RT (the ticket tracker)

AddHandler fastcgi-script fcgi

<Directory "/opt/rt3/share/html">

  Options FollowSymLinks ExecCGI

  AllowOverride None

</Directory>

<Location />

  RedirectMatch permanent (.*)/$ $1/index.html

</Location>

# Pass through requests to for noauth

Alias /NoAuth/images /opt/rt3/share/html/NoAuth/images

ScriptAlias / /opt/rt3/bin/mason_handler.fcgi/

FastCgiIpcDir /tmp

FastCgiServer /opt/rt3/bin/mason_handler.fcgi -idle-timeout 120 -processes 4

And the Fastcgi.conf file is as follows

LoadModule fastcgi_module modules/mod_fastcgi.so

FastCgiConfig –restart

This RT being a 32-bit apps, do I need to make fastcgi with 32-bit libs? If so is there a simple way to do it? How about the oracle libraries should my env variable LD_LIBRARY_PATH should point to $ORACLE_HOME/lib (this is 64-bit) or should it point to $ORACLE_HOME/lib32 ( 32 bit libs)?

The AddHandler “AddHandler fastcgi-script fcgi” in the virtual host section on apache config does it refer to “.fcgi” or just 'fcgi" because I noticed documentation for both.

Thanks

fosterjam@adelphia.net wrote:

Hi,

I’m trying to configure RT with fastcgi on a linux host running RHEL 4.0 Update 2 on a x86_64 server. During the make for fastcgi I get the following messages

And When I try to start up Apache with fastcgi I get the following errors in the error_log

Unable to load DBIx::SearchBuilder database handle for ‘Oracle’.

Perhaps you’ve picked an invalid database type or spelled it incorrectly.

Can’t load ‘/usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: libclntsh.so.10.1: cannot open shared object file: No such file or directory at /usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi/DynaLoader.pm line 230.

It looks like your library path isn’t set correctly before Apache starts
for it to be able to find the Oracle client libs.

Currently I set the env variable LD_LIBRARY_PATH=$ORACLE_HOME/lib ( this points to oracle 64-bit libs) should I be pointing to $ORACLE_HOME/lib32?

Are you referring to oracle libs or system libs at /usr/lib or /usr/lib64? In this case which one should it point to?On the make for fastcgi , is it OK for for fastcgi to build against /usr/lib64 or do I have to point to /usr/lib and re-run make, make install Thanks Patrick Morris trick@adonis.net wrote:

fosterjam@adelphia.net wrote:

Hi,

I’m trying to configure RT with fastcgi on a linux host running RHEL 4.0 Update 2 on a x86_64 server. During the make for fastcgi I get the following messages

And When I try to start up Apache with fastcgi I get the following errors in the error_log

Unable to load DBIx::SearchBuilder database handle for ‘Oracle’.

Perhaps you’ve picked an invalid database type or spelled it incorrectly.

Can’t load ‘/usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: libclntsh.so.10.1: cannot open shared object file: No such file or directory at /usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi/DynaLoader.pm line 230.

It looks like your library path isn’t set correctly before Apache starts
for it to be able to find the Oracle client libs.

fosterjam@adelphia.net wrote:

Can’t load ‘/usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: libclntsh.so.10.1: cannot open shared object file: No such file or directory at /usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi/DynaLoader.pm line 230.

Does this file exist? Did you install the right DBD for your database?

at /usr/lib/perl5/site_perl/5.8.5/DBIx/SearchBuilder/Handle/Oracle.pm line 10

Les Mikesell
lesmikesell@gmail.com

fosterjam@adelphia.net wrote:

Currently I set the env variable LD_LIBRARY_PATH=$ORACLE_HOME/lib ( this points to oracle 64-bit libs) should I be pointing to $ORACLE_HOME/lib32?
To the lib32, if I remember correctly from my Sun/Sparc installations.

Are you referring to oracle libs or system libs at /usr/lib or /usr/lib64? In this case which one should it point to?
Oracle libs

On the make for fastcgi , is it OK for for fastcgi to build against /usr/lib64 or do I have to point to /usr/lib and re-run make, make install
I think that depends on your perl if it is 64bit then everything else
should be 64bit too, including Oracle else it should all point to 32bit
libraries.
Personally, I think it has nothing todo with it since you seem to have
made a 64bit DBD::Oracle and the error is that it can’t find it NOT that
it isn’t the correct ELF version. That is the error that I would get if
I mixed 32/64bit libraries.
Your best bet is to found out what exactly is your LD_LIBRARY_PATH when
using fastcgi. I bet it is reset somewhere along the lines.

Joop