[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: MessageID integer problem

Title: RE: MessageID integer problem

Hi Pierangelo,

OK. I have some extra details:

The client that gives me the problem is 2.0.27. It is running from Linux. Unfortunately I did not get the version or build, but they are several different ones ( I experience it from all the parties I communicate with, they have different Linux versions all running on Intell).

My server is running on Win2K server, service pack 4, running on a DLC 360 with latest networkdrivers. It also happens on my workstation, Win2K, service pack 3.

I wrote my own BER encodig/decoding. The server application is written in VB.NET, so cycling the libber routines was not an option. An LDAP request would typically start with a tag (hex 30 ) indicating the start of the message and the lenght of the message. Next it would contain the message ID followed by whatever is requested,(search, add, modify, delete, whatever).

What my routine does is quit simple. Let's take the correct working number:

02 <- Tag for integer (Message ID)
02 <- Length, in this case 2, so the next two bytes are the lenght:
80 <- 128 * 256 = 32,768
00 <- 0

So the ID number is 32,768. What I am getting right after message ID 32,767 is :

02 <- Tag again
03 <- Length is in next three bytes
00 <- 0
80 <- 128 * 256 = 32,768
ff <- 255

Thus I calculate 33,023 Which is what I return. Then everythings halts. As stated before I guess the client is expecting something else. On windows it runs OK. I tried emulating this behaviour on the windows by on purpose sending a wrong ID back and indeed that causes the LDAP modify to hang. I use ldapmodify version 2.0.25, build with MS VC++ 6.

Since I have never heard of any problem updating the OpenLDAP server with large numbers of messages my guess is I am overlooking something in my server. But what ?

Thanks for our effort so far.


-----Original Message-----
From: Pierangelo Masarati [mailto:ando@sys-net.it]
Sent: maandag 11 april 2005 16:22
To: Bos, Jeroen
Cc: 'openldap-software@OpenLDAP.org'
Subject: Re: MessageID integer problem

> Hi Everyone,
> I have a question on the Open LDAP client (ldapmodify). I have run into a
> problem. I have written a small server application in .NET that 'talks'
> LDAP. I use the openldap utilities to send data to this server
> application.
> Everything seems to work fine until I reach message ID (in LDAP message
> header) 32.768 (yes, I know, no cooincidence here). Message ID 32.767 gets
> sent as 02 02 7f ff. On my windows machine the OpenLdap software sends me
> 02
> 03 00 80 00 for the next message ID where the 00 80 00 is the actual
> message
> ID number. This is what I would expect. On Windows all seems to work OK.
> When I have a client on an Unix machine I get 02 03 00 80 ff. This
> calculates into 33.023. It looks like the wrong bytes get updated. I
> return
> the exact same message ID in my modify result, but this causes the client
> to
> hang. My guess is it is expecting a different number. I have tried sending
> back the correct number in this case (or at least what I believe to be
> correct), 02 03 00 80 00. This however does not solve the problem.
> I am somewhat stuck.
> Does anyone have any suggestions for me? What am I missing here?
> Any help would be very much appreciated.

Your problem sounds quite interesting; unfortunately your report is
absolutely vague, since you don't specify the type and the version of the
various pieces of software  you're using: what client (ok, ldapmodify),
what client version, what server (ok, you made it; did you write the BER
encoding/decoding, or did you recycle those from OpenLDAP's liblber?  In
case, what version?), what OS (you say Windows and Unix, it's like saying
Fiat and Renault) what OS version.

Can you be more precise?


Pierangelo Masarati

    SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497