Multiple instances configuration problems - RT 4.0.4 on Apache 2 + mod_perl2

Hi all,

I have successfully installed RT version 4.0.4 and it works fine if I
use the rt-server or under a “unique” Apache2 VirtualHost. However, if I
have other RT (3.6 and 3.8) instances configured as additional
VirtualHosts, the Apache2 server fails to start (Segmentation fault). I
think I have followed the installation instruction carefully and the
component versions are correct. I am also including my web configuration
section.

With previous versions (3.6 and 3.8) I used the +Parent and webmux.pl
option to run several instances under the same apache.

So my question is: is it possible and how to have more than one RT 4
instances running under the same apache (a mix of 3.x and 4.x or at
least all versions 4)?

Many thanks,

Gabriele

<VirtualHost <my_ip>:80>

Optional apache logs for RT

   ErrorLog /opt/rt4pst/var/log/apache2.error

   TransferLog /opt/rt4pst/var/log/apache2.access

   LogLevel debug



   AddDefaultCharset UTF-8



   ServerName rtpstest.nervianoms.com

   DocumentRoot "/opt/rt4pst/share/html"



    <Location />

        Order allow,deny

        Allow from all



        SetHandler modperl

        PerlResponseHandler Plack::Handler::Apache2

        PerlSetVar psgi_app /opt/rt4pst/sbin/rt-server

    </Location>

    <Perl>

        use Plack::Handler::Apache2;

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

    </Perl>

Dr. Gabriele VALERIO

Information Technology

Database & Data Management

Nerviano Medical Sciences

Via Pasteur, 10

Nerviano (MI) ITALY

Tel: ++39-0331-581460

Mobile: ++39-348-1311053

Fax:++39-0331-581456

“There is always more about you than anyone expects!”

So my question is: is it possible and how to have more than one RT 4
instances running under the same apache (a mix of 3.x and 4.x or at
least all versions 4)?

Not using mod_perl. It’s a design limitation in mod_perl. Use FastCGI
or reverse proxying instead.

We ran into the following schema.mysql error during our upgrade from
3.8.8 to 4.0.04, after some investigation it appears that it stems from
using RTFM in 3.8.8.

Processing 3.9.8
Now populating database schema.
[Mon Jan 30 20:00:30 2012] [crit]: DBD::mysql::st execute failed: Table
’Classes’ already exists at /root/src/rt-4.0.4/sbin/…/lib/RT/Handle.pm
line 517. (/root/src/rt-4.0.4/sbin/…/lib/RT.pm:341)
DBD::mysql::st execute failed: Table ‘Classes’ already exists at
/root/src/rt-4.0.4/sbin/…/lib/RT/Handle.pm line 517.

Our solution was to re-ran ‘make upgrade-database’ using 3.9.9 as the
version upgrading from.

-Ron

We ran into the following schema.mysql error during our upgrade from
3.8.8 to 4.0.04, after some investigation it appears that it stems
from using RTFM in 3.8.8.

RTFM used the table FM_Classes, not Classes.
If you already had a Classes table, then you did some part of your
upgrade wrong.

I suspect that you ran make initialize-database from 4.0 and then
restored your 3.8.8 database into the rt4 database, which is wrong and
leaves new RT4 tables around.

-kevin

Kevin,

Interesting, I’ll go back through my notes etc. IIRC the DB was a
restored fron our rt3 prod DB and then the upgrade procedures applied.

-RonOn 1/30/2012 3:18 PM, Kevin Falcone wrote:

On Mon, Jan 30, 2012 at 03:06:05PM -0500, Ronald J. Yacketta wrote:

We ran into the following schema.mysql error during our upgrade from
3.8.8 to 4.0.04, after some investigation it appears that it stems
from using RTFM in 3.8.8.
RTFM used the table FM_Classes, not Classes.
If you already had a Classes table, then you did some part of your
upgrade wrong.

I suspect that you ran make initialize-database from 4.0 and then
restored your 3.8.8 database into the rt4 database, which is wrong and
leaves new RT4 tables around.

-kevin

Processing 3.9.8
Now populating database schema.
[Mon Jan 30 20:00:30 2012] [crit]: DBD::mysql::st execute failed:
Table ‘Classes’ already exists at
/root/src/rt-4.0.4/sbin/…/lib/RT/Handle.pm line 517.
(/root/src/rt-4.0.4/sbin/…/lib/RT.pm:341)
DBD::mysql::st execute failed: Table ‘Classes’ already exists at
/root/src/rt-4.0.4/sbin/…/lib/RT/Handle.pm line 517.

