Rt-3.8.1 cannot get ExternalAuth.pm to be recognized in perl's @inc list

Hi All,

ok. this problem is really annoying me.

I’ve been following some excellent install instructions from here:
http://wiki.bestpractical.com/view/Ubuntu_8.04.1

on how to install rt-3.8.1 on ubuntu 8.04.

All good down to the bit on initalizing the database.

At the end of the intialization i get the error:

calvinc@UbuntuBase804Small:~/tmp/rt-3.8.1$ sudo make initialize-database
/usr/bin/perl sbin/rt-setup-database --action init --dba root
–prompt-for-dba-password
In order to create or update your RT database, this script needs to
connect to your mysql instance on localhost as root
Please specify that user’s database password below. If the user has no
database
password, just press return.

Password:
Working with:
Type: mysql
Host: localhost
Name: rt3
User: rt_user
DBA: root
Now creating a mysql database rt3 for RT.
Done.
Now populating database schema.
Done.
Now inserting database ACLs
Granting access to rt_user@‘localhost’ on rt3.
Done.
Now inserting RT core system objects
Done.
[Wed Dec 10 13:58:03 2008] [crit]: Can’t locate
RT/Authen/ExternalAuth.pm in @INC (@INC contains:
/home/calvinc/tmp/rt-3.8.1/sbin/…/local/lib
/home/calvinc/tmp/rt-3.8.1/sbin/…/lib /etc/perl
/usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8
/usr/local/lib/site_perl .) at
/home/calvinc/tmp/rt-3.8.1/sbin/…/lib/RT.pm line 624.
(/home/calvinc/tmp/rt-3.8.1/sbin/…/lib/RT.pm:377)
Can’t locate RT/Authen/ExternalAuth.pm in @INC (@INC contains:
/home/calvinc/tmp/rt-3.8.1/sbin/…/local/lib
/home/calvinc/tmp/rt-3.8.1/sbin/…/lib /etc/perl
/usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8
/usr/local/lib/site_perl .) at
/home/calvinc/tmp/rt-3.8.1/sbin/…/lib/RT.pm line 624.
make: *** [initialize-database] Error 255

So the first time around, i thought that maybe i’d better install the
ExernalAuth.pm plugin. so i followed the instructions and got the
following success message:

calvinc@UbuntuBase804Small:~/tmp/RT-Authen-ExternalAuth-0.06_02$ sudo
make install
Installing
/opt/rt3/local/plugins/RT-Authen-ExternalAuth/lib/RT/User_Vendor.pm
Installing
/opt/rt3/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm
Installing /opt/rt3/local/man/man3/RT::User_Vendor.3pm
Installing /opt/rt3/local/man/man3/RT::Authen::ExternalAuth.3pm
Writing /opt/rt3/local/man/auto/RT/Authen/ExternalAuth/.packlist
Appending installation info to
/opt/rt3/local/plugins/RT-Authen-ExternalAuth/lib/perllocal.pod
Installing
/opt/rt3/local/plugins/RT-Authen-ExternalAuth/etc/RT_SiteConfig.pm
Installing
/opt/rt3/local/plugins/RT-Authen-ExternalAuth/html/Callbacks/ExternalAuth/autohandler/Auth

So then i deleted the database reran make initialize-database. but got
the same problem.

So after a while i decided it was a problem with the @INC list. after
some digging around, i thought i’d add the full path to ExternalAuth.pm
to the PERL5LIB variable, which would add then add it to @INC

export PERL5LIB=/opt/rt3/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen

after i do that i check @INC using

perl -V

and i get

Built under linux
Compiled at Nov 27 2007 10:44:36
%ENV:
PERL5LIB=“/opt/rt3/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/”
@INC:
/opt/rt3/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/
/etc/perl
/usr/local/lib/perl/5.8.8
/usr/local/share/perl/5.8.8
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.8
/usr/share/perl/5.8
/usr/local/lib/site_perl

yet when i delete the database and retry
sudo make initialize-database

i the list of paths within @INC displays the same as the first time - it
still cant find ExternalAuth.pm

strangely,… when i try to do a make initialize-database with out the
sudo i get:

calvinc@UbuntuBase804Small:~/tmp/rt-3.8.1$ make initialize-database
/usr/bin/perl sbin/rt-setup-database --action init --dba root
–prompt-for-dba-password

RT couldn’t load RT config file /opt/rt3/etc/RT_Config.pm as:
user: calvinc
group: calvinc

The file is owned by user root and group www-data.

This usually means that the user/group your webserver is running
as cannot read the file. Be careful not to make the permissions
on this file too liberal, because it contains database passwords.
You may need to put the webserver user in the appropriate group
(www-data) or change permissions be able to run succesfully.

