[rt-users] RT not connecting to database?
Mike Friedman
mikef at ack.berkeley.edu
Wed Jul 25 22:28:02 EDT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wed, 25 Jul 2007 at 14:10 (-0700), John Oliver wrote:
>> The database is on a separate host. It can be accessed with mysqladmin
>> from the host running RT, so there isn't a firewall or anything.
>>
>>>> When I hit my RT install in a browser, I get an Internet Server
>>>> Error. The error_log says:
>>>>
>>>> DBI connect('dbname=rt3;host=10.12.14.149','rt_user',...) failed: Can't
>>>> connect to MySQL server on '10.12.14.149' (13) at
>>>> /usr/lib/perl5/vendor_perl/5.8.8/DBIx/SearchBuilder/Handle.pm line 106
>>>> Connect Failed Can't connect to MySQL server on '10.12.14.149' (13)
>>>> at /usr/lib/perl5/vendor_perl/5.8.8/RT.pm line 205
>>>> [Mon Jul 23 13:20:52 2007] [warn] (104)Connection reset by peer:
>>>> mod_fcgid: read data from fastcgi server error.
>>>> [Mon Jul 23 13:20:52 2007] [error] [client 192.168.2.231] Premature end
>>>> of script headers: mason_handler.fcgi
>>>
>>> I can run mason_handler.fcgi from the command line and get results,
>>> so... some issue with the Apache configuration?
>
> I'm still having this problem.
>
> I configured Apache to use mod_perl instead of fcgid and I get the same
> results.
>
> The databaase is accessible, but RT won't access it. I'm stumped. Could
> this be an issue with perl-DBI? Or something else?
John,
I think I missed the earliest parts of this discussion, so let me just
ask: are you using SSL to connect to your remote MySQL database?
I do and my experience has been that out of the box RT doesn't provide a
way to tell DBD::MySQL (used by DBI) where to find the SSL certificates.
That information is normally pointed to in the MySQL client 'my.cnf' file
and the location of that file must be specified in the database connect(),
or as a separate DBI statement. This takes place in the RT::Handle
module.
[The 'mysql' command line client knows how to find the my.cnf file, or can
be told how, via an environment variable. But perl's DBD::MySQL requires
this information to be coded explicitly].
So, I wrote a small customization mod to RT::Handle that allows you to
specify the location of 'my.cnf' as a variable in RT_SiteConfig.pm. This
has been working for me for a couple of months now. I'm running RT 3.6.3.
On the other hand, if you're not requiring SSL for your database
connection, the above is not relevant to your problem.
Mike
_________________________________________________________________________
Mike Friedman Information Services & Technology
mikef at ack.Berkeley.EDU 2484 Shattuck Avenue
1-510-642-1410 University of California at Berkeley
http://socrates.berkeley.edu/~mikef http://ist.berkeley.edu
_________________________________________________________________________
-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8
iQA/AwUBRqgGta0bf1iNr4mCEQI9tQCgj9Qi00lX8BJwuDghLxf/BaQ6U9AAnjto
Dv1z6ZWRM0NBbXexiaolRO5G
=5xmP
-----END PGP SIGNATURE-----
More information about the rt-users
mailing list