Post Installation problems -- 'Can't localte object method "new" via package "RT::Handle"... Why?

Running Redhat 8, with redhat’s Apache (2) and mod_perl (2)
and MySQL (Also Redhat’s. 3.23.58 ).

Same result with rt 3.0.8, 3.0.6 and 3.0.2.

I’ve installed all the necessary modules, verified by test-dependencies,
performed a sucessful ‘make install’ and ‘make initialize-database’. I’ve
set up the Apache’s config file to point at RT.

And when I try to connect, I get a 500 error.

Apache’s RT3 error_log file contains naught but:

[Tue Jan 27 03:11:48 2004] [error] [client 10.1.100.10] Can’t locate
object method “new” via package “RT::Handle” at
/opt/rt/rt-3.0.8/lib/RT.pm line 147.!

I’ve done sucessful RT installations before, but was foolish enough not
to document them. I have no idea how to fix this problem, nor why it
occurs.

Any ideas?

Thanks!

-max;

max riz wrote:

Running Redhat 8, with redhat’s Apache (2) and mod_perl (2)
and MySQL (Also Redhat’s. 3.23.58 ).

Same result with rt 3.0.8, 3.0.6 and 3.0.2.

I’ve installed all the necessary modules, verified by test-dependencies,
performed a sucessful ‘make install’ and ‘make initialize-database’. I’ve
set up the Apache’s config file to point at RT.

And when I try to connect, I get a 500 error.

Apache’s RT3 error_log file contains naught but:

[Tue Jan 27 03:11:48 2004] [error] [client 10.1.100.10] Can’t locate
object method “new” via package “RT::Handle” at
/opt/rt/rt-3.0.8/lib/RT.pm line 147.!

I’ve done sucessful RT installations before, but was foolish enough not
to document them. I have no idea how to fix this problem, nor why it
occurs.

Any ideas?

What about DBIx::SearchBuilder?
Use latest RT and latest searchbuilder.
Run RT’s dependencies test again.
Best regards. Ruslan.

Ruslan U. Zakirov wrote:

max riz wrote:

Running Redhat 8, with redhat’s Apache (2) and mod_perl (2)
and MySQL (Also Redhat’s. 3.23.58 ).

Same result with rt 3.0.8, 3.0.6 and 3.0.2.

I’ve installed all the necessary modules, verified by test-dependencies,
performed a sucessful ‘make install’ and ‘make initialize-database’.
I’ve
set up the Apache’s config file to point at RT.

And when I try to connect, I get a 500 error.

Apache’s RT3 error_log file contains naught but:

[Tue Jan 27 03:11:48 2004] [error] [client 10.1.100.10] Can’t locate
object method “new” via package “RT::Handle” at
/opt/rt/rt-3.0.8/lib/RT.pm line 147.!

I’ve done sucessful RT installations before, but was foolish enough
not to document them. I have no idea how to fix this problem, nor why it
occurs.

Any ideas?

What about DBIx::SearchBuilder?

-bash-2.05b$ perl -MCPAN -e shell

cpan shell – CPAN exploration and modules installation (v1.61)
ReadLine support available (try ‘install Bundle::CPAN’)

cpan> install DBIx::SearchBuilder
CPAN: Storable loaded ok
Going to read /opt/rt/.cpan/Metadata
Database was generated on Mon, 02 Feb 2004 12:50:59 GMT
DBIx::SearchBuilder is up to date.

So that’s fine.

Use latest RT and latest searchbuilder.

RT at 3.0.8, SearchBuilder at whatever CPAN
thinks is freshest.

Run RT’s dependencies test again.

Runs fine and reports that everything is there.
-bash-2.05b$ ./rt-3.0.8/sbin/rt-test-dependencies --with-mysql
–with-apache2
Unknown option: with-apache2
perl:
5.8.0…found
MASON dependencies:
Params::Validate 0.02…found
Cache::Cache …found
Exception::Class …found
HTML::Mason 1.16…found
MLDBM …found
Errno …found
FreezeThaw …found
Digest::MD5 2.27…found
CGI::Cookie 1.20…found
Storable 2.08…found
Apache::Session 1.53…found
MAILGATE dependencies:
HTML::TreeBuilder …found
HTML::FormatText …found
Getopt::Long …found
LWP::UserAgent …found
CLI dependencies:
Getopt::Long 2.24…found
CORE dependencies:
Digest::MD5 2.27…found
DBI 1.37…found
Test::Inline …found
Class::ReturnValue 0.40…found
DBIx::SearchBuilder 0.95…found
Text::Template …found
File::Spec 0.8…found
HTML::Entities …found
Net::Domain …found
Log::Dispatch 2.0…found
Locale::Maketext 1.06…found
Locale::Maketext::Lexicon 0.32…found
Locale::Maketext::Fuzzy …found
MIME::Entity 5.108…found
Mail::Mailer 1.57…found
Net::SMTP …found
Text::Wrapper …found
Time::ParseDate …found
File::Temp …found
Term::ReadKey …found
Text::Autoformat …found
Text::Quoted 1.3…found
Scalar::Util …found
DEV dependencies:
Regexp::Common …found
Time::HiRes …found
Test::Inline …found
WWW::Mechanize …found
MYSQL dependencies:
DBD::mysql 2.1018…found

However the error persists.

For bonus points, I’ve tried to do a similar setup at home, on a Fedora
Core 1
machine, and as usual it worked like a charm.

Which leads me to conclude that something is ‘off’ about the machien
I’m using,
but I don’t have a good way to debug this to a reasonable conclusion.

max riz О©╫О©╫О©╫О©╫О©╫:

Ruslan U. Zakirov wrote:

max riz wrote:

Running Redhat 8, with redhat’s Apache (2) and mod_perl (2)
and MySQL (Also Redhat’s. 3.23.58 ).

Same result with rt 3.0.8, 3.0.6 and 3.0.2.

I’ve installed all the necessary modules, verified by test-dependencies,
performed a sucessful ‘make install’ and ‘make initialize-database’.
I’ve
set up the Apache’s config file to point at RT.

And when I try to connect, I get a 500 error.

Apache’s RT3 error_log file contains naught but:

[Tue Jan 27 03:11:48 2004] [error] [client 10.1.100.10] Can’t locate
object method “new” via package “RT::Handle” at
/opt/rt/rt-3.0.8/lib/RT.pm line 147.!

I’ve done sucessful RT installations before, but was foolish enough
not to document them. I have no idea how to fix this problem, nor why it
occurs.

Any ideas?

What about DBIx::SearchBuilder?

-bash-2.05b$ perl -MCPAN -e shell

cpan shell – CPAN exploration and modules installation (v1.61)
ReadLine support available (try ‘install Bundle::CPAN’)

cpan> install DBIx::SearchBuilder
CPAN: Storable loaded ok
Going to read /opt/rt/.cpan/Metadata
Database was generated on Mon, 02 Feb 2004 12:50:59 GMT
DBIx::SearchBuilder is up to date.

So that’s fine.

[snip]

Really fine.

Ok.
Try next command:
perl -we “use lib ‘/opt/rt3/lib’;require RT::Handle;RT::Handle->new();”

As I think you’ve forgot to setup $DatabaseType in config or have done
mistake.

		Best regards. Ruslan.

[snip happens]

Runs fine and reports that everything is there.
-bash-2.05b$ ./rt-3.0.8/sbin/rt-test-dependencies --with-mysql
–with-apache2
Unknown option: with-apache2

That’s --with-modperl2. So you never checked for all the mod_perl2
specific modules.

Michael
Michael S. Liebman m-liebman@northwestern.edu
http://msl521.freeshell.org/
“I have vision and the rest of the world wears bifocals.”
-Paul Newman in “Butch Cassidy & the Sundance Kid”

Michael S. Liebman wrote:> On Mon, Feb 02, 2004 at 04:19:00PM -0500, max riz wrote:

[snip happens]