Can’t locate RT_Config.pm in @INC (@INC contains: /opt/rt3/local/etc
/opt/rt3/etc /home/calvinc/tmp/rt-3.8.1/sbin/…/local/lib
/home/calvinc/tmp/rt-3.8.1/sbin/…/lib
/opt/rt3/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ /etc/perl
/usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8
/usr/local/lib/site_perl .) at
/home/calvinc/tmp/rt-3.8.1/sbin/…/lib/RT/Config.pm line 410.
BEGIN failed–compilation aborted at sbin/rt-setup-database line 86.
make: *** [initialize-database] Error 255

which shows the correct path added into @INC here?!!!

i’m sure it’s something i’ve done/overlooked cos it always is… but i
just cant see it.
any hints much appreciated!

Calvin Chiang
Network Admin
Utilyx
1st Floor, 55 North Wharf Road
Paddington
London, W2 1LA
Tel: 020 7087 8673
www.utilyx.com

“Utilyx” is the trading name of “Utilyx Limited” and “Utilyx Risk Management Limited” (URML). URML is authorised and regulated by the Financial Services Authority (FSA). This message contains information that may be privileged or confidential and is the property of Utilyx. It is intended only for the person to whom it is addressed. No confidentiality or privilege is waived or lost by any mistransmission. Any views or opinions expressed in this message are solely those of the author and do not necessarily represent those of Utilyx. Unless otherwise stated, any pricing information given in this message is indicative only and does not constitute an offer to deal at any price quoted. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
This email has been scanned by the MessageLabs Email Security System.
For more information please visit Email Security

Remove all ExternalAuth code so that it authenticates against the
database. It needs to first create the default users in RT. Once the
make initialize-database is done, then add the ExternalAuth into
RT_SiteConfig.pm and you’ll be great.

Keith McDermott
Desktop Support Specialist - PCN
Physics Department, Purdue University

Web: Science IT - College of Science - Purdue University
E-mail: kmcdermo@purdue.edu
Phone: (765)496-2202
Address:525 Northwestern Avenue
West Lafayette, IN 47907

Check out our new documentation at:
http://www.physics.purdue.edu/PCN/doc/wiki

Calvin Chiang wrote:

Hi Keith,

Thanks for the quick reply!
I’ll give it a shot now and post back with my results.

Cheers!

Calvin

Keith A McDermott wrote:

Remove all ExternalAuth code so that it authenticates against the
database. It needs to first create the default users in RT. Once the
make initialize-database is done, then add the ExternalAuth into
RT_SiteConfig.pm and you’ll be great.

Keith McDermott
Desktop Support Specialist - PCN
Physics Department, Purdue University

Web: Science IT - College of Science - Purdue University
E-mail: kmcdermo@purdue.edu
Phone: (765)496-2202
Address:525 Northwestern Avenue
West Lafayette, IN 47907

Check out our new documentation at:
Science IT - College of Science - Purdue University

Calvin Chiang wrote:

Hi All,

ok. this problem is really annoying me.

I’ve been following some excellent install instructions from here:
Ubuntu 8.04.1 - Request Tracker Wiki

on how to install rt-3.8.1 on ubuntu 8.04.

All good down to the bit on initalizing the database.

At the end of the intialization i get the error:

calvinc@UbuntuBase804Small:~/tmp/rt-3.8.1$ sudo make initialize-database
/usr/bin/perl sbin/rt-setup-database --action init --dba root
–prompt-for-dba-password
In order to create or update your RT database, this script needs to
connect to your mysql instance on localhost as root
Please specify that user’s database password below. If the user has
no database
password, just press return.

Password:
Working with:
Type: mysql
Host: localhost
Name: rt3
User: rt_user
DBA: root
Now creating a mysql database rt3 for RT.
Done.
Now populating database schema.
Done.
Now inserting database ACLs
Granting access to rt_user@‘localhost’ on rt3.
Done.
Now inserting RT core system objects
Done.
[Wed Dec 10 13:58:03 2008] [crit]: Can’t locate
RT/Authen/ExternalAuth.pm in @INC (@INC contains:
/home/calvinc/tmp/rt-3.8.1/sbin/…/local/lib
/home/calvinc/tmp/rt-3.8.1/sbin/…/lib /etc/perl
/usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8
/usr/local/lib/site_perl .) at
/home/calvinc/tmp/rt-3.8.1/sbin/…/lib/RT.pm line 624.
(/home/calvinc/tmp/rt-3.8.1/sbin/…/lib/RT.pm:377)
Can’t locate RT/Authen/ExternalAuth.pm in @INC (@INC contains:
/home/calvinc/tmp/rt-3.8.1/sbin/…/local/lib
/home/calvinc/tmp/rt-3.8.1/sbin/…/lib /etc/perl
/usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8
/usr/local/lib/site_perl .) at
/home/calvinc/tmp/rt-3.8.1/sbin/…/lib/RT.pm line 624.
make: *** [initialize-database] Error 255

