[ic] Assistance Request

Simon Swegles simon at swegles.com
Thu Jan 12 22:15:54 EST 2006


Unfortunately, I do not know how to check for the current value of $bad.
It also shows up here:
    575         my $bad =  $DBI_connect_bad{$config->{dsn_id}};
and here:
    578         if (! $db or $bad ) {
    579 #::logDebug("bad=$bad connecting to $call[0]");
    580                 eval {
    581                         $db = DBI->connect( @call ) unless $bad;
    582                         $db->trace($Global::DataTrace, 
$Global::DebugFil
    583                                 if $Global::DataTrace and 
$Global::Debug
    584                 };
    585 #::logDebug("$config->{name}: DBI didn't die, bad=$bad");
    586                 if(! $db) {
    587                         $DBI_connect_bad{$config->{dsn_id}} = 1;
    588                         if($config->{ALTERNATE_DSN}[$alt_index]) {
    589                                 for(qw/DSN USER PASS/) {
    590                                         $config->{$_} = 
$config->{"ALTER
    591                                 }
    592                                 $alt_index++;
    593                                 undef $config->{dsn_id};
    594                                 redo DOCONNECT;
    595                         }
    596                         else {
    597                                 my $msg = $@ || $DBI::errstr;
    598                                 if(! $msg) {
    599                                         my($dname);
    600                                         (undef, $dname) = split 
/:+/, $c
    601                                         eval {
    602                                                 
DBI->install_driver($dna
    603                                         };
    604                                         $msg = $@ || 
$DBI::errstr || "un
    605                                 }
    606                                 die ::errmsg("table %s connect 
failed --
    607                         }
    608                 }

Is mine really an error state that has not been recorded previously?
It seems odd to me that it works totally fine as long as the user that 
started interchange is logged into SSH, but fails the DB connection as 
soon as that user is logged off.



Jeff Fearn wrote:

>On 1/13/06, Simon Swegles <simon at swegles.com> wrote:
>  
>
>>    580                 eval {
>>    581                         $db = DBI->connect( @call ) unless $bad;
>>    582                         $db->trace($Global::DataTrace,
>>$Global::DebugFil        e)
>>    583                                 if $Global::DataTrace and
>>$Global::Debug        File;
>>    584                 };
>>Not exactly the 'smoking gun' I was hoping for. :-)
>>
>>mysql.sock has been sim-linked in my tmp dir all along.
>>Thanks for the suggestion, though!
>>    
>>
>
>What value is $bad? If the db is not being touched then it's probably
>that $bad has been set.
>
>Jeff
>
>_______________________________________________
>interchange-users mailing list
>interchange-users at icdevgroup.org
>http://www.icdevgroup.org/mailman/listinfo/interchange-users
>
>
>
>  
>


More information about the interchange-users mailing list