Runs fine and reports that everything is there.
-bash-2.05b$ ./rt-3.0.8/sbin/rt-test-dependencies --with-mysql
–with-apache2
Unknown option: with-apache2

That’s --with-modperl2. So you never checked for all the mod_perl2
specific modules.

Michael

Same happens with ‘–with-modperl2’

I’ve tried this about 6 different times, on that
particular machine, and consistently fails with
the error specified in the original message.

So: I can consitently and successfuly install
RT on every machine I’ve tried but that one.
Clearly the easy answer is: re-install the OS.

Which is what I will do. However, what bothers
me is that I can’t debug the damn issue to any
reasonable conclusion.

-max;

So that’s fine.

[snip]

Really fine.

Ok.
Try next command:
perl -we “use lib ‘/opt/rt3/lib’;require RT::Handle;RT::Handle->new();”

=== My id(1)===

-bash-2.05b$ id
uid=10010(rt) gid=10010(rt) groups=10010(rt)

=== My Unix ===

-bash-2.05b$ uname -a
Linux dvht.ebrary.com 2.4.20-20.8smp #1 SMP Mon Aug 18 14:39:22 EDT 2003
i686 i686 i386 GNU/Linux

=== My Redhat ===

-bash-2.05b$ cat /etc/issue
Red Hat Linux release 8.0 (Psyche)
Kernel \r on an \m

=== My environment ===

-bash-2.05b$ env
HOSTNAME=blah.some.com
SHELL=/bin/bash
TERM=xterm
HISTSIZE=1000
PERL5LIB=/opt/rt/lib/perl
USER=rt
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:.cmd=00;32:.exe=00;32:.com=00;32:.btm=00;32:.bat=00;32:.sh=00;32:.csh=00;32:.tar=00;31:.tgz=00;31:.arj=00;31:.taz=00;31:.lzh=00;31:.zip=00;31:.z=00;31:.Z=00;31:.gz=00;31:.bz2=00;31:.bz=00;31:.tz=00;31:.rpm=00;31:.cpio=00;31:.jpg=00;35:.gif=00;35:.bmp=00;35:.xbm=00;35:.xpm=00;35:.png=00;35:.tif=00;35:
MAIL=/var/spool/mail/rt
PATH=/bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin
INPUTRC=/etc/inputrc
PWD=/opt/rt
LANG=C
SHLVL=1
HOME=/opt/rt
LOGNAME=rt
LESSOPEN=|/usr/bin/lesspipe.sh %s
G_BROKEN_FILENAMES=1
_=/bin/env

=== Output of the above script ===

-bash-2.05b$ perl -we 'use lib “/opt/rt/rt-3.0.8/lib”; require
RT::Handle; RT::Handle->new(); ’
Use of uninitialized value in concatenation (.) or string at
/opt/rt/rt-3.0.8/lib/RT/Handle.pm line 49.
Use of uninitialized value in concatenation (.) or string at
/opt/rt/rt-3.0.8/lib/RT/Handle.pm line 49.
Can’t locate object method “new” via package “RT::Handle” at -e line 1.
-bash-2.05b$

As I think you’ve forgot to setup $DatabaseType in config or have done
mistake.

I agree, I have clearly made a mistake. I just wish I knew
where, and how, and why it consistently re-occurs on only
one particular machine. I also wish there was some way to
debug this.

        Best regards. Ruslan.

===== Database Type ======

-bash-2.05b$ cat rt-3.0.8/etc/RT_Config.pm | grep -i databasetype
Set($DatabaseType , ‘mysql’);

Thanks for the help, and the patience.

Ciao, and thanks again!

-max;

Max Riz max@ebrary.com writes:

-bash-2.05b$ perl -we 'use lib “/opt/rt/rt-3.0.8/lib”; require
RT::Handle; RT::Handle->new(); ’
Use of uninitialized value in concatenation (.) or string at
/opt/rt/rt-3.0.8/lib/RT/Handle.pm line 49.
Use of uninitialized value in concatenation (.) or string at
/opt/rt/rt-3.0.8/lib/RT/Handle.pm line 49.
Can’t locate object method “new” via package “RT::Handle” at -e line 1.
-bash-2.05b$

