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

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



"Doyon, Jean-Francois" wrote:

> 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!

There are a number of possibilities:
1) ACLs (you can't find it because you're not allowed)
2) existence (you can't find it because it's not there)
3) attributes (you can't find it because it doesn't have
the attributes you use in the filter)
4) more ...

1) check you ACLs; try first to find the entry as the rootdn
2) try a slapcat and see if the entry is there
3) if you succeed with 2), look at the exact attrs/values the entry has
4) ... post again :)

>
> 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))"

--
Dr. Pierangelo Masarati               | voice: +39 02 2399 8309
Dip. Ing. Aerospaziale                | fax:   +39 02 2399 8334
Politecnico di Milano                 | mailto:masarati@aero.polimi.it
via La Masa 34, 20156 Milano, Italy   | http://www.aero.polimi.it/~masarati