Mason Cannot resolve file to component

View: New views
4 Messages — Rating Filter:   Alert me  

Mason Cannot resolve file to component

by Behzad Mahini-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have already installed RT 3.8.4 , and it works fine (on a test  
server). However, in the process of installing RT 3.8.4 on a new  
server (production), RT's UI fails to launch (404 Not Found). I am  
getting the following error message in my Apache error_log file (my  
Prod server):

"[warning]: [Mason] Cannot resolve file to component: /ngs/app/rt/
oppresso/rt-3.8.4/share/html/index.html (is file outside component  
root?) at /Library/Perl/5.8.8/HTML/Mason/ApacheHandler.pm line 852. (/
Library/Perl/5.8.8/HTML/Mason/ApacheHandler.pm:852)"


I have exhausted all possibilities of finding any differences in  
between the 2 servers, by comparing the config settings in between the  
2 servers (i.e., httpd.conf, Rt_SiteConfig.pm), and they are  
identical.  I would appreciate any help.

My settings are as follows:

Mac OSX 10.5.8
RT 3.8.4
httpd-2.2.13
mod_perl-2.04
mysql-5.1.40 (<== on my Prod. server; and 5.1.37 on my Test server)

My httpd.conf attributes that are relevant to both the 2 servers (and  
are similar):


<VirtualHost my_ip_addr:80>

         ServerName <<myhost.xx.com>>

         DocumentRoot "/ngs/app/rt/oppresso/rt-3.8.4/share/html/"

         Alias /NoAuth/images/   /ngs/app/rt/oppresso/rt-3.8.4/share/
html/NoAuth/images/
         PerlModule      Apache::DBI
         PerlModule      Apache2::compat
         PerlSetVar      MasonArgsMethod CGI
         PerlRequire     /ngs/app/rt/oppresso/rt-3.8.4/bin/webmux.pl

         <Directory /ngs/app/rt/oppresso/rt-3.8.4/share/html/>
                 AllowOverride All
                 Options Indexes ExecCGI FollowsymLinks
                 Order allow,deny
                 Allow from all
         </Directory>

         <Location       />
                 RedirectMatch permanent (.*)/$ $1/index.html
                 AddDefaultCharset UTF-8
                 SetHandler perl-script
                 PerlHandler RT::Mason
         </Location>
</VirtualHost>

Additionally, Apache's error_log for both the 2 servers indicate that  
Mod_perl 2.0.4 is being used.

Thanks,
Behzad

_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@...


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Re: Mason Cannot resolve file to component

