Apache Error after Installation of IR add-on

Hello,

I am attempting to set up RT/IR and have run into a problem.

When running perl Makefile.pl on the IR add-on I get:

MakeMaker attribute “VERSION_FROM” is overriden; use “makemaker_append” to
append values
*** Module::AutoInstall version 1.03
*** Checking for Perl dependencies…
[Core Features]

  • Test::More …loaded. (0.98)
  • File::Find …loaded. (1.19)
  • File::Temp …loaded. (0.22)
  • DBIx::SearchBuilder …loaded. (1.63 >= 1.51)
  • Business::Hours …loaded. (0.10)
  • Business::SLA …loaded. (0.05)
  • Net::Whois::RIPE …loaded. (2.002)
  • Hook::LexWrap …loaded. (0.24)
  • Regexp::Common …loaded. (2011121001)
  • Net::CIDR …loaded. (0.17)
  • Regexp::Common::net::CIDR …loaded. (0.02)
    *** Module::AutoInstall configuration finished.

but after completing make, make install, etc I try to restart apache & I
get the following in the error log:

[Tue Feb 05 13:03:12 2013] [error] Can’t locate Business/Hours.pm in @INC
(@INC contains: /opt/rt3/bin/…/local/lib /opt/rt3/local/plugins/RT-FM/lib
/opt/rt3/local/plugins/RT-IR/lib /opt/rt3/bin/…/lib /etc/perl
/usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14
/usr/local/lib/site_perl . /etc/apache2) at
/opt/rt3/local/plugins/RT-IR/lib/RT/IR.pm line 56.\nBEGIN
failed–compilation aborted at /opt/rt3/local/plugins/RT-IR/lib/RT/IR.pm
line 56.\nCompilation failed in require at /opt/rt3/bin/…/lib/RT.pm line
670.\nCompilation failed in require at (eval 2) line 1.\n
[Tue Feb 05 13:03:12 2013] [error] Can’t load Perl file: /opt/rt3/bin/
webmux.pl for server rt.sonic.pri:0, exiting…
[Tue Feb 05 13:03:27 2013] [error] Can’t locate Business/Hours.pm in @INC
(@INC contains: /opt/rt3/bin/…/local/lib /opt/rt3/local/plugins/RT-FM/lib
/opt/rt3/local/plugins/RT-IR/lib /opt/rt3/bin/…/lib /etc/perl
/usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14
/usr/local/lib/site_perl . /etc/apache2) at
/opt/rt3/local/plugins/RT-IR/lib/RT/IR.pm line 56.\nBEGIN
failed–compilation aborted at /opt/rt3/local/plugins/RT-IR/lib/RT/IR.pm
line 56.\nCompilation failed in require at /opt/rt3/bin/…/lib/RT.pm line
670.\nCompilation failed in require at (eval 2) line 1.\n
[Tue Feb 05 13:03:27 2013] [error] Can’t load Perl file: /opt/rt3/bin/
webmux.pl for server rt.sonic.pri:0, exiting…
[Tue Feb 05 13:04:35 2013] [error] Can’t locate Business/Hours.pm in @INC
(@INC contains: /opt/rt3/bin/…/local/lib /opt/rt3/local/plugins/RT-FM/lib
/opt/rt3/local/plugins/RT-IR/lib /opt/rt3/bin/…/lib /etc/perl
/usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14
/usr/local/lib/site_perl . /etc/apache2) at
/opt/rt3/local/plugins/RT-IR/lib/RT/IR.pm line 56.\nBEGIN
failed–compilation aborted at /opt/rt3/local/plugins/RT-IR/lib/RT/IR.pm
line 56.\nCompilation failed in require at /opt/rt3/bin/…/lib/RT.pm line
670.\nCompilation failed in require at (eval 2) line 1.\n
[Tue Feb 05 13:04:35 2013] [error] Can’t load Perl file: /opt/rt3/bin/
webmux.pl for server rt.sonic.pri:0, exiting…

It appears that though it passed the dependancies, Business/Hours.pm etc
are not on my system.

How can I get them?

Thank you for your help, I am very green when it comes to RT.

Kevin

When running perl Makefile.pl on the IR add-on I get:

If you run perl -V as the same user that you ran perl Makefile.PL as,
are the INC directories the same as listed below, or are apache and
your user using different perl versions?

Also, go find the installed Business::Hours module (perldoc -l
Business::Hours is helpful) and make sure that apache can read it.
Check permissions and things like selinux.

-kevin

Thanks for the help! It was not in the @INC path. I am up and running!
Now to just figure out how best to utilize it… :slight_smile:

