RT 4.0.3 upgrade problem

Hi All,
I just updated my previously working 4.0.2 RT server to 4.0.3. RT is
running under mod_perl on this box. I followed all of the upgrade
instructions as usual (./configure;make testdeps;make upgrade;make
upgrade-database, and cleared the mason cache directory). The problem is
that when visiting the RT URL server gives a HTTP 500 error. In syslog I
get these messages.

Nov 9 11:43:22 noname RT: Subroutine handle_startup_error redefined at
/opt/rt4/sbin/rt-server line 238. (/opt/rt4/sbin/rt-server:238)
Nov 9 11:43:22 noname RT: Subroutine handle_bind_error redefined at
/opt/rt4/sbin/rt-server line 250. (/opt/rt4/sbin/rt-server:250)
Nov 9 11:43:34 noname RT: #011(in cleanup) Error while loading
/opt/rt4/sbin/rt-server: Can’t locate object method “ComponentRoots” via
package “RT::Interface::Web” at /opt/rt4/sbin/…/lib/RT/
Config.pm line 205. (/opt/rt4/sbin/…/lib/RT.pm:343)

Here is what I have tried:
-Make sure my perl dependencies are all up to date. I did this using
CPAN. A make testdeps shows everything to be in order.
-Tried disabling external plugins. I am using RT-Authen-ExternalAuth with
an LDAP backend. No change here.
-Restoring a backup copy of /opt/rt4 version 4.0.2. I didn’t revert the
database, but it still gives the same error so I don’t think it’s database.

Any ideas on what to do next would be greatly appreciated.
Thanks,
Jeff

Hi All,
I just updated my previously working 4.0.2 RT server to 4.0.3. RT is
running under mod_perl on this box. I followed all of the upgrade
instructions as usual (./configure;make testdeps;make upgrade;make
upgrade-database, and cleared the mason cache directory). The problem is
that when visiting the RT URL server gives a HTTP 500 error. In syslog I
get these messages.

Nov 9 11:43:22 noname RT: Subroutine handle_startup_error redefined at
/opt/rt4/sbin/rt-server line 238. (/opt/rt4/sbin/rt-server:238)
Nov 9 11:43:22 noname RT: Subroutine handle_bind_error redefined at
/opt/rt4/sbin/rt-server line 250. (/opt/rt4/sbin/rt-server:250)
Nov 9 11:43:34 noname RT: #011(in cleanup) Error while loading
/opt/rt4/sbin/rt-server: Can’t locate object method “ComponentRoots” via
package “RT::Interface::Web” at /opt/rt4/sbin/…/lib/RT/
Config.pm line 205. (/opt/rt4/sbin/…/lib/RT.pm:343)

This looks like you’re loading parts of RT twice.
Show your Apache config?

-kevin

Here are the RT related config sections…

<VirtualHost *:80>
Alias /rt “/opt/rt4/share/html”
AddDefaultCharset UTF-8
<Location /rt>
Order allow,deny
allow from all
SetHandler modperl
PerlResponseHandler Plack::Handler::Apache2
PerlSetVar psgi_app /opt/rt4/sbin/rt-server


use Plack::Handler::Apache2;
Plack::Handler::Apache2->preload(“/opt/rt4/sbin/rt-server”);


<VirtualHost *:443>
Alias /rt “/opt/rt4/share/html”
AddDefaultCharset UTF-8
<Location /rt>
Order allow,deny
allow from all
SetHandler modperl
PerlResponseHandler Plack::Handler::Apache2
PerlSetVar psgi_app /opt/rt4/sbin/rt-server


use Plack::Handler::Apache2;
Plack::Handler::Apache2->preload(“/opt/rt4/sbin/rt-server”);

On Wed, Nov 9, 2011 at 1:10 PM, Kevin Falcone falcone@bestpractical.comwrote:

On Wed, Nov 09, 2011 at 12:17:20PM -1000, Jeff Sampson wrote:

