Mason Cache clear

I was installing RT-Extension-ActivityReports into RT 4.4.0 after the install I ran
rm -rf /opt/rt4/var/mason_data/obj
then service apache2 restart

Apache restarted ok but RT will not load. I found this error in syslog but not sure what to fix.
[40707] mkdir /opt/rt4/var/mason_data/obj/3407077840: Permission denied at /usr/share/perl5/HTML/Mason/Compiler/ToObject.pm line 115.#012#012Stack:#012
[/usr/share/perl/5.20/Carp.pm:166]#012 [/usr/share/perl/5.20/File/Path.pm:156]#012
[/usr/share/perl/5.20/File/Path.pm:133]#012
[/usr/share/perl/5.20/File/Path.pm:114]#012
[/usr/share/perl5/HTML/Mason/Compiler/ToObject.pm:115]#012
[/usr/share/perl5/HTML/Mason/Interp.pm:440]#012
[/usr/share/perl5/HTML/Mason/Interp.pm:776]#012
[/usr/share/perl5/HTML/Mason/Request.pm:259]#012
[/usr/share/perl5/HTML/Mason/Request.pm:215]#012
[/opt/rt4/sbin/…/lib/RT/Interface/Web/Request.pm:61]#012
[/usr/share/perl5/Class/Container.pm:275]#012
[/usr/share/perl5/Class/Container.pm:353]#012
[/usr/share/perl5/HTML/Mason/Interp.pm:351]#012
[/usr/share/perl5/HTML/Mason/Interp.pm:345]#012
[/usr/share/perl5/HTML/Mason/PSGIHandler.pm:59]#012
[/usr/share/perl5/HTML/Mason/PSGIHandler/Streamy.pm:52]#012
[/usr/share/perl5/Plack/Util.pm:301]#012 [/usr/share/perl5/