Which is as expected, as RT::Handle never pulls in the config.

How about

perl -we 'use lib “/opt/rt/rt-3.0.8/lib”; use RT; RT::LoadConfig(); require RT::Handle; RT::Handle->new(); ’

(All on one line).

Espen Wiborg espenhw@empolis.no
Meddle not in the affairs of dragons, for you are crunchy and taste
like chicken.

Espen Wiborg wrote:

Max Riz max@ebrary.com writes:

-bash-2.05b$ perl -we 'use lib “/opt/rt/rt-3.0.8/lib”; require
RT::Handle; RT::Handle->new(); ’
Use of uninitialized value in concatenation (.) or string at
/opt/rt/rt-3.0.8/lib/RT/Handle.pm line 49.
Use of uninitialized value in concatenation (.) or string at
/opt/rt/rt-3.0.8/lib/RT/Handle.pm line 49.
Can’t locate object method “new” via package “RT::Handle” at -e line 1.
-bash-2.05b$

Which is as expected, as RT::Handle never pulls in the config.

How about

perl -we 'use lib “/opt/rt/rt-3.0.8/lib”; use RT; RT::LoadConfig(); require RT::Handle; RT::Handle->new(); ’

(All on one line).

----- Above command, with some more added info --------

-bash-2.05b$ date; perl -we 'use lib “/opt/rt/rt-3.0.8/lib”; use RT;
RT::LoadConfig(); require RT::Handle; RT::Handle->new(); ’ ; date ; echo $?
Wed Feb 4 16:13:24 PST 2004
Wed Feb 4 16:13:27 PST 2004
0
-bash-2.05b$

So, it goes off and does ‘something’ for 3 seconds, and
returns with no apparent error codes.

Thanks!

-max;

Max Riz max@ebrary.com writes:

-bash-2.05b$ date; perl -we 'use lib “/opt/rt/rt-3.0.8/lib”; use RT;
RT::LoadConfig(); require RT::Handle; RT::Handle->new(); ’ ; date ;
echo $?
Wed Feb 4 16:13:24 PST 2004
Wed Feb 4 16:13:27 PST 2004
0
-bash-2.05b$
So, it goes off and does ‘something’ for 3 seconds, and
returns with no apparent error codes.

Good. That is, in fact, what I expected it to do. What this means is
that your RT installation can talk to its database. Which is good.

My guess at the problem you’re seeing with the web interface is that
Apache (and thus mod_perl) can’t read your config file. Check the
permissions on RT_Config.pm and RT_SiteConfig.pm.

To narrow this down further, try the following script (it should list
your users, one per line):

–8<–
#!/usr/bin/env perl
use lib ‘/opt/rt/rt-3.0.8/lib’;

use RT;
use RT::Users;

RT::LoadConfig();
RT::Init();

my $users = new RT::Users($RT::SystemUser);
while (my $user = $users->Next) {
print $user->Name . “\n”;
}
–8<–

Espen Wiborg espenhw@empolis.no
Two-thirds of the world’s eggplant is grown in New Jersey.

Espen Wiborg wrote:

Max Riz max@ebrary.com writes:

So, it goes off and does ‘something’ for 3 seconds, and
returns with no apparent error codes.

Good. That is, in fact, what I expected it to do. What this means is
that your RT installation can talk to its database. Which is good.

Indeed it is. And it means that ‘something’ works.

My guess at the problem you’re seeing with the web interface is that
Apache (and thus mod_perl) can’t read your config file. Check the
permissions on RT_Config.pm and RT_SiteConfig.pm.

