Request Tracker won't read System::Global::Name

I’m attempting to install RT5 and have gotten through all the prerequisites, the database initialize script, and successfully loaded the site with the embedded web server. It just won’t load with apache. OS is CentOS7.

So if I restart apache and load the site I get the following error:
Can't locate Symbol/Global/Name.pm in @INC (@INC contains: /opt/rt5/sbin/../local/lib /opt/rt5/sbin/../lib /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /opt/rt5/sbin/../lib/RT/Config.pm line 56

The problem is it’s already installed and cpan sees it as installed but RT doesn’t see it.

I used the system perl and installed all of the modules using make fixdeps.

I don’t want to edit request tracker code to tell it to include the directory I found it in: /root/perl5/lib/perl5/Symbol/Global/Name.pm and this directory as you can see is not in @INC.

How can I resolve this?

If you look at the first line for /opt/rt5/sbin/rt-server which Perl does it say RT was setup to use?

Does that correspond to the same Perl that which cpan installs for?

1 Like

. 48 # END BPS TAGGED BLOCK }}} 49 use warnings; 50 use strict; 51 52 BEGIN { 53 die <<EOT if ${^TAINT}; 54 RT does not run under Perl's "taint mode". Remove -T from the command 55 line, or remove the PerlTaintCheck parameter from your mod_perl 56 configuration. 57 EOT 58 } 59 60 # fix lib paths, some may be relative 61 BEGIN { # BEGIN RT CMD BOILERPLATE 62 require File::Spec; 63 require Cwd; 64 my @libs = ("lib", "local/lib"); 65 my $bin_path; 66 67 for my $lib (@libs) { 68 unless ( File::Spec->file_name_is_absolute($lib) ) { 69 $bin_path ||= ( File::Spec->splitpath(Cwd::abs_path(__FILE__)) )[1]; 70 $lib = File::Spec->catfile( $bin_path, File::Spec->updir, $lib ); 71 } 72 unshift @INC, $lib; 73 } 74 75 } 76 77 use Getopt::Long; 78 no warnings 'once'; 79 80 if (grep { m/help/ } @ARGV) { 81 require Pod::Usage; 82 print Pod::Usage::pod2usage( { verbose => 2 } ); 83 exit; 84 } 85 86 require RT; 87 die "Wrong version of RT $RT::VERSION found; need 5.0.*" 88 unless $RT::VERSION =~ /^5\.0\./; 89 90 RT->LoadConfig(); 91 RT->InitPluginPaths(); 92 RT->InitLogging(); 93 94 require RT::Handle; 95 my ($integrity, $state, $msg) = RT::Handle->CheckIntegrity; 96 97 unless ( $integrity ) { 98 print STDERR <<EOF; 99

When I check /opt/rt5/sbin/rt-server, the only lines not included here are comments. I don’t see anything telling me which perl RT is using. Is there a command or something that might tell me?

There should be a shebang at the top of the file (1st line ), for example:

#!/usr/bin/perl -w

Ok sorry vim made it so dark I couldn’t see it.
It’s
#!/usr/bin/perl -w

I am guessing cpan is most likely for the same Perl as well. What happens if you try to manually run the rt webserver:

/opt/rt5/sbin/rt-server --port 8080

Do you see any new logging?

This is all I’m getting and the page won’t load on port 8080 with this running. Get a blank page as if it doesn’t exist at all. It’s not telling me anything about which perl is being used.

[root@nciws-p2286-v ~]# /opt/rt5/sbin/rt-server --port 8080
[32112] [Thu Dec 10 19:09:33 2020] [error]: your $Organization setting (NIH NCI) appears to contain whitespace. Please fix this. (/opt/rt5/sbin/…/lib/RT/Config.pm:706)
[32112] [Thu Dec 10 19:09:33 2020] [warning]: max_allowed_packet is set to 4.0M, which limits the maximum attachment or email size that RT can process. Consider adjusting MySQL’s max_allowed_packet setting. (/opt/rt5/sbin/…/lib/RT/Handle.pm:315)

But it seems that the Perl module missing isn’t an issue there right? Is the Apache user not able to access some of the install locations of Perl modules?

Basically, Perl (better yet RT) needs to see this:
/root/perl5/lib/perl5/Symbol/Global/Name.pm
But I can’t get it to work. I have tried to add include statements in various places so that RT can see /root/perl5/lib/perl5, but none of them worked (and it’s better that way as I don’t want to edit RT source files).

The other thing I tried was to remove and reinstall Symbol::Global::Name using cpan, cpanm, and perl -MCPAN -e but it never changes. If there’s a way to add this directory to an include statement or path environment variable permanently I think that would do it, but none of the forums or information I have found have provided a way to do it.

Since the module is installed in the /root directory I am not sure if the Apache Linux user would have the rights to read any files in that directory. Did you run make fixdeps with sudo?

I did everything as root, yes.

Is there a way to remove the Symbol::Global::Name module completely and reinstall it as apache or some other user?

EDIT: I’m also confused as to why this wouldn’t have affected make fixdeps and the installation of all the other RT prerequisites?

EDIT: I’m also confused as to why this wouldn’t have affected make fixdeps and the installation of all the other RT prerequisites?

It most likely does, I am guessing Symbol::Global::Name is the first module RT tries to load somewhere and that’s why its complaining about that module in particular and why when you ran rt-server as root all the modules were found.

Is there a way to remove the Symbol::Global::Name module completely and reinstall it as apache or some other user?

I believe you need to do this manually by removing the module.

I usually suggest installing a standalone install of Perl just for RT to use so that you don’t need to mess with the system Perl.

Thanks so much for the help. I’m gonna hammer on it now and see what I can figure out. If all the modules are hosed, I will just reimage the VM and start over but I’m going to see what chmod and chown can do for me here. This was very helpful.

Came back to thank you on the “installed as” tip. Once I realized I installed it as root I had memories of. a similar issue with a python install. Thanks.

So far, I have basically chown’d every single directory in the perl tree to use group apache and chmodded as appropriate. This definitely made a difference in that I am at least getting a new error message

Can’t locate RT_Config.pm in @INC (@INC contains: /opt/rt5/local/etc /opt/rt5/etc /opt/rt5/sbin/…/local/lib /opt/rt5/sbin/…/lib /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /opt/rt5/sbin/…/lib/RT/Config.pm line 2036.

If you recall running your ./configure command to configure RT you can provide a flag to specify the user/group your web server runs as. You can run ./configure —help to see the options.

You’ll want to set that to the user/group httpd runs as, it might be “apache”?

But I’m guessing this is Apache not having access to the RT files

It looks like you’ve installed the Perl modules as private ones for root, rather than in system locations where other users (such as the one apache runs under) can make use of them. I’ve seen this before on CentOS 7. You need to tweak your Perl library stuff - take a look at my post here and see if that helps.