[rt-users] Problem running RT 3.2.1 with Apache 2.x & FastCGI

Gonzalo Servat gonzalo at linuxaus.com
Sun Jul 18 03:49:47 EDT 2004


Hi yet again :)

Responding to my post one more time. It seems like the problem is that
the PostgreSQL schema has the sessions table defined like so:

CREATE TABLE sessions (
    id char(32) NOT NULL,
    a_session bytea,
    LastUpdated TIMESTAMP not null default current_timestamp,
    PRIMARY KEY (id)

);

As you can see by the error in my previous email, it had an error
writing to some table (I'm guessing the sessions table) as the
"LastUpdated" value was blank. Looking at this schema file the
LastUpdated column says NOT NULL.
On the mysql schema, the sessions table is defined as:

CREATE TABLE sessions (
    id char(32) NOT NULL,
    a_session LONGTEXT,
    LastUpdated TIMESTAMP,
    PRIMARY KEY (id)
);

As you can see LastUpdated is not set to "NOT NULL". What I'm wondering
is whether the "default current_timestamp" in the Pg schema makes it
auto-insert the current timestamp? In which case it shouldn't have spat
out the error in my previous email.

Anyway, I'm now connecting to my RT3 MySQL 3.x database and it works
now, so it's definately something DB related. I'd like to use Pg instead
of mysql, simply because RT3 docs all recommend using MySQL 4.x and I
rather not upgrade if I can get away with using PostgreSQL.

I'd really appreciate some help on this one. I've come a long way to get
RT installed with Apache2, FastCGI + custom Perl compile after ironing
out a million and one problems so if I can just iron out this last one,
I should have a working RT3 instance :)

Regards,
Gonzalo


On Sun, 2004-07-18 at 14:28 +1000, Gonzalo Servat wrote:
> Hi again,
> 
> Just wanted to add that for some reason, /var/log/httpd/error_log showed
> the real problem after a while which was that there was no entry in
> pg_hba.conf for 127.0.0.1 and the RT user. Anyway, after adding the
> appropriate entry, I'm getting somewhere! The new problem is:
> 
>                               System error
> 
> error: 
> RT Couldn't write to session
> directory '/path/to/rt3/var/
> session_data': DBD::Pg::st execute
> failed: ERROR: ExecInsert: Fail to
> add null value in not null attribute
> lastupdated at /usr/local/lib/perl5/
> site_perl/5.8.4/Apache/Session/
> Store/DBI.pm line 44.
> 
> Stack:
> [/usr/local/lib/perl5/
> site_perl/5.8.4/Apache/Session/
> Store/DBI.pm:44]
> [/usr/local/lib/perl5/
> site_perl/5.8.4/Apache/Session.
> pm:530]
> [/usr/local/lib/perl5/
> site_perl/5.8.4/Apache/Session.
> pm:477]
> [/usr/local/lib/perl5/
> site_perl/5.8.4/Apache/Session/
> Store/DBI.pm:44]
> [/path/to/rt3/share/html/
> autohandler:57]
> . Check that this dir ectory's
> permissions are correct. at /path/
> to/rt3/share/html/Elements/
> SetupSessionCookie line 67.
> 
> I don't think the problem is the session directory as Apache has full
> write permissions to it. For some reason it's trying to insert a null
> value into a field that doesn't allow null values (???).
> 
> Any ideas??
> 
> Thanks in advance.
> 
> Regards,
> Gonzalo
> 
> On Sat, 2004-07-17 at 23:47 +1000, Gonzalo Servat wrote:
> > Hi All,
> > 
> > Just upgrading from RT 3.0 on Apache 1.x, mod_perl & MySQL to RT 3.2.1
> > on Apache 2.x, FastCGI & PostgreSQL (quite an upgrade, huh?). I had
> > reasons for switching to PostgreSQL. The server is running PostgreSQL
> > 7.3.x and MySQL 3.x. RT requires MySQL 4.x (or later) or PostgreSQL 7.2
> > (or later). It seemed like a much bigger job to upgrade MySQL (just
> > incase anything else broke) to 4.x than to just convert the RT database
> > to PostgreSQL, so I did that.
> > 
> > I did run the upgrade scripts in etc/upgrade following the RT install.
> > 
> > After fulfilling all the Perl module requirements, and installing
> > FastCGI, I'm ready to test RT. The virtualhost stanza looks like this:
> > 
> > <VirtualHost xxx.xxx.xxx.xxx:80>
> >         ServerName support.domain.com
> >         DocumentRoot /path/to/rt3/share/html
> >         AddHandler fastcgi-script fcgi
> >         Alias /NoAuth/images/ /path/to/rt3/share/html/NoAuth/images/
> >         ScriptAlias / /path/to/rt3/bin/mason_handler.fcgi/
> >         <Location />
> >                 AddDefaultCharset UTF-8
> >                 SetHandler fastcgi-script
> >         </Location>
> > </VirtualHost>
> > 
> > .. and the FastCGI settings in httpd.conf are:
> > 
> > LoadModule fastcgi_module modules/mod_fastcgi.so
> > FastCgiIpcDir /tmp
> > FastCgiServer /path/to/rt3/bin/mason_handler.fcgi
> > 
> > Anyway, the bottom line is in the Apache logs I'm getting the following
> > error when trying to access support.domain.com:
> > 
> > [Sat Jul 17 23:43:59 2004] [error] [client 209.50.252.138] FastCGI: comm
> > with server "/path/to/rt3/bin/mason_handler.fcgi" aborted: idle timeout
> > (30 sec)
> > [Sat Jul 17 23:43:59 2004] [error] [client 209.50.252.138] FastCGI:
> > incomplete headers (0 bytes) received from server "/path/to/rt3/bin/
> > mason_handler.fcgi"
> > 
> > .. and on the browser just repots back an Internal Server Error.
> > 
> > I did some google'ing, and found I gotta switch the first line of mason.
> > fcgi to suidperl, which I did, but it didn't help (restarted Apache
> > too). The only other match I got from google was somebody having the
> > same issue on MacOSX, but Linux supports setuid perl so it's not the
> > same scenario.
> > 
> > Any help would be greatly appreciated.
> > 
> > Regards,
> > Gonzalo
> > 
> > _______________________________________________
> > http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> > 
> > Be sure to check out the RT wiki at http://wiki.bestpractical.com
> 
> 
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> 
> Be sure to check out the RT wiki at http://wiki.bestpractical.com




More information about the rt-users mailing list