by Behzad Mahini-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Just in case others will run into this issue, I have a workaround  
solution.......After digging I realized this was an issue in how Mason  
is being called by RT (i.e., RT's source code  "webmux.pl", as for  
some odd reason Mason's Handler for my Prod. server is not getting  
set  -- related line in webmux.pl is => $Handler =  
RT::Interface::Web::Handler->new(RT->Config->Get('MasonParameters'));



The (temporary) workaround to address this issue for me, was to add  
the following lines to my RT_SiteConfig.pm:

Set($MasonComponentRoot, "/path_2_your_RT/share/html");
Set($MasonLocalComponentRoot, "/path_2_your_RT/local");
Set($MasonDataDir, "/path_2_your_RT/var/mason_data");
Set($MasonSessionDir, "/path_2_your_RT/var/session_data");


I believe this is a potential bug, as my RT_Config.pm &  
RT_SIteConfig.pm for the 2 servers (prior to inclusion of the above 4  
lines in my Prod. server) were exactly similar .

-Behzad


On Nov 4, 2009, at 6:39 PM, Behzad Mahini wrote:

> I have already installed RT 3.8.4 , and it works fine (on a test
> server). However, in the process of installing RT 3.8.4 on a new
> server (production), RT's UI fails to launch (404 Not Found). I am
> getting the following error message in my Apache error_log file (my
> Prod server):
>
> "[warning]: [Mason] Cannot resolve file to component: /ngs/app/rt/
> oppresso/rt-3.8.4/share/html/index.html (is file outside component
> root?) at /Library/Perl/5.8.8/HTML/Mason/ApacheHandler.pm line 852. (/
> Library/Perl/5.8.8/HTML/Mason/ApacheHandler.pm:852)"
>
>
> I have exhausted all possibilities of finding any differences in
> between the 2 servers, by comparing the config settings in between the
> 2 servers (i.e., httpd.conf, Rt_SiteConfig.pm), and they are
> identical.  I would appreciate any help.
>
> My settings are as follows:
>
> Mac OSX 10.5.8
> RT 3.8.4
> httpd-2.2.13
> mod_perl-2.04
> mysql-5.1.40 (<== on my Prod. server; and 5.1.37 on my Test server)
>
> My httpd.conf attributes that are relevant to both the 2 servers (and
> are similar):
>
>
> <VirtualHost my_ip_addr:80>
>
>         ServerName <<myhost.xx.com>>
>
>         DocumentRoot "/ngs/app/rt/oppresso/rt-3.8.4/share/html/"
>
>         Alias /NoAuth/images/   /ngs/app/rt/oppresso/rt-3.8.4/share/
> html/NoAuth/images/
>         PerlModule      Apache::DBI
>         PerlModule      Apache2::compat
>         PerlSetVar      MasonArgsMethod CGI
>         PerlRequire     /ngs/app/rt/oppresso/rt-3.8.4/bin/webmux.pl
>
>         <Directory /ngs/app/rt/oppresso/rt-3.8.4/share/html/>
>                 AllowOverride All
>                 Options Indexes ExecCGI FollowsymLinks
>                 Order allow,deny
>                 Allow from all
>         </Directory>
>
>         <Location       />
>                 RedirectMatch permanent (.*)/$ $1/index.html
>                 AddDefaultCharset UTF-8
>                 SetHandler perl-script
>                 PerlHandler RT::Mason
>         </Location>
> </VirtualHost>
>
> Additionally, Apache's error_log for both the 2 servers indicate that
> Mod_perl 2.0.4 is being used.
>
> Thanks,
> Behzad
>
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales@...
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com

_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@...


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Re: Mason Cannot resolve file to component

by Jesse Vincent :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message




On Fri  6.Nov'09 at 10:44:31 -0800, Behzad Mahini wrote:
> Just in case others will run into this issue, I have a workaround  
> solution.......After digging I realized this was an issue in how Mason  
> is being called by RT (i.e., RT's source code  "webmux.pl", as for  
> some odd reason Mason's Handler for my Prod. server is not getting  
> set  -- related line in webmux.pl is => $Handler =  
> RT::Interface::Web::Handler->new(RT->Config->Get('MasonParameters'));

Out of curiosity, are the disk layouts on the two servers the same? (Was
one server set up with a symlink where the other had a real directory?)

>
>
> The (temporary) workaround to address this issue for me, was to add  
> the following lines to my RT_SiteConfig.pm:
>
> Set($MasonComponentRoot, "/path_2_your_RT/share/html");
> Set($MasonLocalComponentRoot, "/path_2_your_RT/local");
> Set($MasonDataDir, "/path_2_your_RT/var/mason_data");
> Set($MasonSessionDir, "/path_2_your_RT/var/session_data");
>
>
> I believe this is a potential bug, as my RT_Config.pm &  
> RT_SIteConfig.pm for the 2 servers (prior to inclusion of the above 4  
> lines in my Prod. server) were exactly similar .
>
> -Behzad
>
>
> On Nov 4, 2009, at 6:39 PM, Behzad Mahini wrote:
>
> > I have already installed RT 3.8.4 , and it works fine (on a test
> > server). However, in the process of installing RT 3.8.4 on a new
> > server (production), RT's UI fails to launch (404 Not Found). I am
> > getting the following error message in my Apache error_log file (my
> > Prod server):
> >
> > "[warning]: [Mason] Cannot resolve file to component: /ngs/app/rt/
> > oppresso/rt-3.8.4/share/html/index.html (is file outside component
> > root?) at /Library/Perl/5.8.8/HTML/Mason/ApacheHandler.pm line 852. (/
> > Library/Perl/5.8.8/HTML/Mason/ApacheHandler.pm:852)"
> >
> >
> > I have exhausted all possibilities of finding any differences in
> > between the 2 servers, by comparing the config settings in between the
> > 2 servers (i.e., httpd.conf, Rt_SiteConfig.pm), and they are
> > identical.  I would appreciate any help.
> >
> > My settings are as follows:
> >
> > Mac OSX 10.5.8
> > RT 3.8.4
> > httpd-2.2.13
> > mod_perl-2.04
> > mysql-5.1.40 (<== on my Prod. server; and 5.1.37 on my Test server)
> >
> > My httpd.conf attributes that are relevant to both the 2 servers (and
> > are similar):
> >
> >
> > <VirtualHost my_ip_addr:80>
> >
> >         ServerName <<myhost.xx.com>>
> >
> >         DocumentRoot "/ngs/app/rt/oppresso/rt-3.8.4/share/html/"
> >
> >         Alias /NoAuth/images/   /ngs/app/rt/oppresso/rt-3.8.4/share/
> > html/NoAuth/images/
> >         PerlModule      Apache::DBI
> >         PerlModule      Apache2::compat
> >         PerlSetVar      MasonArgsMethod CGI
> >         PerlRequire     /ngs/app/rt/oppresso/rt-3.8.4/bin/webmux.pl
> >
> >         <Directory /ngs/app/rt/oppresso/rt-3.8.4/share/html/>
> >                 AllowOverride All
> >                 Options Indexes ExecCGI FollowsymLinks
> >                 Order allow,deny
> >                 Allow from all
> >         </Directory>
> >
> >         <Location       />
> >                 RedirectMatch permanent (.*)/$ $1/index.html
> >                 AddDefaultCharset UTF-8
> >                 SetHandler perl-script
> >                 PerlHandler RT::Mason
> >         </Location>
> > </VirtualHost>
> >
> > Additionally, Apache's error_log for both the 2 servers indicate that
> > Mod_perl 2.0.4 is being used.
> >
> > Thanks,
> > Behzad
> >
> > _______________________________________________
> > http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> >
> > Community help: http://wiki.bestpractical.com
> > Commercial support: sales@...
> >
> >
> > Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> > Buy a copy at http://rtbook.bestpractical.com
>
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales@...
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
>
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@...


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Re: Mason Cannot resolve file to component

by Behzad Mahini-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Nov 6, 2009, at 10:50 AM, Jesse Vincent wrote:

>
>
>
> On Fri  6.Nov'09 at 10:44:31 -0800, Behzad Mahini wrote:
>> Just in case others will run into this issue, I have a workaround
>> solution.......After digging I realized this was an issue in how  
>> Mason
>> is being called by RT (i.e., RT's source code  "webmux.pl", as for
>> some odd reason Mason's Handler for my Prod. server is not getting
>> set  -- related line in webmux.pl is => $Handler =
>> RT::Interface::Web::Handler->new(RT->Config->Get('MasonParameters'));
>
> Out of curiosity, are the disk layouts on the two servers the same?  
> (Was
> one server set up with a symlink where the other had a real  
> directory?)

Disk layouts were similar, and no symlink was used.
-Behzad

>
>>
>>
>> The (temporary) workaround to address this issue for me, was to add
>> the following lines to my RT_SiteConfig.pm:
>>
>> Set($MasonComponentRoot, "/path_2_your_RT/share/html");
>> Set($MasonLocalComponentRoot, "/path_2_your_RT/local");
>> Set($MasonDataDir, "/path_2_your_RT/var/mason_data");
>> Set($MasonSessionDir, "/path_2_your_RT/var/session_data");
>>
>>
>> I believe this is a potential bug, as my RT_Config.pm &
>> RT_SIteConfig.pm for the 2 servers (prior to inclusion of the above 4
>> lines in my Prod. server) were exactly similar .
>>
>> -Behzad
>>

_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@...


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com