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--- Begin Message ---
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
--- End Message ---