Why the fuck do we receive such PDU ???
0x30 0x48
0x02 0x01 0x06
0x42 0x00 <--- This is an Unbind request
0xA0 0x41 <-- This is a bloody PagedSearchControl, wtf is it doing
here ???
0x30 0x24
0x04 0x16
0x31 0x2E 0x32 0x2E 0x38 0x34 0x30 0x2E
0x31 0x31 0x33 0x35 0x35 0x36 0x2E 0x31
0x2E 0x34 0x2E 0x33 0x31 0x39
0x04 0x0A
0x30 0x08
0x02 0x01 0x03
0x04 0x03
0x02 0x00 0x00
0x30 0x19
0x04 0x17
0x32 0x2E 0x31 0x36 0x2E 0x38 0x34 0x30
0x2E 0x31 0x2E 0x31 0x31 0x33 0x37 0x33
0x30 0x2E 0x33 0x2E 0x34 0x2E 0x32
It seems that JNDI does not know how to correctly send an Unbind request...
Also I've dumped the received PDU and when we are hit by the problem (ie
LdapError 53 : bad cookie received), it shodws that we don't receive the
UnbindRequest fast enough, thus we get a BindRequest immediately
followed by a SearchRequest containing a cookie which is not reset. As
the LdapSession has been reset by the new Bind, the transmitted cookie
is obviously not present in this session, and we get the error we are
facing.
So far, it's absolutely normal, and I really suspect that this is a JNDI
problem. I have added an explicitely context close(), with no help.
My last test was to add a 10 ms wait after the ctx.close() in the
doLoop() method and it seems to be efficient.
I will try with the Ldap API to see if we are havig the same problem.
On 5/17/10 9:27 AM, Felix Knecht wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Good catch Emmanuel.
Maybe this [1] could be a reason (just from far away without any deeper
knowledge).
[1]
http://people.apache.org/~felixk/apacheds-docs/apacheds-protocol-ldap/findbugs.html#org.apache.directory.server.ldap.handlers.controls.PagedSearchContext
I still have random issues at this point, but less frequently. What
happens is that we receive a searchRequest with a cookie, just after the
previous request has been completed. I have no idea why. If I add a
Thread.sleep(10) in the doLoop() method of the test, I'm able to run
10000 times the paged search ( this is 40 000 paged search requests...).
I will try tomorrow the same test but using our API instead of JNDI.
Will keep you informed.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkvw7/UACgkQ2lZVCB08qHFCLwCg4yTi8jF4HO+8wfVQKPet+dvg
VFgAoKlZvIZ9ozf/2wlKi1DRENEQwm9C
=2PAe
-----END PGP SIGNATURE-----
--
Regards,
Cordialement,
Emmanuel Lécharny
www.nextury.com