[rt-users] Upgraded from 3.6.5 to 4.0.17, and mailgate has lost its way

Beachey, Kendric Kendric.Beachey at garmin.com
Tue Oct 1 14:54:16 EDT 2013


Someone asked about my RT_SiteConfig, so here it is.  (with passwords ******ed out)
--
Kendric


-----Original Message-----
From: rt-users-bounces at lists.bestpractical.com [mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Beachey, Kendric
Sent: Tuesday, October 01, 2013 11:04 AM
To: rt-users at lists.bestpractical.com
Subject: Re: [rt-users] Upgraded from 3.6.5 to 4.0.17, and mailgate has lost its way

More investigation...it looks like maybe what's wrong here is that the REST interface is not set up correctly somehow.

1) https://rt.abc.com/rt/ => our RT instance

2) rt.abc.com itself hitting http://localhost/rt//REST/1.0/NoAuth/mail-gateway (that is, piping email into the rt-mailgate command via /etc/aliases) gives an HTTP 404 error, and apache error.log says:

[Tue Oct 01 15:40:28 2013] [error] [client 127.0.0.1] File does not exist: /opt/rt4/share/html/rt

3) rt.abc.com hitting http://localhost/REST/1.0/NoAuth/mail-gateway gives HTTP 200 OK

Does the REST interface not understand it's supposed to live under /rt?

On the other hand...

4) when I hit https://rt.abc.com/rt/REST/1.0/NoAuth/mail-gateway from another machine (with my web browser, and note this is using /rt), the browser shows:

temporary failure - RT couldn't find the queue: 1

and the apache error.log shows:

[Tue Oct  1 15:45:40 2013] [warning]: Use of uninitialized value in print at /opt/rt4/sbin/../lib/RT/EmailParser.pm line 121. (/opt/rt4/sbin/../lib/RT/EmailParser.pm:121)
[Tue Oct  1 15:45:40 2013] [warning]: Use of uninitialized value in scalar chomp at /opt/rt4/sbin/../lib/RT/Interface/Email.pm line 1484. (/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1484)
[Tue Oct  1 15:45:40 2013] [error]: Could not record email: RT couldn't find the queue: 1 (/opt/rt4/share/html/REST/1.0/NoAuth/mail-gateway:75)


5) When I hit https://rt.garmin.com/REST/1.0/NoAuth/mail-gateway with my web browser (note that I'm NOT using /rt), it shows source code in the browser.


Here is the apache config that sets up RT for us...we've got some stuff in there that is supposed to force things to https except from localhost (is that bad?):

<VirtualHost *:80>
        DocumentRoot "/opt/rt4/share/html"
        RewriteEngine On
        RewriteCond %{REMOTE_ADDR} !^127\..*
        RewriteRule ^/rt/(.)* https://%{HTTP_HOST}/rt/$1 [L,R=301]
        RewriteCond %{REMOTE_ADDR} !^127\..*
        RewriteRule .* https://%{HTTP_HOST}/rt/ [L,R=301] </VirtualHost> <VirtualHost *:443>
        <IfModule mod_ssl.c>
          SSLEngine On
          SSLCertificateFile /etc/apache2/ssl/server.crt
          SSLCertificateKeyFile /etc/apache2/ssl/server.key
          SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
        </IfModule>
        DocumentRoot "/opt/rt4/share/html"
        ServerName rt.abc.com
        RewriteEngine On
        RewriteRule ^/$ /rt/ [L,R=301]

        ### Optional apache logs for RT
        # ErrorLog /opt/rt4/var/log/apache2.error
        # TransferLog /opt/rt4/var/log/apache2.access
        # LogLevel debug

        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
        </Location>
        <Perl>
                use Plack::Handler::Apache2;
                Plack::Handler::Apache2->preload("/opt/rt4/sbin/rt-server");
        </Perl>
</VirtualHost>


If any other configuration files would help shed light on this, I can send them along too.
--
Kendric Beachey




-----Original Message-----
From: rt-users-bounces at lists.bestpractical.com [mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Beachey, Kendric
Sent: Saturday, September 28, 2013 11:07 PM
To: rt-users at lists.bestpractical.com
Subject: [rt-users] Upgraded from 3.6.5 to 4.0.17, and mailgate has lost its way

I upgraded from 3.6.5 to 4.0.17 today.  The 3.6.5 had been installed the Ubuntu way (meaning, /etc/request-tracker3.6, /usr/local/share/request-tracker3.6 and so forth, and perl modules installed one by one via apt-get), but the 4.0.17 has been installed the tarball-and-CPAN way (meaning /opt/rt4 for everything except the apache config).  The database schema updates were a real blast...  ;-)

I've got the web interface coming up and working great.  I can create tickets through it, and thanks to RT::Authen::ExternalAuth, I can authenticate against our AD server, just like before.

The one thing that hasn't come back to life is email.  If I send an email in, or if RT wants to send an email out to a watcher, I get errors like this coming out of rt-mailgate:


/opt/rt4/bin/rt-mailgate: temp file is '/tmp/8gwnmwSHM5/3i1mLgbHBF'
/opt/rt4/bin/rt-mailgate: connecting to http://localhost/rt//REST/1.0/NoAuth/mail-gateway
An Error Occurred
=================

404 Not Found

/opt/rt4/bin/rt-mailgate: undefined server error


I googled around and the closest things I found were people having problems with their SSL certificates, but that's not what I'm getting here.  It's a plain old 404, like it can't find the REST service at all.  When I try going to http://localhost/rt//REST/1.0/NoAuth/mail-gateway myself (changing the localhost to point to the RT server), it thinks for a minute, ends up at https://rt.company.com/rt/y and gives a (rather nice looking) 404 page.

Have I goofed up my apache config somehow?  If it helps, I can send that along, or /etc/aliases, or RT_SiteConfig.pm, or anything else that would help pin this down.

Thanks much!
--
Kendric Beachey


________________________________

CONFIDENTIALITY NOTICE: This email and any attachments are for the sole use of the intended recipient(s) and contain information that may be confidential and/or legally privileged. If you have received this email in error, please notify the sender by reply email and delete the message. Any disclosure, copying, distribution or use of this communication (including attachments) by someone other than the intended recipient is prohibited. Thank you.


--
RT Training in New York, October 8th and 9th: http://bestpractical.com/training



-- 
RT Training in New York, October 8th and 9th: http://bestpractical.com/training

-------------- next part --------------
A non-text attachment was scrubbed...
Name: RT_SiteConfig.pm
Type: application/octet-stream
Size: 17670 bytes
Desc: RT_SiteConfig.pm
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20131001/93ebe805/attachment.obj>


More information about the rt-users mailing list