Hi All,
I just updated my previously working 4.0.2 RT server to 4.0.3. RT is
running under mod_perl on this box. I followed all of the upgrade
instructions as usual (./configure;make testdeps;make upgrade;make
upgrade-database, and cleared the mason cache directory). The problem is
that when visiting the RT URL server gives a HTTP 500 error. In syslog I
get these messages.

Nov 9 11:43:22 noname RT: Subroutine handle_startup_error redefined at
/opt/rt4/sbin/rt-server line 238. (/opt/rt4/sbin/rt-server:238)
Nov 9 11:43:22 noname RT: Subroutine handle_bind_error redefined at
/opt/rt4/sbin/rt-server line 250. (/opt/rt4/sbin/rt-server:250)
Nov 9 11:43:34 noname RT: #011(in cleanup) Error while loading
/opt/rt4/sbin/rt-server: Can’t locate object method “ComponentRoots” via
package “RT::Interface::Web” at /opt/rt4/sbin/…/lib/RT/
Config.pm line 205. (/opt/rt4/sbin/…/lib/RT.pm:343)

This looks like you’re loading parts of RT twice.
Show your Apache config?

-kevin

Here is what I have tried:
-Make sure my perl dependencies are all up to date. I did this using
CPAN. A make testdeps shows everything to be in order.
-Tried disabling external plugins. I am using RT-Authen-ExternalAuth
with
an LDAP backend. No change here.
-Restoring a backup copy of /opt/rt4 version 4.0.2. I didn’t revert the
database, but it still gives the same error so I don’t think it’s
database.

Any ideas on what to do next would be greatly appreciated.
Thanks,
Jeff