[max@dvht max]$ ls -al /opt/rt/
total 40
drwxrwxr-x 6 rt rt 4096 Feb 5 15:09 .
drwxr-xr-x 3 root root 4096 Jan 27 00:42 …
-rw------- 1 rt rt 5404 Feb 3 15:22 .bash_history
-rw-rw---- 1 rt rt 43 Jan 27 00:43 .bash_profile
-rw-rw---- 1 rt rt 41 Jan 28 15:23 .bashrc
drwxrwx— 6 rt rt 4096 Feb 2 13:50 .cpan
-rw-r–r-- 1 rt rt 0 Feb 5 15:09 Name
drwxrwx— 3 rt rt 4096 Jan 27 01:17 lib
drwxr-xr-x 9 root root 4096 Jan 27 02:35 rt-3.0.8
drwxrwx— 3 rt rt 4096 Jan 27 00:48 src
[max@dvht max]$ ls -al /opt/rt/rt-3.0.8/
total 36
drwxr-xr-x 9 root root 4096 Jan 27 02:35 .
drwxrwxr-x 6 rt rt 4096 Feb 5 15:09 …
drwxr-xr-x 2 root root 4096 Jan 27 02:35 bin
drwxr-xr-x 2 root rt 4096 Jan 27 02:35 etc
drwxr-xr-x 4 root bin 4096 Jan 27 02:35 lib
drwxr-xr-x 5 root root 4096 Jan 27 02:35 local
drwxr-xr-x 2 root root 4096 Jan 27 02:35 sbin
drwxr-xr-x 4 root root 4096 Jan 27 02:35 share
drwxr-xr-x 5 root root 4096 Jan 27 02:35 var
[max@dvht max]$ ls -al /opt/rt/rt-3.0.8/etc/
total 124
drwxr-xr-x 2 root rt 4096 Jan 27 02:35 .
drwxr-xr-x 9 root root 4096 Jan 27 02:35 …
-r-xr-xr-- 1 root rt 12183 Jan 27 02:36 RT_Config.pm
-r-xr-xr-- 1 root rt 3 Jan 27 02:35 RT_SiteConfig.pm
-r-x------ 1 root rt 68 Jan 2 13:23 acl.Informix
-r-x------ 1 root rt 240 Jan 2 13:23 acl.Oracle
-r-x------ 1 root rt 1396 Jan 2 13:23 acl.Pg
-r-xr–r-- 1 root rt 310 Jan 2 13:23 acl.mysql
-r-xr–r-- 1 root rt 20462 Jan 2 13:23 initialdata
-r-x------ 1 root rt 9952 Jan 2 13:23 schema.Informix
-r-x------ 1 root rt 9874 Jan 2 13:23 schema.Oracle
-r-x------ 1 root rt 12436 Jan 2 13:23 schema.Pg
-r-x------ 1 root rt 9055 Jan 2 13:23 schema.SQLite
-r-xr–r-- 1 root rt 11942 Jan 2 13:23 schema.mysql

So it looks like it’s all world readable.

To narrow this down further, try the following script (it should list
your users, one per line):

–8<–
#!/usr/bin/env perl
use lib ‘/opt/rt/rt-3.0.8/lib’;

use RT;
use RT::Users;

RT::LoadConfig();
RT::Init();

my $users = new RT::Users($RT::SystemUser);
while (my $user = $users->Next) {
print $user->Name . “\n”;
}
–8<–

Works great and lists users w/o problems.

Cute problem, no?

Thanks!

-max;

Max Riz max@ebrary.com writes:
<-snip permissions list->

So it looks like it’s all world readable.

Yup.

To narrow this down further, try the following script (it should list
your users, one per line):
–8<–
<-snip->
–8<–
Works great and lists users w/o problems.
Cute problem, no?

Very. However, I notice from your initial message that you’re running
RedHat 8 with Apache 2, mod_perl2 and MySQL 3.23. That’s two strikes
on the “not recommended” list. :slight_smile:

Fresh guess: A problem with the particular version of mod_perl2
supplied with RedHat 8. And according to earlier messages on the
rt-users list, this is the case (see for instance the thread starting
at http://lists.fsck.com/pipermail/rt-users/2002-October/010297.html).

Espen Wiborg espenhw@empolis.no
The average person falls asleep in seven minutes.