Our solution was to re-ran ‘make upgrade-database’ using 3.9.9 as
the version upgrading from.


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

  • Boston — March 5& 6, 2012

Multiple instances under Apache 2 + mod_perl2 worked perfectly for
versions prior RT 4. Does someone managed to make it work also with RT
4?

Thanks,
Gabriele

[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Thomas
SibleySent: Friday, January 27, 2012 3:24 PM
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Multiple instances configuration problems - RT
4.0.4 on Apache 2 + mod_perl2

Multiple instances under Apache 2 + mod_perl2 worked perfectly for
versions prior RT 4. Does someone managed to make it work also with RT
4?

I don’t see why the following shouldn’t work:

http://requesttracker.wikia.com/wiki/MultipleInstances#mod_perl_2.x

Thanks,
Gabriele

-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Thomas
Sibley
Sent: Friday, January 27, 2012 3:24 PM
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Multiple instances configuration problems - RT
4.0.4 on Apache 2 + mod_perl2

So my question is: is it possible and how to have more than one RT 4
instances running under the same apache (a mix of 3.x and 4.x or at
least all versions 4)?

Not using mod_perl. It’s a design limitation in mod_perl. Use FastCGI
or reverse proxying instead.

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

  • Boston March 5 & 6, 2012

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

  • Boston March 5 & 6, 2012

Best regards, Ruslan.

Ruslan,
With RT 4.0.4 it does not work. First of all there is no webmux.pl file any more. Try, and if you are able to have more than RT 4 instances running on the same server using Apache2 and mod_perl2 please tell me how to do that.

Thanks,
GabrieleFrom: ruslan.zakirov@gmail.com [mailto:ruslan.zakirov@gmail.com] On Behalf Of Ruslan Zakirov
Sent: Thursday, February 09, 2012 1:11 PM
To: Valerio, Gabriele [Nervianoms]
Cc: Thomas Sibley; rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Multiple instances configuration problems - RT 4.0.4 on Apache 2 + mod_perl2

Multiple instances under Apache 2 + mod_perl2 worked perfectly for
versions prior RT 4. Does someone managed to make it work also with RT
4?

I don’t see why the following shouldn’t work:

http://requesttracker.wikia.com/wiki/MultipleInstances#mod_perl_2.x

Thanks,
Gabriele

-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Thomas
Sibley
Sent: Friday, January 27, 2012 3:24 PM
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Multiple instances configuration problems - RT
4.0.4 on Apache 2 + mod_perl2

So my question is: is it possible and how to have more than one RT 4
instances running under the same apache (a mix of 3.x and 4.x or at
least all versions 4)?

Not using mod_perl. It’s a design limitation in mod_perl. Use FastCGI
or reverse proxying instead.

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

  • Boston March 5 & 6, 2012

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

  • Boston March 5 & 6, 2012

Best regards, Ruslan.

Ruslan,
With RT 4.0.4 it does not work. First of all there is no webmux.pl file any more. Try, and if you are able to have more than RT 4 instances running on the same server using Apache2 and mod_perl2 please tell me how to do that.

Primary thing there is:

PerlOptions +Parent

May be it will work right away or if you drop preload call.

Thanks,
Gabriele

-----Original Message-----
From: ruslan.zakirov@gmail.com [mailto:ruslan.zakirov@gmail.com] On Behalf Of Ruslan Zakirov
Sent: Thursday, February 09, 2012 1:11 PM
To: Valerio, Gabriele [Nervianoms]
Cc: Thomas Sibley; rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Multiple instances configuration problems - RT 4.0.4 on Apache 2 + mod_perl2

Multiple instances under Apache 2 + mod_perl2 worked perfectly for
versions prior RT 4. Does someone managed to make it work also with RT
4?

I don’t see why the following shouldn’t work:

http://requesttracker.wikia.com/wiki/MultipleInstances#mod_perl_2.x

Thanks,
Gabriele

-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Thomas
Sibley
Sent: Friday, January 27, 2012 3:24 PM
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Multiple instances configuration problems - RT
4.0.4 on Apache 2 + mod_perl2

So my question is: is it possible and how to have more than one RT 4
instances running under the same apache (a mix of 3.x and 4.x or at
least all versions 4)?

Not using mod_perl. It’s a design limitation in mod_perl. Use FastCGI
or reverse proxying instead.

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

  • Boston March 5 & 6, 2012

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

  • Boston March 5 & 6, 2012


Best regards, Ruslan.

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

  • Boston March 5 & 6, 2012

Best regards, Ruslan.

I am not sure I understand your suggestions Ruslan. Here is the standard template VirtualHost configuration with RT 4.0.4 (it works for me with ONE RT instance):

<VirtualHost <ip_address>:80>

Optional apache logs for RT

     ErrorLog /opt/rt4/var/log/apache2.error
     TransferLog /opt/rt4/var/log/apache2.access
     LogLevel debug
   ServerName <my_server_alias_name>

   AddDefaultCharset UTF-8

   DocumentRoot "/opt/rt4/share/html"

    <Location />
        Order allow,deny
        Allow from all

        SetHandler modperl
        PerlResponseHandler Plack::Handler::Apache2
        PerlSetVar psgi_app /opt/rt4/sbin/rt-server
    </Location>
    <Perl>
        use Plack::Handler::Apache2;
        Plack::Handler::Apache2->preload("/opt/rt4/sbin/rt-server");
    </Perl>

What exactly do you suggest to change in order to have it working in multiple RT instances server? Just to add PerlOptions +Parent?

Thank you,
GabrieleFrom: ruslan.zakirov@gmail.com [mailto:ruslan.zakirov@gmail.com] On Behalf Of Ruslan Zakirov
Sent: Thursday, February 09, 2012 1:35 PM
To: Valerio, Gabriele [Nervianoms]
Cc: Thomas Sibley; rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Multiple instances configuration problems - RT 4.0.4 on Apache 2 + mod_perl2

Ruslan,
With RT 4.0.4 it does not work. First of all there is no webmux.pl file any more. Try, and if you are able to have more than RT 4 instances running on the same server using Apache2 and mod_perl2 please tell me how to do that.

Primary thing there is:

PerlOptions +Parent

May be it will work right away or if you drop preload call.

Thanks,
Gabriele

-----Original Message-----
From: ruslan.zakirov@gmail.com [mailto:ruslan.zakirov@gmail.com] On Behalf Of Ruslan Zakirov
Sent: Thursday, February 09, 2012 1:11 PM
To: Valerio, Gabriele [Nervianoms]
Cc: Thomas Sibley; rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Multiple instances configuration problems - RT 4.0.4 on Apache 2 + mod_perl2

Multiple instances under Apache 2 + mod_perl2 worked perfectly for
versions prior RT 4. Does someone managed to make it work also with RT
4?

I don’t see why the following shouldn’t work:

http://requesttracker.wikia.com/wiki/MultipleInstances#mod_perl_2.x

Thanks,
Gabriele

-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Thomas
Sibley
Sent: Friday, January 27, 2012 3:24 PM
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Multiple instances configuration problems - RT
4.0.4 on Apache 2 + mod_perl2

So my question is: is it possible and how to have more than one RT 4
instances running under the same apache (a mix of 3.x and 4.x or at
least all versions 4)?

Not using mod_perl. It’s a design limitation in mod_perl. Use FastCGI
or reverse proxying instead.

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

  • Boston March 5 & 6, 2012

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

  • Boston March 5 & 6, 2012


Best regards, Ruslan.

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

  • Boston March 5 & 6, 2012

Best regards, Ruslan.

What exactly do you suggest to change in order to have it working in multiple RT instances server? Just to add PerlOptions +Parent?

Try just adding “PerlOptions +Parent” to every virtual host with RT.

Best regards, Ruslan.

Hello Ruslan,

Strangely enough it worked on my “production” server (RHEL 5) with one
3.6.4 RT instance + one 4.0.4 RT, while I was not able to start Apache
(Segmentation fault) with the very same configuration on my “test”
server (Fedora 5) where I have many 3.6, 3.8 RT instances + one RT
4.0.4.

Anyway it seems your suggestion is correct and can work.

Thank you,
Gabriele

Behalf Of Ruslan ZakirovSent: Friday, February 10, 2012 8:47 PM
To: Valerio, Gabriele [Nervianoms]
Cc: Thomas Sibley; rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Multiple instances configuration problems - RT
4.0.4 on Apache 2 + mod_perl2