Can't locate RT/IR.pm

Hello and greetings,

I’ve just fresh installed RT 5.0.3 on RHEL8 using the provided documentation, and I was able to figure my way through it to get an operable webpage. There was not an existing install nor have I moved over any data - this was a 100% clean install on a new server.

Then, I installed the RTIR module following the documentation; however, upon enabling the plugin in etc/RT_SiteConfig.pm as directed and restarting my httpd service, I see the following in the /var/log/httpd/error_log file as well as receiving an HTTP 500 response when attempting to navigate to the previously working RT site:

[1044913] [Wed Jun 21 18:59:27 2023] [critical]: Can’t locate RT/IR.pm in @INC (you may need to install the RT::IR module) (@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.pm line 849. (/opt/rt5/sbin/…/lib/RT.pm:409)

Can’t locate RT/IR.pm in @INC (you may need to install the RT::IR module) (@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.pm line 849.

I’ve read other posts on here that discussed the possibility of different installs of perl that could be conflicting, module in the wrong location, incorrect permissions, etc. I feel like I’ve done my best to ensure none of those apply here before creating a topic, and as such I would appreciate a second set of eyeballs to make sure I haven’t overlooked something.

Any initial ideas?

Thank you in advance for your time.

When you did the RT::IRmake install did it say where it was installing it? You could try rerunning that command if you didn’t note it down as it should just overwrite what is already there.

You can then compare that to the paths in those errors to check that it is being put somewhere by your local Perl installation where the webserver/rest of the RT code can find it. You might need to do the make install as the root user (via sudo for example) if its trying to install it in a private Perl library for your own user account.

@GreenJimll Thank you for your reply.

When running the install as root, the installed location is here:

/opt/rt5/local/plugins/RT-IR/lib/RT/IR.pm

Seeing that the first time after getting the error code, I manually moved the file to /opt/rt5/lib and tried again (after restarting httpd), but it unfortunately provided the same error.

I wasn’t sure if there was a way (like with the ./configure options when preparing RT for install) to direct the make to place the file into one of the @INC directories to avoid manually moving it.

I don’t run RT::IR myself, but that looks like its under the /opt/rt5/local/plugins hierarchy OK. As this RHEL8, is SELinux turned on? You might want to try disabling it temporarily (using setenforce 0) just to see if the problem goes away. If it does you’ll need to look in the SELinux /var/log/audit/audit.log to see why SELinux was denying access (probably a context mismatch).

Yes, that was indeed an issue for getting the RT site stood up. Current SE mode is permissive.

Unfortunately, that only worked for RT and doesn’t seem to help with RT::IR.

Does the IR.pm file itself need special perms? I can’t find anything that would suggest that, and it seems to match other files currently, so I’m unsure what is causing an issue where the RT code can’t seem to access it.

If SELinux is off it should just need permissions that allow the user that the web server is running under to access it and the directory it is in (using standard Unix style permissions)

That was it.

I installed RT as root, so the /opt/rt5 directory was owned by root:root.

Switched /opt/rt5/local to apache:apache, and the module loaded correctly.

Thanks!

1 Like