$DBI::errstr == (no error string)
- From: aturner@xxxxxxxxxxxxxx (Aaron Turner)
- Date: Fri, 23 Dec 2005 11:19:30 -0800
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
I'm going quickly insane trying to debug this...
Long story short: DBI 1.50 DBD::Pg 1.43 Perl 5.8.5 mod_perl 2.0.2 Class::DBI 3.0.1 Apache::DBI 0.9901
Basic problem is that I can't connect to my PG database from inside Apache from my Linux box (running Apache 2.0.52/prefork) but I can from my OS X box (Apache 2.2.0/prefork). Using the same DBI abstraction layer and options (user, password, etc), I can connect from standalone perl scripts on both boxes just fine. The relevant parts of the trace from the failed connection attempt is:
DBI connect('database=******;host=******;port=5432','muuser',...) failed: (no error string) at /var/www/html/mulder/lib/Mu/DBI.pm line 63
Trace begun at /usr/lib/perl5/site_perl/5.8.5/HTML/Mason/ Exceptions.pm line 129
HTML::Mason::Exceptions::rethrow_exception('DBI connect (\'database=*****;host=******;port=5432\',\'muuser\',...) failed: (no error string) at /var/www/html/mulder/lib/Mu/DBI.pm line 63^J') called at /usr/lib/perl5/5.8.5/Carp.pm line 201
Carp::croak('DBI connect(\'database=*****;host=******;port=5432\', \'muuser\',...) failed: (no error string)') called at /usr/lib/perl5/ site_perl/5.8.5/i386-linux-thread-multi/DBI.pm line 629
DBI::__ANON__(undef, undef) called at /usr/lib/perl5/site_perl/5.8.5/ i386-linux-thread-multi/DBI.pm line 681
DBI::connect('DBI', 'dbi:Pg:database=*****;host=******;port=5432', 'muuser', '*****', 'HASH(0x97c4398)') called at /var/www/html/mulder/ lib/Mu/DBI.pm line 63
Mu::DBI::connect('Mu::DBI', 'singlepid', 1) called at /var/www/html/ mulder/www/syshandler line 8
Looking at pcap's and my PG log files (debug level 5) it seems that I connect and authenticate just fine, but then the connection just shuts down.
Other then upgrading my Apache to 2.2.0 (which seems a bit overkill and a PITA due to all the extra modules I'm using) how can I debug this to figure out why DBI is barfing?
The actual connect statement is: my %dbh;
$dbh{'singlepid'} = DBI->connect(Mu::DBI->dsn, Mu::Config->DBUSER,
Mu::Config->DBPASS, { PrintError => 1, RaiseError => 1, AutoCommit => 0,
FetchHashKeyName => 'NAME_lc', ShowErrorStatement => 1,
ChopBlanks => 1, Taint => 1, RootClass => 'DBIx::ConextualFetch'}) or
croak("Can't connect to DB: $DBI::errstr");
Thanks, Aaron
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (Darwin)
iD8DBQFDrE3DklVhPAXg8nARAjUKAJ9ZhUFr/gEHeGD0lEDE6UvSYbLsegCfYLg5 HC2zIxXRo36Kfg3C1EswMMY= =NqpO -----END PGP SIGNATURE----- .
- Follow-Ups:
- Re: $DBI::errstr == (no error string)
- From: Tim Bunce
- Re: $DBI::errstr == (no error string)
- Prev by Date: Re: oracle OCI.dll NLS error on connect
- Next by Date: Re: $DBI::errstr == (no error string)
- Previous by thread: auto repair script for mysql
- Next by thread: Re: $DBI::errstr == (no error string)
- Index(es):
Relevant Pages
|
|