Then I google clearing mason cache and it shows
rm -Rf /usr/local/rt4/var/mason_data/obj/*
Not usre if the asterisk at end makes difference I tried that after still no luck.

Anyone see what is wrong and how to fix? Greatly appreciated.

I’m a novice, but my guess is a permissions problem since the /obj
directory no longer exists. You erased it with that first command, I think,
and RT can’t find/create it. Try re-creating it with mkdir, then restart
Apache again. If that fails, check the permissions on the obj directory;
the user under which RT runs should be able to control that folder. Again
though, I’m a novice.On Mon, Oct 31, 2016 at 1:49 PM, Dunbar, Brian Brian.Dunbar@von.ca wrote:

I was installing RT-Extension-ActivityReports into RT 4.4.0 after the
install I ran
rm -rf /opt/rt4/var/mason_data/obj
then service apache2 restart

Apache restarted ok but RT will not load. I found this error in syslog but
not sure what to fix.
[40707] mkdir /opt/rt4/var/mason_data/obj/3407077840: Permission denied
at /usr/share/perl5/HTML/Mason/Compiler/ToObject.pm line
115.#012#012Stack:#012
[/usr/share/perl/5.20/Carp.pm:166]#012 [/usr/share/perl/5.20/File/
Path.pm:156]#012
[/usr/share/perl/5.20/File/Path.pm:133]#012
[/usr/share/perl/5.20/File/Path.pm:114]#012
[/usr/share/perl5/HTML/Mason/Compiler/ToObject.pm:115]#012
[/usr/share/perl5/HTML/Mason/Interp.pm:440]#012
[/usr/share/perl5/HTML/Mason/Interp.pm:776]#012
[/usr/share/perl5/HTML/Mason/Request.pm:259]#012
[/usr/share/perl5/HTML/Mason/Request.pm:215]#012
[/opt/rt4/sbin/…/lib/RT/Interface/Web/Request.pm:61]#012
[/usr/share/perl5/Class/Container.pm:275]#012
[/usr/share/perl5/Class/Container.pm:353]#012
[/usr/share/perl5/HTML/Mason/Interp.pm:351]#012
[/usr/share/perl5/HTML/Mason/Interp.pm:345]#012
[/usr/share/perl5/HTML/Mason/PSGIHandler.pm:59]#012
[/usr/share/perl5/HTML/Mason/PSGIHandler/Streamy.pm:52]#012
[/usr/share/perl5/Plack/Util.pm:301]#012 [/usr/share/perl5/

Then I google clearing mason cache and it shows
rm -Rf /usr/local/rt4/var/mason_data/obj/*
Not usre if the asterisk at end makes difference I tried that after still
no luck.

Anyone see what is wrong and how to fix? Greatly appreciated.

RT 4.4 and RTIR training sessions, and a new workshop day!
https://bestpractical.com/training

  • Los Angeles - Q1 2017

Alex Hall
Automatic Distributors, IT department
ahall@autodist.com

Hi Brian,

Check what user apache2 runs as (probably www-data but depends on what distro you use). Then make sure that user can write to the /opt/rt4/var/mason_data/obj directory (chown -R www-data:www-data /opt/rt4/var/mason_data/obj).

To make sure apache2 runs as www-data (or to find out what it does run as) check the output of “ps aux | grep apache2”. There will be one process running as root but the others will run as a different user; that is the one you want.On Oct 31, 2016, at 10:49 AM, Dunbar, Brian <Brian.Dunbar@von.camailto:Brian.Dunbar@von.ca> wrote:

I was installing RT-Extension-ActivityReports into RT 4.4.0 after the install I ran
rm -rf /opt/rt4/var/mason_data/obj
then service apache2 restart

Apache restarted ok but RT will not load. I found this error in syslog but not sure what to fix.
[40707] mkdir /opt/rt4/var/mason_data/obj/3407077840: Permission denied at /usr/share/perl5/HTML/Mason/Compiler/ToObject.pm line 115.#012#012Stack:#012
[/usr/share/perl/5.20/Carp.pm:166]#012 [/usr/share/perl/5.20/File/Path.pm:156]#012
[/usr/share/perl/5.20/File/Path.pm:133]#012
[/usr/share/perl/5.20/File/Path.pm:114]#012
[/usr/share/perl5/HTML/Mason/Compiler/ToObject.pm:115]#012
[/usr/share/perl5/HTML/Mason/Interp.pm:440]#012
[/usr/share/perl5/HTML/Mason/Interp.pm:776]#012
[/usr/share/perl5/HTML/Mason/Request.pm:259]#012
[/usr/share/perl5/HTML/Mason/Request.pm:215]#012
[/opt/rt4/sbin/…/lib/RT/Interface/Web/Request.pm:61]#012
[/usr/share/perl5/Class/Container.pm:275]#012
[/usr/share/perl5/Class/Container.pm:353]#012
[/usr/share/perl5/HTML/Mason/Interp.pm:351]#012
[/usr/share/perl5/HTML/Mason/Interp.pm:345]#012
[/usr/share/perl5/HTML/Mason/PSGIHandler.pm:59]#012
[/usr/share/perl5/HTML/Mason/PSGIHandler/Streamy.pm:52]#012
[/usr/share/perl5/Plack/Util.pm:301]#012 [/usr/share/perl5/

Then I google clearing mason cache and it shows
rm -Rf /usr/local/rt4/var/mason_data/obj/*
Not usre if the asterisk at end makes difference I tried that after still no luck.

Anyone see what is wrong and how to fix? Greatly appreciated.
RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training

  • Los Angeles - Q1 2017

Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
:e-mail: lstewart@internap.commailto:lstewart@internap.com
:earth_africa: www.internap.comhttp://www.internap.com

Thank you Landon, Torsten and Alex. I checked the folder permissions under mason_data and set /obj to 770 to match the other two folders and restarted apache and it is working again. Thank you glad I am not in production yet.From: Landon Stewart [mailto:lstewart@internap.com]
Sent: Monday, October 31, 2016 2:02 PM
To: Dunbar, Brian
Cc: rt-users
Subject: Re: [rt-users] Mason Cache clear

Hi Brian,

Check what user apache2 runs as (probably www-data but depends on what distro you use). Then make sure that user can write to the /opt/rt4/var/mason_data/obj directory (chown -R www-data:www-data /opt/rt4/var/mason_data/obj).

To make sure apache2 runs as www-data (or to find out what it does run as) check the output of “ps aux | grep apache2”. There will be one process running as root but the others will run as a different user; that is the one you want.

Check permissions Brian> Am 31.10.2016 um 18:49 schrieb Dunbar, Brian Brian.Dunbar@von.ca:

I was installing RT-Extension-ActivityReports into RT 4.4.0 after the install I ran
rm -rf /opt/rt4/var/mason_data/obj
then service apache2 restart

Apache restarted ok but RT will not load. I found this error in syslog but not sure what to fix.
[40707] mkdir /opt/rt4/var/mason_data/obj/3407077840: Permission denied at /usr/share/perl5/HTML/Mason/Compiler/ToObject.pm line 115.#012#012Stack:#012
[/usr/share/perl/5.20/Carp.pm:166]#012 [/usr/share/perl/5.20/File/Path.pm:156]#012
[/usr/share/perl/5.20/File/Path.pm:133]#012
[/usr/share/perl/5.20/File/Path.pm:114]#012
[/usr/share/perl5/HTML/Mason/Compiler/ToObject.pm:115]#012
[/usr/share/perl5/HTML/Mason/Interp.pm:440]#012
[/usr/share/perl5/HTML/Mason/Interp.pm:776]#012
[/usr/share/perl5/HTML/Mason/Request.pm:259]#012
[/usr/share/perl5/HTML/Mason/Request.pm:215]#012
[/opt/rt4/sbin/…/lib/RT/Interface/Web/Request.pm:61]#012
[/usr/share/perl5/Class/Container.pm:275]#012
[/usr/share/perl5/Class/Container.pm:353]#012
[/usr/share/perl5/HTML/Mason/Interp.pm:351]#012
[/usr/share/perl5/HTML/Mason/Interp.pm:345]#012
[/usr/share/perl5/HTML/Mason/PSGIHandler.pm:59]#012
[/usr/share/perl5/HTML/Mason/PSGIHandler/Streamy.pm:52]#012
[/usr/share/perl5/Plack/Util.pm:301]#012 [/usr/share/perl5/

Then I google clearing mason cache and it shows
rm -Rf /usr/local/rt4/var/mason_data/obj/*
Not usre if the asterisk at end makes difference I tried that after still no luck.

Anyone see what is wrong and how to fix? Greatly appreciated.

RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training

  • Los Angeles - Q1 2017