Kevin Holleran
Master of Science, Computer Information Systems
Grand Valley State University
Master of Business Administration
Western Michigan University
SANS GCFA, SANS GCFE, CCNA, ISA, MCSA, MCDST, MCP

“Do today what others won’t, do tomorrow what others can’t” - SEALFit

“We are what we repeatedly do. Excellence, then, is not an act, but a
habit.” - AristotleOn Tue, Feb 5, 2013 at 5:26 PM, Kevin Falcone falcone@bestpractical.comwrote:

On Tue, Feb 05, 2013 at 04:10:08PM -0500, Kevin Holleran wrote:

When running perl Makefile.pl on the IR add-on I get:

If you run perl -V as the same user that you ran perl Makefile.PL as,
are the INC directories the same as listed below, or are apache and
your user using different perl versions?

Also, go find the installed Business::Hours module (perldoc -l
Business::Hours is helpful) and make sure that apache can read it.
Check permissions and things like selinux.

-kevin

[Tue Feb 05 13:03:12 2013] [error] Can’t locate Business/Hours.pm in
@INC (@INC contains:
/opt/rt3/bin/…/local/lib /opt/rt3/local/plugins/RT-FM/lib
/opt/rt3/local/plugins/RT-IR/lib
/opt/rt3/bin/…/lib /etc/perl /usr/local/lib/perl/5.14.2
/usr/local/share/perl/5.14.2
/usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14
/usr/share/perl/5.14


Rtir mailing list
Rtir@lists.bestpractical.com
The rtir Archives

Kevin Holleran <kdawg44@…> writes:

Thanks for the help! It was not in the INC path. I am up and running!
Now to just figure out how best to utilize it… :slight_smile:

–Kevin HolleranMaster of Science, Computer Information SystemsGrand Valley
State UniversityMaster of Business AdministrationWestern Michigan UniversitySANS
GCFA, SANS GCFE, CCNA, ISA, MCSA, MCDST, MCP
“Do today what others won’t, do tomorrow what others can’t” - SEALFit
“We are what we repeatedly do. Excellence, then, is not an act, but a habit.”

  • Aristotle

When running perl Makefile.pl on the IR add-on I get:
If you run perl -V as the same user that you ran perl Makefile.PL as,
are the INC directories the same as listed below, or are apache and
your user using different perl versions?
Also, go find the installed Business::Hours module (perldoc -l
Business::Hours is helpful) and make sure that apache can read it.
Check permissions and things like selinux.
-kevin

[Tue Feb 05 13:03:12 2013] [error] Can’t locate Business/Hours.pm in
INC ( INC contains:
/opt/rt3/bin/…/local/lib /opt/rt3/local/plugins/RT-FM/lib
/opt/rt3/local/plugins/RT-IR/lib
/opt/rt3/bin/…/lib /etc/perl /usr/local/lib/perl/5.14.2
/usr/local/share/perl/5.14.2
/usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14


Rtir mailing listRtir-
0fE9KPoRgkjUoCVqKGD2MC4SrgSG2MH2@public.gmane.orgmhttp://lists.bestpractical.com
/cgi-bin/mailman/listinfo/rtir

I have exactly the same problem. Please could you give details of how you fixed
it?
Many Thanks
Andy R

I have exactly the same problem. Please could you give details of how you fixed
it?

Show your perl -V and the error message you get which includes the
full @INC.

As noted in my earlier mail, also run perldoc -l Business::Hours and
show us permissions on that file and directories.

-kevin

As stated, I just used per -l Business::Hours & found that the path those
were at was not in the @INC path. At that point, move them or include it
in the path.

Hope this helps.

Kevin Holleran
Master of Science, Computer Information Systems
Grand Valley State University
Master of Business Administration
Western Michigan University
SANS GCFA, SANS GCFE, CCNA, ISA, MCSA, MCDST, MCP

“Do today what others won’t, do tomorrow what others can’t” - SEALFit

“We are what we repeatedly do. Excellence, then, is not an act, but a
habit.” - AristotleOn Thu, Feb 7, 2013 at 3:35 AM, Andy_R andyrat@icloud.com wrote:

Kevin Holleran <kdawg44@…> writes:

Thanks for the help! It was not in the INC path. I am up and
running!
Now to just figure out how best to utilize it… :slight_smile:

–Kevin HolleranMaster of Science, Computer Information SystemsGrand
Valley
State UniversityMaster of Business AdministrationWestern Michigan
UniversitySANS
GCFA, SANS GCFE, CCNA, ISA, MCSA, MCDST, MCP
“Do today what others won’t, do tomorrow what others can’t” - SEALFit
“We are what we repeatedly do. Excellence, then, is not an act, but a
habit.”

  • Aristotle

On Tue, Feb 5, 2013 at 5:26 PM, Kevin Falcone <falcone- nlQc9UtUHLIhHuQSKHfHZAC/G2K4zDHf@public.gmane.org> wrote:
On Tue, Feb 05, 2013 at 04:10:08PM -0500, Kevin Holleran wrote:

When running perl Makefile.pl on the IR add-on I get:
If you run perl -V as the same user that you ran perl Makefile.PL as,
are the INC directories the same as listed below, or are apache and
your user using different perl versions?
Also, go find the installed Business::Hours module (perldoc -l
Business::Hours is helpful) and make sure that apache can read it.
Check permissions and things like selinux.
-kevin

[Tue Feb 05 13:03:12 2013] [error] Can’t locate Business/Hours.pm in
INC ( INC contains:
/opt/rt3/bin/…/local/lib /opt/rt3/local/plugins/RT-FM/lib
/opt/rt3/local/plugins/RT-IR/lib
/opt/rt3/bin/…/lib /etc/perl /usr/local/lib/perl/5.14.2
/usr/local/share/perl/5.14.2
/usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14
/usr/share/perl/5.14


Rtir mailing listRtir-
0fE9KPoRgkjUoCVqKGD2MC4SrgSG2MH2@public.gmane.orgmhttp://
lists.bestpractical.com
/cgi-bin/mailman/listinfo/rtir

I have exactly the same problem. Please could you give details of how you
fixed
it?
Many Thanks
Andy R


Rtir mailing list
Rtir@lists.bestpractical.com
The rtir Archives

Kevin,
Thanks but that does not work for me.
root@rtir:~/RT-IR-2.6.1# perl -l Business::Hours
Can’t open perl script “Business::Hours”: No such file or directory
root@rtir:~/RT-IR-2.6.1# cpan Business::Hours
Going to read ‘/root/.cpan/Metadata’
Database was generated on Thu, 07 Feb 2013 22:53:03 GMT
Business::Hours is up to date (0.10).

If I edit /opt/rt3/etc/RT_Config.pm
root@rtir:~/RT-IR-2.6.1# vi /opt/rt3/etc/RT_Config.pm
If the plugins are set to this apache2 starts without erros:

Set(@Plugins,qw(RT::FM));

The Instructions in IR says to change that to this:
Set(@Plugins, ‘RT::FM’, ‘RT::IR’);

Now apache2 won’t start
[Fri Feb 08 12:58:46 2013] [notice] caught SIGTERM, shutting down
[Fri Feb 08 12:58:52 2013] [error] Can’t locate Business/Hours.pm in @INC (@INC
contains: /opt/rt3/bin/…/local/lib /opt/rt3/local/plugins/RT-FM/lib
/opt/rt3/local/plugins/RT-IR/lib /opt/rt3/bin/…/lib /etc/perl
/usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14
/usr/local/lib/site_perl . /etc/apache2) at
/opt/rt3/local/plugins/RT-IR/lib/RT/IR.pm line 56.\nBEGIN failed–compilation
aborted at /opt/rt3/local/plugins/RT-IR/lib/RT/IR.pm line 56.\nCompilation
failed in require at /opt/rt3/bin/…/lib/RT.pm line 670.\nCompilation failed in
require at (eval 2) line 1.\n
[Fri Feb 08 12:58:52 2013] [error] Can’t load Perl file: /opt/rt3/bin/webmux.pl
for server rtir.nswcsystemsltd.local:0, exiting…

Any ideas?

Kind regards,
Andy
CISSP, GCIA, GCIH, GPEN, GWAPT

root@rtir:~/RT-IR-2.6.1# perl -l Business::Hours
Can’t open perl script “Business::Hours”: No such file or directory

perldoc -l Business::Hours
not
perl -l Business::Hours

You also need to provide perl -V

-kevin

Thanks again for your help
root@rtir:~# perldoc -l Business::Hours
No documentation found for “Business::Hours”.
root@rtir:~# perl -V

Compiled at Nov 27 2012 00:35:49
@INC:
/etc/perl
/usr/local/lib/perl/5.14.2
/usr/local/share/perl/5.14.2
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.14
/usr/share/perl/5.14
/usr/local/lib/site_perl
.

I’m don’t know what conclusions I can draw from this. According to CPAN
Business::Hours is installed but perldoc does not find it??

Kind regards,
Andy

Thanks again for your help
root@rtir:~# perldoc -l Business::Hours
No documentation found for “Business::Hours”.
root@rtir:~# perl -V

Compiled at Nov 27 2012 00:35:49
@INC:
/etc/perl
/usr/local/lib/perl/5.14.2
/usr/local/share/perl/5.14.2
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.14
/usr/share/perl/5.14
/usr/local/lib/site_perl
.

I’m don’t know what conclusions I can draw from this. According to CPAN
Business::Hours is installed but perldoc does not find it??

This implies your perldoc and cpan commands are invoking different
perls. How many perl installs do you have?

You can confirm that the perl from perl -V doesn’t have a
Business::Hours by trying to load it, the easiest is

perl -MBusiness::Hours\ 5

If you have a new enough version of the CPAN module, you could

cpan
i Business::Hours

and it’ll tell you where it thinks things are installed.

Worst case scenario, try to find Business/Hours.pm manually using locate
or find at this point.

-kevin

Kevin Falcone <falcone@…> writes:

root rtir:~/RT-IR-2.6.1# perl -l Business::Hours
Can’t open perl script “Business::Hours”: No such file or directory

perldoc -l Business::Hours
not
perl -l Business::Hours

You also need to provide perl -V

-kevin

root rtir:~/RT-IR-2.6.1# cpan Business::Hours
Going to read ‘/root/.cpan/Metadata’
Database was generated on Thu, 07 Feb 2013 22:53:03 GMT
Business::Hours is up to date (0.10).

If I edit /opt/rt3/etc/RT_Config.pm
root rtir:~/RT-IR-2.6.1# vi /opt/rt3/etc/RT_Config.pm
If the plugins are set to this apache2 starts without erros:

Set(@Plugins,qw(RT::FM));

The Instructions in IR says to change that to this:
Set(@Plugins, ‘RT::FM’, ‘RT::IR’);

Now apache2 won’t start
[Fri Feb 08 12:58:46 2013] [notice] caught SIGTERM, shutting down
[Fri Feb 08 12:58:52 2013] [error] Can’t locate Business/Hours.pm in @INC
(@INC
contains: /opt/rt3/bin/…/local/lib /opt/rt3/local/plugins/RT-FM/lib
/opt/rt3/local/plugins/RT-IR/lib /opt/rt3/bin/…/lib /etc/perl
/usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14
/usr/local/lib/site_perl . /etc/apache2) at
/opt/rt3/local/plugins/RT-IR/lib/RT/IR.pm line 56.\nBEGIN failed–
compilation
aborted at /opt/rt3/local/plugins/RT-IR/lib/RT/IR.pm line 56.\nCompilation
failed in require at /opt/rt3/bin/…/lib/RT.pm line 670.\nCompilation failed
in
require at (eval 2) line 1.\n
[Fri Feb 08 12:58:52 2013] [error] Can’t load Perl file:
/opt/rt3/bin/webmux.pl
for server rtir.nswcsystemsltd.local:0, exiting…

Any ideas?

Kind regards,
Andy
CISSP, GCIA, GCIH, GPEN, GWAPT
InfoSecMatters.blogspot.co.uk


Rtir mailing list
Rtir@…
The rtir Archives

Hi Andy

Been through a similar problem in the recent past. The problem is the path to
Business::Hours is not in the @INC path as in my case

try to find it on the system using find / -iname “hours.pm”

I bet it will be at this location since you have Business::Hours 0.10

/root/.cpan/build/Business-Hours-0.10-UqgfYQ/lib/Business/Hours.pm

now copy it to this location /usr/share/perl5/Business

do
cat /root/perl5/lib/perl5/Business/Hours.pm >>
/usr/share/perl5/Business/Hours.pm

once you are done try restart your apache. any other modules turn out missing
use those steps.

good luck hope this works

Been through a similar problem in the recent past. The problem is the path to
Business::Hours is not in the @INC path as in my case

try to find it on the system using find / -iname “hours.pm”

I bet it will be at this location since you have Business::Hours 0.10

/root/.cpan/build/Business-Hours-0.10-UqgfYQ/lib/Business/Hours.pm

This is the build location for the cpan command line client

now copy it to this location /usr/share/perl5/Business

do
cat /root/perl5/lib/perl5/Business/Hours.pm >>
/usr/share/perl5/Business/Hours.pm

once you are done try restart your apache. any other modules turn out missing
use those steps.

This really isn’t the right way to install perl modules and will break
badly when you get to more complicated perl modules.
The right solution is finding out why it was built but not installed
(or installed to the wrong locations).

As I mentioned in my reply, running

cpan
i Business::Hours

Will tell you exactly where cpan thinks the module is installed.
I was waiting for that information from the original requestor.

-kevin