Date: | Tue, 6 May 2003 16:52:48 +0100 |
From: | Graham Barr <gbarr [...] pobox.com> |
To: | bug-Convert-ASN1 [...] rt.cpan.org |
Subject: | [Fwd] System apparently hangs during $ldap->bind(); |
----- Forwarded message from Daniel Cutter <dcutter@snafu.de> -----
Date: Fri, 11 Apr 2003 17:37:30 +0200
To: perl-ldap-dev@lists.sourceforge.net
From: Daniel Cutter <dcutter@snafu.de>
Subject: System apparently hangs during $ldap->bind();
I'm trying to do a simple connect to a our new ldap server at work.
It's the right server, right port, ldap is running, gq can access the
data with the same dn, but when I connect bind gets an anwser and then
apparently the script hangs.
I'm using Net::LDAP 0.2701 on Win NT 4.0 with Activestate Perl 5.6.0
(build 613) LDAP server is an HPUX11 with OpenLDAP 2.1.3.
debug=3 delivers this:
Net::LDAP=HASH(0x98b082c) sending:
30 1C 02 01 01 40 17 02 01 02 04 0A 63 6E 3D 6D 0....@......cn=m
61 6E 61 67 65 72 80 06 ** ** ** ** ** ** __ __ anager..******
Net::LDAP=HASH(0x98b082c) received:
30 38 02 01 00 78 33 0A 01 02 04 00 04 14 75 6E 08...x3.......un
6B 6E 6F 77 6E 20 4C 44 41 50 20 72 65 71 75 65 known LDAP reque
73 74 8A 16 31 2E 33 2E 36 2E 31 2E 34 2E 31 2E st..1.3.6.1.4.1.
31 34 36 36 2E 32 30 30 33 36 __ __ __ __ __ __ 1466.20036
Unexpected PDU, ignored
This is the point where the system seams to hang.
What is going wrong? Any hints would be very helpfull.
Daniel Cutter
print chr--$g+ord for'KWVX%GUW]RP^-^Tb]2[UXa\j#'=~m$.$g;
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
for complex code. Debugging C/C++ programs can leave you feeling lost and
disoriented. TotalView can help you find your way. Available on major UNIX
and Linux platforms. Try it free. www.etnus.com
Show quoted text
----- End forwarded message -----
----- Forwarded message from Chris Ridd <chrisridd@mac.com> -----
Date: Fri, 11 Apr 2003 17:53:01 +0100
To: Daniel Cutter <dcutter@snafu.de>,
<perl-ldap-dev@lists.sourceforge.net>
From: Chris Ridd <chrisridd@mac.com>
Subject: Re: System apparently hangs during $ldap->bind();
On 11/4/03 4:37 pm, Daniel Cutter <dcutter@snafu.de> wrote:
> I'm trying to do a simple connect to a our new ldap server at work.
>
> It's the right server, right port, ldap is running, gq can access the
> data with the same dn, but when I connect bind gets an anwser and then
> apparently the script hangs.
>
> I'm using Net::LDAP 0.2701 on Win NT 4.0 with Activestate Perl 5.6.0
> (build 613) LDAP server is an HPUX11 with OpenLDAP 2.1.3.
>
> debug=3 delivers this:
>
> Net::LDAP=HASH(0x98b082c) sending:
>
> 30 1C 02 01 01 40 17 02 01 02 04 0A 63 6E 3D 6D 0....@......cn=m
> 61 6E 61 67 65 72 80 06 ** ** ** ** ** ** __ __ anager..******
That's an illegally encoded bind operation. I think Convert::ASN1's failing
to set the constructed bit for the "[APPLICATION 0]" element. (The sixth
byte should be 60, not 40.)
> Net::LDAP=HASH(0x98b082c) received:
>
> 30 38 02 01 00 78 33 0A 01 02 04 00 04 14 75 6E 08...x3.......un
> 6B 6E 6F 77 6E 20 4C 44 41 50 20 72 65 71 75 65 known LDAP reque
> 73 74 8A 16 31 2E 33 2E 36 2E 31 2E 34 2E 31 2E st..1.3.6.1.4.1.
> 31 34 36 36 2E 32 30 30 33 36 __ __ __ __ __ __ 1466.20036
That's an LDAPv3 "notice of disconnection" message with a result code of
operationsError. Servers send those messages if the client's sending them
crud (like bad protocol), though there's actually a different result code
for protocolError.
> Unexpected PDU, ignored
That's Net::LDAP not being able to cope with the notice of disconnection!
>
> This is the point where the system seams to hang.
Yup, the server's probably closed the socket and your packets are bouncing
around the LAN until TCP times out (5 minutes IIRC).
>
> What is going wrong? Any hints would be very helpfull.
Looks like a Convert::ASN1 bug. This has a problem on perl 5.8 systems when
the default locale is utf8, so I wonder if this is the same problem? I don't
know how you'd test (or change!) that in ActiveState Perl + Windows.
>
>
> Daniel Cutter
>
> print chr--$g+ord for'KWVX%GUW]RP^-^Tb]2[UXa\j#'=~m$.$g;
Cheers,
Chris
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
for complex code. Debugging C/C++ programs can leave you feeling lost and
disoriented. TotalView can help you find your way. Available on major UNIX
and Linux platforms. Try it free. www.etnus.com
----- End forwarded message -----