RT4.0.7 apache config question

Hello all,

We have RT 4.0.7 installed on SLES11-SP2 64-bit

Following is package version:
This is perl, v5.10.0 built for x86_64-linux-thread-multi
mysql Ver 14.12 Distrib 5.0.96, for suse-linux-gnu (x86_64) using EditLine wrapper
apache2-2.2.12-1.30.1
apache2-mod_perl-2.0.4-40.19

After the installation, ran script (/opt/rt4/sbin/rt-server) to configure RT and it worked well!

Note, we are running RT on port 8081, and see following in: /opt/rt4/etc/RT_SiteConfig.pm
Set( $DatabasePort, ‘8081’ );

Now, I am trying to configure apache using following (/etc/apache2/vhosts.d/rt.conf):
<VirtualHost *:8081>
### Optional apache logs for RT
# Ensure that your log rotation scripts know about these files
ServerName my.server.name
ErrorLog /var/log/rt4/apache2.error
TransferLog /var/log/rt4/apache2.access
LogLevel debug

    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>

When I try to start apache, I get following error:

Starting httpd2 (prefork) Syntax OK
[Wed Oct 31 18:12:14 2012] [critical]: Undefined subroutine &main:: called.
END failed–call queue aborted. (/opt/rt4/sbin/…/lib/RT.pm:341)
Undefined subroutine &main:: called.
END failed–call queue aborted.

The command line was:
/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf failed

If I simply run the script (/opt/rt4/sbin/rt-server), RT works fine on port 8081

Have spent some time on google to resolve this error, but not getting anywhere.

Anyone has any ideas or have seen this before?

Thanks!

Note, we are running RT on port 8081, and see following in: /opt/rt4/etc/RT_SiteConfig.pm
Set( $DatabasePort, ‘8081’ );

Er, you mean WebPort, not DatabasePort, don’t you? DatabasePort is to tell RT where its database is listening, not where the web server is listening.

Regards,

Tim

The Wellcome Trust Sanger Institute is operated by Genome Research
Limited, a charity registered in England with number 1021457 and a
company registered in England with number 2742969, whose registered
office is 215 Euston Road, London, NW1 2BE.

Thanks Tim,
Was looking at it, copied and pasted it, but yet missed it :slight_smile:

But, that is strange. I had configured RT with the script: (/opt/rt4/sbin/rt-server)
So, that created the entry in RT_SiteConfig.pm

Today, I went ahead and completely removed /opt/rt4 directory and downloaded rt4.0.8 package and did the install.
Similarly, used the script to configure and initialize the DB (/opt/rt4/sbin/rt-server)
Now, RT_SiteConfig.pm is correct:
Set( $WebPort, ‘8081’ );
Set( $DatabaseType, ‘mysql’ );
Set( $DatabasePort, ‘’ );

After the DB was initialized, I am running this command (from docs/web_deployment.pod)
/opt/rt4/sbin/rt-server --server Starman --port 8081
This works fine, and I can access RT and use it.

However, if I try to use Apache mod_perl, I am getting same error:
Starting httpd2 (prefork) Syntax OK
[Wed Oct 31 18:12:14 2012] [critical]: Undefined subroutine &main:: called.
END failed–call queue aborted. (/opt/rt4/sbin/…/lib/RT.pm:341)
Undefined subroutine &main:: called.
END failed–call queue aborted.
The command line was:
/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf failed

Thanks!-----Original Message-----
From: Tim Cutts [mailto:tjrc@sanger.ac.uk]
Sent: Thursday, November 01, 2012 4:01 AM
To: Daksh Chauhan
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] RT4.0.7 apache config question

On 31 Oct 2012, at 18:32, Daksh Chauhan daksh@olemiss.edu wrote:

Note, we are running RT on port 8081, and see following in:
/opt/rt4/etc/RT_SiteConfig.pm Set( $DatabasePort, ‘8081’ );

Er, you mean WebPort, not DatabasePort, don’t you? DatabasePort is to tell RT where its database is listening, not where the web server is listening.

Regards,

Tim

The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.