5.0.2 - Apache won't start - Can't call method "AddRight" on an undefined value at /opt/rt4/local/plugins/RT-Extension-TimeTracking/lib/RT/Extension/TimeTracking.pm

Trying to run RT 5.0.2 on Ubuntu 20.04 and getting this error when starting apache:

Oct 07 12:54:47 rt5 apachectl[217946]: [217946] [Thu Oct 7 16:54:47 2021] [warning]: (in cleanup) Error while loading /opt/rt4/sbin/rt-server: Can’t call method “AddRight” on an undefined value at /opt/r>
Oct 07 12:54:47 rt5 apachectl[217946]: Compilation failed in require at /opt/rt4/sbin/…/lib/RT.pm line 775. (/opt/rt4/sbin/…/lib/RT.pm:410)
Oct 07 12:54:47 rt5 RT[217946]: [217946] (in cleanup) Error while loading /opt/rt4/sbin/rt-server: Can’t call method “AddRight” on an undefined value at /opt/rt4/local/plugins/RT-Extension-TimeTracking/li>
Compilation failed in require at /opt/rt4/sbin/…/lib/RT.pm line 775.
Oct 07 12:54:47 rt5 apachectl[217946]: AH00526: Syntax error on line 22 of /etc/apache2/sites-enabled/000-default-le-ssl.conf:
Oct 07 12:54:47 rt5 apachectl[217946]: Can’t call method “AddRight” on an undefined value at /opt/rt4/local/plugins/RT-Extension-TimeTracking/lib/RT/Extension/TimeTracking.pm line 10.\nCompilation failed in requi>
Oct 07 12:54:47 rt5 apachectl[217934]: Action ‘start’ failed.
Oct 07 12:54:47 rt5 apachectl[217934]: The Apache error log may have more information.
Oct 07 12:54:47 rt5 systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Oct 07 12:54:47 rt5 systemd[1]: apache2.service: Failed with result ‘exit-code’.
Oct 07 12:54:47 rt5 systemd[1]: Failed to start The Apache HTTP Server

It seemed like RT::Extension::TimeTracking wasn’t installed, so I used CPAN to add it without a hitch, but this error remains. While I found other “Can’t call method” reports, I don’t see anyone else with this specific module in question being an issue.

Has anyone else experienced this?

Thanks,

Peter

Did you install RT 5 over RT 4? I believe the install instructions say to use a new dir as the old files from RT 4 won’t necessarily be removed when you install RT 5.

Looking at that extension, it seems line 10 is:

RT::System->AddRight( Admin => AdminTimesheets  => 'Add time worked for other users' );

I think something wrong if RT::System is undefined! You could try disabling the extension to discern if the issue is the extension or the RT 5 install

I blew away my old RT4 and did a fresh RT5 install - problem solved and Apache started.

Thank you,

Peter

1 Like