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

ADD Succeeds, but I can't find the entry?



Hello,

Well, another problem crept up (Of course).  And this is really strange
behavior.

I have a CGI/Perl based application that allows users to register on our web
site.  The registration information goes, you guessed it, into an LDAP
Directory, now running OpenLDAP 2.0.11 ...

I'm running in to a very strange problem though:

The application adds an entry to the directory, seemingly successfully ...
But then, I can't find it!

Here's the log for the addition of the entry:

Aug  2 10:07:47 grumbler slapd[16937]: daemon: conn=3 fd=9 connection from
IP=132.156.10.123:2641 (IP=0.0.0.0:31746) accepted. 
Aug  2 10:07:47 grumbler slapd[16953]: conn=3 op=0 BIND
dn="CN=URDS,OU=CLIENTS,O=CGDI" method=128 
Aug  2 10:07:47 grumbler slapd[16953]: conn=3 op=0 RESULT tag=97 err=0 text=

Aug  2 10:07:47 grumbler slapd[16953]: conn=3 op=1 SRCH
base="cn=Atlas,ou=Clients,o=CGDI" scope=0 filter="(objectClass=*)" 
Aug  2 10:07:47 grumbler slapd[16953]: conn=3 op=1 SEARCH RESULT tag=101
err=0 text= 
Aug  2 10:07:47 grumbler slapd[16953]: conn=3 op=2 SRCH
base="ou=Users,o=CGDI" scope=2 filter="(&(objectClass=cgdiuser)(uid=JBloe))"

Aug  2 10:07:47 grumbler slapd[16953]: conn=3 op=2 SEARCH RESULT tag=101
err=0 text= 
Aug  2 10:07:47 grumbler slapd[16953]: conn=3 op=3 ADD
dn="UID=JBLOE,OC=OTHER,C=CA,OU=USERS,O=CGDI" 
Aug  2 10:07:47 grumbler slapd[16953]: conn=3 op=3 RESULT tag=105 err=0
text= 
Aug  2 10:08:02 grumbler slapd[16953]: conn=3 op=4 UNBIND 
Aug  2 10:08:02 grumbler slapd[16953]: conn=-1 fd=9 closed 

As you can see there's no error returned.

But if I use ldapsearch to try and see the entry, no such luck.  Not to
mention the application itself can't see it either, 2 seconds after having
seemingly successfully added it! (This is a problem because the registration
process needs to lookk at the entry right after it was inserted, but is
failing because it can't find it).

Even stranger, if I try to re-register the exact same person with the same
uid, 2 things happen:

1) I am given the same uid (The system generates one based on first/last
name), meaning it couldn't find a uid allready existing, which makes sense.
2) BUT, whenit comes time ot insert the entry, I get an error 68, meaning
the entry allready exists!!! Lookie here:

Aug  2 10:11:50 grumbler slapd[17019]: daemon: conn=6 fd=9 connection from
IP=132.156.10.123:2651 (IP=0.0.0.0:31746) accepted. 
Aug  2 10:11:50 grumbler slapd[17023]: conn=6 op=0 BIND
dn="CN=URDS,OU=CLIENTS,O=CGDI" method=128 
Aug  2 10:11:50 grumbler slapd[17023]: conn=6 op=0 RESULT tag=97 err=0 text=

Aug  2 10:11:50 grumbler slapd[17023]: conn=6 op=1 SRCH
base="cn=Atlas,ou=Clients,o=CGDI" scope=0 filter="(objectClass=*)" 
Aug  2 10:11:50 grumbler slapd[17023]: conn=6 op=1 SEARCH RESULT tag=101
err=0 text= 
Aug  2 10:11:50 grumbler slapd[17023]: conn=6 op=2 SRCH
base="ou=Users,o=CGDI" scope=2 filter="(&(objectClass=cgdiuser)(uid=JBloe))"

Aug  2 10:11:50 grumbler slapd[17023]: conn=6 op=2 SEARCH RESULT tag=101
err=0 text= 
Aug  2 10:11:50 grumbler slapd[17023]: conn=6 op=3 ADD
dn="UID=JBLOE,OC=OTHER,C=CA,OU=USERS,O=CGDI" 
Aug  2 10:11:50 grumbler slapd[17023]: conn=6 op=3 RESULT tag=105 err=68
text= 
Aug  2 10:11:51 grumbler slapd[17023]: conn=6 op=4 UNBIND 
Aug  2 10:11:51 grumbler slapd[17023]: conn=-1 fd=9 closed 

The searches the app performs look like this in the log:

Aug  2 10:15:58 grumbler slapd[17019]: daemon: conn=8 fd=9 connection from
IP=132.156.10.123:2655 (IP=0.0.0.0:31746) accepted. 
Aug  2 10:15:58 grumbler slapd[17023]: conn=8 op=0 BIND dn="" method=128 
Aug  2 10:15:58 grumbler slapd[17023]: conn=8 op=0 RESULT tag=97 err=0 text=

Aug  2 10:15:58 grumbler slapd[17023]: conn=8 op=1 SRCH
base="ou=Users,o=CGDI" scope=2 filter="(&(objectClass=cgdiuser)(uid=JBloe))"

Aug  2 10:15:58 grumbler slapd[17023]: conn=8 op=1 SEARCH RESULT tag=101
err=0 text= 
Aug  2 10:15:58 grumbler slapd[17023]: conn=8 op=2 UNBIND 
Aug  2 10:15:58 grumbler slapd[17023]: conn=-1 fd=9 closed 

The search succeeds but returns 0 results.

from the prompt I've tried:

ldapsearch (Whic does a dump, and I tried grep'ing, found nothing)
ldapsearch "(uid=JBloe)" (Which works for every entry I imported with LDIF,
but not this one)
and ldapsearch -b <various bases> "(uid=JBloe)"
and all of the above with "(&(objectClass=cgdiuser)(uid=JBloe))" as well ...

I actually restarted the server in between tries too, wondering if this
"cache" might have anything to do with it, but apparently not.

Anybody have any idea why I'm getting ghost entries here? Is there some sort
of "commit" concept?

Thanks,


Jean-François Doyon
Internet Service Development and Systems Support
GeoAccess Division
Canadian Center for Remote Sensing
Natural Resources Canada
http://atlas.gc.ca
Phone: (613) 992-4902
Fax: (613) 947-2410