RT3 failure after RH4 updates

Hi,

We’re using RT 3.6.0 with mod_perl-2.0.2, and up until yesterday, it was
working fine.

Updated apache and perl and a few other modules on a RHEL4 box and after
restarting apache, am getting 0-byte replies and these errors when accessing
RT:

[Tue Nov 27 01:09:04 2007] [crit]: Can’t locate object method “request” via
package “Apache” at /usr/lib/perl5/5.8.5/CGI.pm line 315.
(/opt/rt3/bin/webmux.pl:125)

No other errors in the error log.

I’ve tried back tracking it to figure out what’s causing the issue, and it’s
coming back to CGI.pm(315) calling:

$self->r(Apache->request) unless $self->r;

Verified that CGI.pm didn’t change during the update.

Simple command line test to check required packages passed without issue:

perl -e 'require mod_perl; require Apache::Response; require

Apache::RequestRec; require Apache::RequestUtil; require APR::Pool’

So, I’m at a bit of a loss as to why this is now fried.

Short of reverting the updates, any ideas on where to look next would be
appreciated.

Thanks

Stuart

Apache v-host:

<VirtualHost *:80>
ServerName rt.
DocumentRoot /opt/rt3/share/html

    PerlRequire /opt/rt3/bin/webmux.pl

    <Location />
            SetHandler perl-script
            PerlHandler RT::Mason
            AddDefaultCharset UTF-8
    </Location>

Versions:

RT 3.6.0
mod_perl-2.0.2

Subset of packages updated:
httpd-2.0.52-38.ent
perl-5.8.5-36.el4_5.2
perl-Archive-Tar-1.30-1.el4
perl-Compress-Zlib-1.42-1.el4
perl-IO-Zlib-1.04-4.2.el4
perl-Net-DNS-0.48-2.el4
perl-TimeDate-1.16-5.el4

Make sure your Apache perl modules are up-to-date, in particular the
perl-libapreq2 RPMOn Tue, 2007-11-27 at 12:29 +1100, Stuart J. Browne wrote:

Hi,

We’re using RT 3.6.0 with mod_perl-2.0.2, and up until yesterday, it was
working fine.

Updated apache and perl and a few other modules on a RHEL4 box and after
restarting apache, am getting 0-byte replies and these errors when accessing
RT:

[Tue Nov 27 01:09:04 2007] [crit]: Can’t locate object method “request” via
package “Apache” at /usr/lib/perl5/5.8.5/CGI.pm line 315.
(/opt/rt3/bin/webmux.pl:125)

No other errors in the error log.

I’ve tried back tracking it to figure out what’s causing the issue, and it’s
coming back to CGI.pm(315) calling:

$self->r(Apache->request) unless $self->r;

Verified that CGI.pm didn’t change during the update.

Simple command line test to check required packages passed without issue:

perl -e ‘require mod_perl; require Apache::Response; require
Apache::RequestRec; require Apache::RequestUtil; require APR::Pool’

So, I’m at a bit of a loss as to why this is now fried.

Short of reverting the updates, any ideas on where to look next would be
appreciated.

Thanks

Stuart

Apache v-host:

<VirtualHost *:80>
ServerName rt.
DocumentRoot /opt/rt3/share/html

    PerlRequire /opt/rt3/bin/webmux.pl

    <Location />
            SetHandler perl-script
            PerlHandler RT::Mason
            AddDefaultCharset UTF-8
    </Location>

Versions:

RT 3.6.0
mod_perl-2.0.2

Subset of packages updated:
httpd-2.0.52-38.ent
perl-5.8.5-36.el4_5.2
perl-Archive-Tar-1.30-1.el4
perl-Compress-Zlib-1.42-1.el4
perl-IO-Zlib-1.04-4.2.el4
perl-Net-DNS-0.48-2.el4
perl-TimeDate-1.16-5.el4


The rt-users Archives

SAVE THOUSANDS OF DOLLARS ON RT SUPPORT:

If you sign up for a new RT support contract before December 31, we’ll take
up to 20 percent off the price. This sale won’t last long, so get in touch today.
Email us at sales@bestpractical.com or call us at +1 617 812 0745.

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

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

-----Original Message-----
From: Matthew Keller [mailto:kellermg@potsdam.edu]
Sent: Wednesday, November 28, 2007 1:00 AM
To: Stuart J. Browne
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] RT3 failure after RH4 updates

We’re using RT 3.6.0 with mod_perl-2.0.2, and up until
yesterday, it was working fine.

Make sure your Apache perl modules are up-to-date, in particular the
perl-libapreq2 RPM

Never had that package installed.

… And as a follow-up, I found the package and installed it, still getting
the same error …

Stuart

We’re using RT 3.6.0 with mod_perl-2.0.2, and up until
yesterday, it was working fine.

Make sure your Apache perl modules are up-to-date, in
particular the perl-libapreq2 RPM

Never had that package installed.

… And as a follow-up, I found the package and installed it,
still getting the same error …

Was completely unrelated to this.

After trying this, I downgraded all the packages to their pre-update
versions, and tried it all again. It all failed, this time failing to find
the ‘content_type’ method of ‘Apache2::RequestRec’.

So I went hunting. After muddling through the Wiki, and not really finding
anything suitable there, I went back to reading the mod_perl2 documentation,
and came across ‘mod_perl 2.0 renaming’
(mod_perl: mod_perl 2.0 renaming).

At the bottom of the article, it mentions this:

"* In a script or module, replace Apache->request() by
Apache2::RequestUtil->request() and Apache->server() by
Apache2::ServerUtil->server()."

Having trawled through ‘CGI.pm’ yesterday, I noticed that this wasn’t what
was happening after the update(s).

Even though the latest RHEL4 updates upgrades Perl to a different sub-build
within RH’s source tree (5.8.5-36.el4_5.2 as against what we were using,
5.8.5-36.RHEL4), this of course replaces the version of ‘CGI.pm’ that’s in
use with their distributed one, an old v3.05.

CGI.pm → 3.05 (as distributed with the EL4 ‘perl’ RPM):

314: if ($MOD_PERL) {
315: $self->r(Apache->request) unless $self->r;
316: my $r = $self->r;
317: if ($MOD_PERL == 1) {
318: $r->register_cleanup(&CGI::_reset_globals);
319: }
320: else {
321: # XXX: once we have the new API
322: # will do a real PerlOptions -SetupEnv check
323: $r->subprocess_env unless exists $ENV{REQUEST_METHOD};
324: $r->pool->cleanup_register(&CGI::_reset_globals);
325: }
326: undef $NPH;
327: }

In newer versions of CGI.pm (3.29 in this case), it looks like this:

350: if ($MOD_PERL) {
351: if ($MOD_PERL == 1) {
352: $self->r(Apache->request) unless $self->r;
353: my $r = $self->r;
354: $r->register_cleanup(&CGI::_reset_globals);
355: }
356: else {
357: # XXX: once we have the new API
358: # will do a real PerlOptions -SetupEnv check
359: $self->r(Apache2::RequestUtil->request) unless $self->r;
360: my $r = $self->r;
361: $r->subprocess_env unless exists $ENV{REQUEST_METHOD};
362: $r->pool->cleanup_register(&CGI::_reset_globals);
363: }
364: undef $NPH;
365: }

It seems somewhere in the past, I upgraded ‘CGI.pm’ (and associated other
pieces) to a newer mod_perl2 happy version, and didn’t write it down in an
obvious place.

Anyway, thanks to all who read this thead.

Stuart Browne