The "I/O Error" was caused by the openldap server having a low "idle timeout" setting; when I attempted to reuse a connection, it had been timed-out.
--- Chris Masters <[EMAIL PROTECTED]> wrote: > OK, > > I tried your suggestion but now output (there it > must > be a ref?) > > I've narrowed this down to the way I was handling > connect. My eval statement wasn't detecting the > wrong > password I had set. > > Anyway, I RTFM and am now using 'if ($mesg->code)' > to > detect any additional error the eval statement does > not handle. > > My code now detects a timeout connection with a 'I/O > Error' and re-binds (after an unbind). > > Is the 'I/O Error' OK? > > Thanks, Chris > > > --- Graham Barr <[EMAIL PROTECTED]> wrote: > > On Nov 11, 2003, at 17:55, Chris Masters wrote: > > > I upgraded to 0.30 directly after you suggested. > > All > > > mails after your suggestion were refering to a > > 0.30 > > > version installation. > > > > Then please add the following directly after your > > call to search and > > before you try to call any methods on $mesg > > > > warn "'$mesg'" unless ref($mesg); > > > > Graham. > > > > > > > > > > > --- Graham Barr <[EMAIL PROTECTED]> wrote: > > >> Have you tried perl-ldap-0.30 as suggested in a > > >> previous mail ? > > >> > > >> Graham. > > >> > > >> On Nov 11, 2003, at 17:21, Chris Masters wrote: > > >> > > >>> Appologies. > > >>> > > >>> I was not unbinding before I attempted to > rebind > > >> after > > >>> I found the error. > > >>> > > >>> Does 'I/O Error' refer to the socket > connection > > >> being > > >>> closed by the server? > > >>> > > >>> > > >>> Note: forwarded message attached. > > >>> > > >>> > > >>> __________________________________ > > >>> Do you Yahoo!? > > >>> Protect your identity with Yahoo! Mail > > >> AddressGuard > > >>> http://antispam.yahoo.com/whatsnewfree > > >>> From: Chris Masters <[EMAIL PROTECTED]> > > >>> Date: November 11, 2003 16:54:16 GMT > > >>> To: [EMAIL PROTECTED] > > >>> Subject: Fwd: CAUSE: Can't call method X > without > > a > > >> package or object > > >>> > > >>> > > >>> Hi Again, > > >>> > > >>> I'm handling this error by using the code > below > > >> and to > > >>> catch an error and establish a new connection. > > The > > >>> problem is that the root error seems to be > 'I/O > > >> Error' > > >>> rather than a 'lost connection' error. I can't > > >> find > > >>> this in the Net::LDAP::Constant list. > > >>> > > >>> It seems to happen after the server > disconnects > > >> the > > >>> LDAP connection after inactivity. This is > fine, > > >> but > > >>> after I've made the reconnection, I get the > > error > > >> on > > >>> each query and it binds each time. > > >>> > > >>> sub simple_ldap_query_succeeds($) > > >>> { > > >>> my ($ldap) = @_; > > >>> my $version; > > >>> undef $mesg; > > >>> my $result = 0; > > >>> > > >>> eval > > >>> { > > >>> $result = 1; > > >>> $mesg = $ldap->search ( > > >>> base => > > >>> "ou=people,dc=domain,dc=com", > > >>> filter => > > >>> "(objectclass=testconnection)", > > >>> ); > > >>> > > >>> if($mesg->code) > > >>> { > > >>> > > >> md_syslog('err',"Reconnecting > > >>> LDAP: simple_ldap_query_succeeds failure: > $@"); > > >>> $result = 0; > > >>> } > > >>> }; > > >>> > > >>> if($@) > > >>> { > > >>> md_syslog('err',"Reconnecting > > >> LDAP: > > >>> simple_ldap_query_succeeds failure: $@"); > > >>> $result = 0; > > >>> } > > >>> return $result; > > >>> } > > >>> > > >>> Any ideas? > > >>> > > >>> TIA, Chris > > >>> > > >>> > > >>> > > >>> > > >>> Note: forwarded message attached. > > >>> > > >>> > > >>> __________________________________ > > >>> Do you Yahoo!? > > >>> Protect your identity with Yahoo! Mail > > >> AddressGuard > > >>> http://antispam.yahoo.com/whatsnewfree > > >>> From: Chris Masters <[EMAIL PROTECTED]> > > >>> Date: November 11, 2003 13:16:06 GMT > > >>> To: [EMAIL PROTECTED] > > >>> Subject: CAUSE: Can't call method X without a > > >> package or object > > >>> > > >>> > > >>> Hi Graham, > > >>> > > >>> Managed to get this before it failed: > > >>> > > >>> LDAP Error: Server encountered an internal > error > > >>> > > >>> Is this really server side? > > >>> > > >>> Thanks for any help on this, > > >>> > > >>> Chris > > >>> > > >>> __________________________________ > > >>> Do you Yahoo!? > > >>> Protect your identity with Yahoo! Mail > > >> AddressGuard > > >>> http://antispam.yahoo.com/whatsnewfree > > >>> > > >>> > > >>> > > >> > > > > > > > > > __________________________________ > > > Do you Yahoo!? > > > Protect your identity with Yahoo! Mail > > AddressGuard > > > http://antispam.yahoo.com/whatsnewfree > > > > > > > > __________________________________ > Do you Yahoo!? > Protect your identity with Yahoo! Mail AddressGuard > http://antispam.yahoo.com/whatsnewfree === message truncated === __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree
