2011/12/29 Graham Leggett <minfrin@sharp.fm>
Hi all,

I'm trying to add an index, and am currently epically failing at doing so.

The only documentation I can find is the obsolete Redhat Directory Server guide at http://docs.redhat.com/docs/en-US/Red_Hat_Directory_Server/9.0/html/Administration_Guide/applying-indexes.html, linked to from the 389-ds documentation website.

The docs recommend I use the db2index.pl script, which doesn't work for me:

/usr/lib64/dirsrv/slapd-myinstance/db2index.pl -D "cn=Directory Manager" -w `cat /etc/ldap.secret` -n myinstance -t myattribute
adding new entry cn=db2index_2011_12_28_14_49_34, cn=index, cn=tasks, cn=config
ldap_add: No such object

-n "myinstance' is this case should be your database name , Which is generally userRoot.  If your database name userRoot in this case ?


if you are not sure what is your database used for storing your Directory Information Tree, you can look to dse.ldif file

Example, if i have dc=example,dc=com , then /etc/dirsrv/slapd-<instance-name>/dse.ldif would have an entry like below:

dn: cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config
objectClass: top
objectClass: extensibleObject
objectClass: nsMappingTree
nsslapd-state: Backend
cn: "dc=example,dc=com"
cn: dc=example,dc=com
nsslapd-backend: userRoot <=======================
creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot
modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoo
 t
createTimestamp: 20100928212256Z
modifyTimestamp: 20100928212256Z
numSubordinates: 1

In the above case i am using "userRoot" as my backend for "dc=example,dc=com"

Also you check through Console.
1. open Director Server console.
2. Click on Configuration
3. Expand your suffix
4. select Databases, to see what is the name of the database being used.




A look at the error log reveals this error:

[28/Dec/2011:14:50:35 -0600] - can't import to nonexistent backend myinstance

I am completely stumped. If my backend isn't called "myinstance" then I have no idea what it's referring to. Given there is only one instance on the server, I have no idea why 389ds can't figure this out for itself. In fact, I can't understand why 389ds didn't just handle indexes all on its own anyway.

The docs suggest doing this:

cd /etc/dirsrv/slapd-instance_name
db2index.pl-D "cn=Directory Manager" -w secret -n ExampleServer -t sn

No idea where "ExampleServer" comes from, and no idea why it's not the same as "instance_name".

Instance name and Database name are different.

Instance name is name of slapd instance,  Database Name is the Name of the databases which stores your DIT(directory information tree).
 

I also find a shell script called db2index, as well as the perl script called db2index.pl. Any idea why there are two scripts that in theory do the same thing?

Is there an up to date recipe somewhere that explains how to add an index to 389ds?

Regards,
Graham
--
 
Regards
Niranjan
 


--
389 users mailing list
389-users@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/389-users