From: Steve H. <ste...@ex...> - 2000-05-08 20:40:36
|
On Mon, May 08, 2000 at 09:27:54PM +0100, Graham Barr wrote: > On Mon, May 08, 2000 at 09:08:27PM +0100, Steve Haslam wrote: > > On Mon, May 08, 2000 at 07:49:24PM +0100, Graham Barr wrote: > > Hm, upon trying again, it did give me an entry but then > > blocked... According to truss it's blocking in recvfrom()... > > Well if the search is not complete and there are no entries in the queue > then it will block for the next entry. But the search *is* complete- in a test case it's returned the one entry it should and then blocked... Hm, I didn't check whether the server had logged it as being complete... OK, I'm doing: bash$ perl5.00503 -Iblib/lib -l -MData::Dumper -MNet::LDAP -MNet::LDAP::LDIF -e '$ldap = Net::LDAP->new(q[ldap0.london.excite.com], debug => 3); $ldap->bind; $sr = $ldap->search(filter => q[(uid=shaslam)], base => q[ou=people, o=excite, c=gb], attrs => [qw(cn)]); while ($entry = $sr->shift_entry) { print $entry->dn; }' and I get: Net::LDAP=HASH(0xc0a44) sending: 30 0C 02 01 01 60 07 02 01 02 04 00 80 00 __ __ 0....`........ Net::LDAP=HASH(0xc0a44) received: 30 0C 02 01 01 61 07 0A 01 00 04 00 04 00 __ __ 0....a........ Net::LDAP=HASH(0xc0a44) sending: 30 45 02 01 02 63 40 04 19 6F 75 3D 70 65 6F 70 0E...c@..ou=peop 6C 65 2C 20 6F 3D 65 78 63 69 74 65 2C 20 63 3D le, o=excite, c= 67 62 0A 01 02 0A 01 02 02 01 00 02 01 00 01 01 gb.............. 00 A3 0E 04 03 75 69 64 04 07 73 68 61 73 6C 61 .....uid..shasla 6D 30 04 04 02 63 6E __ __ __ __ __ __ __ __ __ m0...cn Net::LDAP=HASH(0xc0a44) received: 30 45 02 01 02 64 40 04 26 75 69 64 3D 73 68 61 0E...d@.&uid=sha 73 6C 61 6D 2C 20 6F 75 3D 50 65 6F 70 6C 65 2C slam, ou=People, 20 6F 3D 45 78 63 69 74 65 2C 20 63 3D 47 42 30 o=Excite, c=GB0 16 30 14 04 02 63 6E 31 0E 04 0C 53 74 65 76 65 .0...cn1...Steve 20 48 61 73 6C 61 6D __ __ __ __ __ __ __ __ __ Haslam Net::LDAP=HASH(0xc0a44) received: 30 0C 02 01 02 65 07 0A 01 00 04 00 04 00 __ __ 0....e........ uid=shaslam, ou=People, o=Excite, c=GB and it blocks, and the server log contains: May 8 21:35:48 vertex slapd[28859]: conn=789 fd=7 connection from box.london.excite.com (194.216.238.12) accepted. May 8 21:35:48 vertex slapd[9067]: conn=789 op=0 BIND dn="" method=128 May 8 21:35:48 vertex slapd[9067]: conn=789 op=0 RESULT err=0 tag=97 nentries=0 May 8 21:35:48 vertex slapd[9068]: conn=789 op=1 SRCH base="OU=PEOPLE,O=EXCITE,C=GB" scope=2 filter="(uid=SHASLAM)" May 8 21:35:48 vertex slapd[9068]: conn=789 op=1 RESULT err=0 tag=101 nentries=1 I hit C-c and it logs: May 8 21:36:09 vertex slapd[28859]: conn=789 op=-1 fd=7 closed errno=0 > > Also, sometimes I get the "$ldap received:" message and then no hex > > dump. Particularly if I'm requesting a large value (jpegPhoto > > attributes for instance). > > Hm, does this happen if you changed to using asn_read ? If I change asn_recv to asn_read then it hangs before printing that "$ldap received:" message. SRH -- Steve Haslam, Production Engineer, Excite UK ste...@ex... father, we're so close to death, you told us this time would come we were full of scorn, now we see the wrong deeds bloom you told us that we were wrong |