So the first time around, i thought that maybe i’d better install the
ExernalAuth.pm plugin. so i followed the instructions and got the
following success message:

calvinc@UbuntuBase804Small:~/tmp/RT-Authen-ExternalAuth-0.06_02$ sudo
make install
Installing
/opt/rt3/local/plugins/RT-Authen-ExternalAuth/lib/RT/User_Vendor.pm
Installing
/opt/rt3/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm

Installing /opt/rt3/local/man/man3/RT::User_Vendor.3pm
Installing /opt/rt3/local/man/man3/RT::Authen::ExternalAuth.3pm
Writing /opt/rt3/local/man/auto/RT/Authen/ExternalAuth/.packlist
Appending installation info to
/opt/rt3/local/plugins/RT-Authen-ExternalAuth/lib/perllocal.pod
Installing
/opt/rt3/local/plugins/RT-Authen-ExternalAuth/etc/RT_SiteConfig.pm
Installing
/opt/rt3/local/plugins/RT-Authen-ExternalAuth/html/Callbacks/ExternalAuth/autohandler/Auth

So then i deleted the database reran make initialize-database. but
got the same problem.

So after a while i decided it was a problem with the @INC list. after
some digging around, i thought i’d add the full path to
ExternalAuth.pm to the PERL5LIB variable, which would add then add it
to @INC

export
PERL5LIB=/opt/rt3/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen

after i do that i check @INC using

perl -V

and i get

Built under linux
Compiled at Nov 27 2007 10:44:36
%ENV:

PERL5LIB=“/opt/rt3/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/”
@INC:
/opt/rt3/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/
/etc/perl
/usr/local/lib/perl/5.8.8
/usr/local/share/perl/5.8.8
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.8
/usr/share/perl/5.8
/usr/local/lib/site_perl

yet when i delete the database and retry
sudo make initialize-database

i the list of paths within @INC displays the same as the first time -
it still cant find ExternalAuth.pm

strangely,… when i try to do a make initialize-database with out the
sudo i get:

calvinc@UbuntuBase804Small:~/tmp/rt-3.8.1$ make initialize-database
/usr/bin/perl sbin/rt-setup-database --action init --dba root
–prompt-for-dba-password

RT couldn’t load RT config file /opt/rt3/etc/RT_Config.pm as:
user: calvinc
group: calvinc

The file is owned by user root and group www-data.
This usually means that the user/group your webserver is running
as cannot read the file. Be careful not to make the permissions
on this file too liberal, because it contains database passwords.
You may need to put the webserver user in the appropriate group
(www-data) or change permissions be able to run succesfully.

Can’t locate RT_Config.pm in @INC (@INC contains: /opt/rt3/local/etc
/opt/rt3/etc /home/calvinc/tmp/rt-3.8.1/sbin/…/local/lib
/home/calvinc/tmp/rt-3.8.1/sbin/…/lib
/opt/rt3/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/
/etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8
/usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8
/usr/local/lib/site_perl .) at
/home/calvinc/tmp/rt-3.8.1/sbin/…/lib/RT/Config.pm line 410.
BEGIN failed–compilation aborted at sbin/rt-setup-database line 86.
make: *** [initialize-database] Error 255

which shows the correct path added into @INC here?!!!

i’m sure it’s something i’ve done/overlooked cos it always is… but i
just cant see it.
any hints much appreciated!


This email has been scanned by the MessageLabs Email Security System.
For more information please visit Email Security


Calvin Chiang
Network Admin
Utilyx
1st Floor, 55 North Wharf Road
Paddington
London, W2 1LA
Tel: 020 7087 8673
www.utilyx.com

“Utilyx” is the trading name of “Utilyx Limited” and “Utilyx Risk Management Limited” (URML). URML is authorised and regulated by the Financial Services Authority (FSA). This message contains information that may be privileged or confidential and is the property of Utilyx. It is intended only for the person to whom it is addressed. No confidentiality or privilege is waived or lost by any mistransmission. Any views or opinions expressed in this message are solely those of the author and do not necessarily represent those of Utilyx. Unless otherwise stated, any pricing information given in this message is indicative only and does not constitute an offer to deal at any price quoted. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
This email has been scanned by the MessageLabs Email Security System.
For more information please visit Email Security