RT Training Sessions (http://bestpractical.com/services/training.html)

  • Barcelona, Spain — November 28 & 29, 2011

Here are the RT related config sections…

<VirtualHost *:80>
Alias /rt “/opt/rt4/share/html”
AddDefaultCharset UTF-8
<Location /rt>
Order allow,deny
allow from all
SetHandler modperl
PerlResponseHandler Plack::Handler::Apache2
PerlSetVar psgi_app /opt/rt4/sbin/rt-server


use Plack::Handler::Apache2;
Plack::Handler::Apache2->preload(“/opt/rt4/sbin/rt-server”);


<VirtualHost *:443>
Alias /rt “/opt/rt4/share/html”
AddDefaultCharset UTF-8
<Location /rt>
Order allow,deny
allow from all
SetHandler modperl
PerlResponseHandler Plack::Handler::Apache2
PerlSetVar psgi_app /opt/rt4/sbin/rt-server


use Plack::Handler::Apache2;
Plack::Handler::Apache2->preload(“/opt/rt4/sbin/rt-server”);

RT Training Sessions (http://bestpractical.com/services/training.html)

  • Barcelona, Spain — November 28 & 29, 2011

I don’t know if it’s going to fix it, but the ‘Alias /rt
“/opt/rt4/share/html”’ is not needed in this setup and it’s probably
conflicting with the ‘Location /rt’ section, so i would say get rid of
it.

http://httpd.apache.org/docs/2.2/mod/core.html#location

Carlos Ramos

You could also try to redirect everything from port 80 to 443, this would
ensure that apache only touches RT once:

<VirtualHost *:80>
ErrorLog /opt/rt4/var/log/apache2.error
TransferLog /opt/rt4/var/log/apache2.access

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

– Bart2011/11/10 Carlos Ramos carragom@gmail.com

On Wed, Nov 9, 2011 at 6:54 PM, Jeff Sampson ffercs@gmail.com wrote:

Here are the RT related config sections…

<VirtualHost *:80>
Alias /rt “/opt/rt4/share/html”
AddDefaultCharset UTF-8
<Location /rt>
Order allow,deny
allow from all
SetHandler modperl
PerlResponseHandler Plack::Handler::Apache2
PerlSetVar psgi_app /opt/rt4/sbin/rt-server


use Plack::Handler::Apache2;
Plack::Handler::Apache2->preload(“/opt/rt4/sbin/rt-server”);


<VirtualHost *:443>
Alias /rt “/opt/rt4/share/html”
AddDefaultCharset UTF-8
<Location /rt>
Order allow,deny
allow from all
SetHandler modperl
PerlResponseHandler Plack::Handler::Apache2
PerlSetVar psgi_app /opt/rt4/sbin/rt-server


use Plack::Handler::Apache2;
Plack::Handler::Apache2->preload(“/opt/rt4/sbin/rt-server”);

RT Training Sessions (http://bestpractical.com/services/training.html)

  • Barcelona, Spain — November 28 & 29, 2011

I don’t know if it’s going to fix it, but the ‘Alias /rt
“/opt/rt4/share/html”’ is not needed in this setup and it’s probably
conflicting with the ‘Location /rt’ section, so i would say get rid of
it.

core - Apache HTTP Server Version 2.2


Carlos Ramos

RT Training Sessions (http://bestpractical.com/services/training.html)

  • Barcelona, Spain November 28 & 29, 2011

Hi Bart,On Thu, 10 Nov 2011, Bart wrote:

You could also try to redirect everything from port 80 to 443, this would
ensure that apache only touches RT once:

<VirtualHost *:80>
ErrorLog /opt/rt4/var/log/apache2.error
TransferLog /opt/rt4/var/log/apache2.access

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

Just out of curiosity: does the conditioning with

RewriteCond %{HTTPS} off

bring in some extra value in the above ? Why/when would it be necessary ?

Thanks,

Iosif Fettich

Well, to be honest, I’m not an expert on this rule lol I’ve copied it after
some searching.

The result however is that it keeps the entire URL in tact (everything past
the / included) and just replaces http with https.

Though, if I’d have to guess then the condition makes sure that it only
does the rewrite if it isn’t https (or something like that).

– Bart2011/11/10 Iosif Fettich ifettich@netsoft.ro

Hi Bart,

On Thu, 10 Nov 2011, Bart wrote:

You could also try to redirect everything from port 80 to 443, this would

ensure that apache only touches RT once:

<VirtualHost *:80>
ErrorLog /opt/rt4/var/log/apache2.error
TransferLog /opt/rt4/var/log/apache2.**access

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_**URI}

Just out of curiosity: does the conditioning with

RewriteCond %{HTTPS} off

bring in some extra value in the above ? Why/when would it be necessary ?

Thanks,

Iosif Fettich

Here are the RT related config sections…

Since you do this twice:

use Plack::Handler::Apache2; Plack::Handler::Apache2->preload("/opt/rt4/sbin/rt-server"); use Plack::Handler::Apache2; Plack::Handler::Apache2->preload("/opt/rt4/sbin/rt-server");

Once for each virtual host, I could see apache and mod_perl being
grumpy about it.

-kevin

Thanks for the replies thus far. I’ve tried them all, but I’m still
getting the same error.

I just reinstalled my entire perl installation on the box and that fixed
the problem. I’m still not sure exactly what caused the problem.On Thu, Nov 10, 2011 at 7:54 AM, Kevin Falcone falcone@bestpractical.comwrote:

On Wed, Nov 09, 2011 at 02:54:08PM -1000, Jeff Sampson wrote:

Here are the RT related config sections…

Since you do this twice:

use Plack::Handler::Apache2; Plack::Handler::Apache2->preload("/opt/rt4/sbin/rt-server"); use Plack::Handler::Apache2; Plack::Handler::Apache2->preload("/opt/rt4/sbin/rt-server");

Once for each virtual host, I could see apache and mod_perl being
grumpy about it.

-kevin


RT Training Sessions (http://bestpractical.com/services/training.html)

  • Barcelona, Spain — November 28 & 29, 2011