[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl-ldap-dev
Subject:    Net::LDAP bind hangs ignoring timeout parameter
From:       63.251.223.186
Date:       2008-12-31 15:16:26
Message-ID: 4ba61d2d-8a57-4a65-aad8-d7dfa6424611 () 40g2000prx ! googlegroups ! com
[Download RAW message or body]

From Solaris 5.8, running Perl 5.10.0, I make a Net::LDAP (version
0.34) connection to Microsoft Exchange 5.5 on NT4.  Unfortunately port
389 on the Exchange/NT server has already been grabbed by the
Microsoft LDAP Service (which the NT administrator forgot to
disable).  So my Net::LDAP bind (synchronous) attempt hangs.

The Net::LDAP documentation tells me I can set the parameter:
    timeout => N
on the new method.  Is this a number of seconds or of minutes?

But this timeout seems to be ignored by the subsequent
IO::Socket::INET library.  This is described in bug report
"IO::Socket::INET Timeout no longer works" at:
    http://rt.cpan.org/Public/Bug/Displ;ay.html?id=38731

How can I timeout on an LDAP bind, in order to quickly recover from
this failure of binding to the wrong service on port 389, and other
errors?  I'd like to quickly detect the error, and advise the user on
possible faults in their NT4 server services and LDAP configuration.

My current versions of modules, and the latest now on CPAN are:

IO:                     1.2301      1.2301
Convert::ASN1:   0.21          0.22
Net::LDAP:        0.34           0.38

all installed on Perl 5.10.0 on Solaris 5.8.

Thank-you and regards,
Clyde

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic