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

Re: What does "Key/data pair already exists -30996" mean?



Of course its not empty, this is a production directory. It shouldn't have to be empty to add entries!
I don't know what caused this. The cn of the entry I was adding was NOT in the directory although it had been previously and then deleted. As you can see below it not anywhere in the output from slapcat. If I changed the cn I could add it successfully so maybe its a bug when an entry is deleted and then re-added? I don't know.
 
To get around it I basically re-created my directory by running this command:
slapcat |grep -v entryUUID|grep -v creatorsName|grep -v createTimestamp|grep -v entryCSN|grep -v modifiersName|grep -v modifyTimestamp >> clean.ldif
Which creates a new ldif file without all the above fields, then I used ldapadd to add it to an emtpy directory. After that everything was fine and I could add my users with no troubles.
 
Cheers
Max

>>> Quanah Gibson-Mount <quanah@stanford.edu> 20/03/2006 5:30 p.m. >>>



--On Monday, March 20, 2006 4:13 PM +1200 max williams 
<max.williams@alliedtelesyn.co.nz> wrote:

> Hi,
> I am using slapd 2.2.23 and I'm trying to add a couple of users to the
> directory but it fails like this: [root@destroyo scripts]# ldapadd -f
> tmp.ldif -x -D cn=root,dc=cave,dc=alliedtelesyn,dc=co,dc=nz -WEnter LDAP
> Password:adding new entry "cn=Frank
> Wei,ou=People,dc=cave,dc=alliedtelesyn,dc=co,dc=nz"ldap_add: Already
> exists (68)  So I thought well perhaps its already in the directory but
> there is no "Frank" from slapcat at all:
> [root@destroyo scripts]# slapcat|grep Frank
> [root@destroyo scripts]#


Are you sure the database you are adding *to* is empty?

> So I check the ldap logs and there is this entry:
> Mar 20 15:12:26 destroyo slapd[6854]: => bdb_dn2id_add: put failed:
> DB_KEYEXIST: Key/data pair already exists -30996I can browse my directory
> with a gui and this entry is not present. I've never run into this error
> before.What causes this and what does it mean?TIA Max

It means the data already exists in the database.  You probably didn't 
delete everything that was already there.

--Quanah



--
Quanah Gibson-Mount
Principal Software Developer
ITS/Shared Application Services
Stanford University
GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html



NOTICE: This message contains privileged and confidential
information intended only for the use of the addressee
named above. If you are not the intended recipient of
this message you are hereby notified that you must not
disseminate, copy or take any action in reliance on it.
If you have received this message in error please
notify Allied Telesis Labs Ltd immediately.
Any views expressed in this message are those of the
individual sender, except where the sender has the
authority to issue and specifically states them to
be the views of Allied Telesis Labs.