Help -- RT configuration not loading!

Hi,
We have an RT 3.0.2 installation here, and we ran into a
peculiar problem: the RT::LoadConfig function simply doesn’t work. It’s
not that it misbehaves in some meaningful way – AFAICT, it simply
silently doesn’t run, when it’s supposed to.

We noticed it first when we enabled ParseNewMessageForTicketCcs

option – RT was refusing to acknowledge CCs in the initiating message.
I spent a few hours tracking it dowd, and discovered that there is a
section in RT::Interface::email::Gateway function which is conditional
upon $RT::ParseNewMessageForTicketCcs being set… except that the said
value isn’t set, even though it’s assigned the value of 1 in the
RT_SiteConfig.pm file.

So I stuck in some debugging code into RT::LoadConfig and

RT::Interface::email::Gateway functions, and bizarre things came into
the light – the code in the LoadConfig simply never got executed!

here is the relevant excerpt from the Gateway function:

BEGIN {
use RT;
RT::LoadConfig(*STDERR);
} # just in case
RT::LoadConfig(*STDERR);
print STDERR “— Email.pm: “.join(”-”, (caller(0))[0…3], $RT::ParseNewMessageForTicketCcs)."\n";
if (1 || $RT::ParseNewMessageForTicketCcs) {

(the last line is our temporary workaround, made in

conjunction with manually removing the RT e-mail addresses from the
@Cc);

And here is the relevant modification of RT::LoadConfig function:

sub LoadConfig {
my $fh = shift || *STDERR;
print $fh “— RT.pm : “.join(”::”, (caller(1))[0…3])."\n";

Now when I restart Apache and submit a mail message, the

following appears in Apache’s error log (the last line is the relevant
datum):

[Tue Jun 10 16:21:25 2003] [notice] SIGHUP received. Attempting to restart
[Tue Jun 10 16:21:25 2003] [notice] Apache/1.3.27 (Unix) mod_perl/1.27 configured – resuming normal operations
[Tue Jun 10 16:21:25 2003] [notice] Accept mutex: sysvsem (Default: sysvsem)
Email.pm: HTML::Mason::Commands-/nfs/saga/rt/rt3.0.2/share/html/REST/1.0/NoAuth/mail-gateway-33-RT::Interface::email::Gateway-

As you can see, the STDERR output from RT::LoadConfig never

appears; expectedly, ParseNewMessageForTicketCcs never gets set. What’s
more, if I further modify LoadConfig to return some distinctive string
and check its return value in Gateway, the return value is still 1
rather than the string I set!

it's truly bizarre. As far as I can tell, LoadConfig simply

doesn’t run – and produces no error message (neither in rt.log nor in
apache’s error log). I also tried wrapping the RT::LoadConfig call in
eval, with no result.
Even if the permissions on RT_SiteConfig.pm were wrong, the
debug text should still have been dumped! but nothing happens.
Amazingly, quietly, simply nothing happens.

Note that when I try the supposedly equivalent action on command

line, everything behaves expectedly:

[root@saga rt]# perl -Ipwd/lib -w -e ‘use RT; print RT::LoadConfig(*STDOUT), “\n”;’ 2>/dev/null
RT.pm :
1

I thought the code under Mason may be getting some other

version of RT.pm, but no – %INC indicates that I am modifying the
correct file.

We are currently working around this by manually forcing the few

conditionals depending on the variables we set in the config file; but I
would really like to be able to figure out what the fsck is wrong. Does
anyone have any ideas?

Thanks,

| Victor Danilchenko ±------------------------------------------+
| danilche@cs.umass.edu | With a GUI, what you see is what you get! |
| CSCF | 5-4231 | With a GUI, what you see is ALL you get! |

Victor Danilchenko wrote:

[Tue Jun 10 16:21:25 2003] [notice] SIGHUP received. Attempting to restart
[Tue Jun 10 16:21:25 2003] [notice] Apache/1.3.27 (Unix) mod_perl/1.27 configured – resuming normal operations

Do not “reload” or “SIGHUP” Apache+mod_perl. Shut apache down
completely then restart it.
Phil Homewood, Systems Janitor, http://www.SnapGear.com
pdh@snapgear.com Ph: +61 7 3435 2810 Fx: +61 7 3891 3630
SnapGear - Custom Embedded Solutions and Security Appliances

Victor Danilchenko wrote:

[Tue Jun 10 16:21:25 2003] [notice] SIGHUP received. Attempting to restart
[Tue Jun 10 16:21:25 2003] [notice] Apache/1.3.27 (Unix) mod_perl/1.27 configured – resuming normal operations

Do not “reload” or “SIGHUP” Apache+mod_perl. Shut apache down
completely then restart it.

Thank you mucho much. that was exactly it -- turns out we

haven’t truly restarted (as in ‘stop, start’) Apache in a couple of
weeks. We did so now, and everything worked.

perhaps it would be useful to put into code detection for being

reloaded on SIGHUP, so that RT can be re-initialized when ‘apachectl
restart’ is issued?..

| Victor Danilchenko | If you can keep your head when all about |
| danilche@cs.umass.edu | you people are losing theirs, then you |
| CSCF | 5-4231 | clearly don’t understand the situation |