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

Re: ldap SQL backend and syncrepl



Hi,

On 21.04.2009 15:57, Frederic Bouy wrote:
Hello,

For performance issues (millions or records) I have two ldap servers:
- one master with an sql backend (postgres) to allow easy data manipulation
- one slave to anwer ldap queries and provide good response time

When lauching the slave ("./slapd -f /usr/local/openldap/etc/openldap/slapd-front.conf -h "ldap://localhost:3890"; -d 1") I got a first non blocking error I don't really understand:
" => bdb_dn2id("dc=lnp")
<= bdb_dn2id: get failed: DB_NOTFOUND: No matching key/data pair found (-30988)"

This looks like the entry "dc=lnp" doesn't exist in your database.

According to the fact that the following command is successfull:
"ldapwhoami -H "ldap://localhost:389"; -D "cn=manager,dc=lnp" -w secret"

This works because the "cn=manager,dc=lnp" user and password are defined in your slapd.conf. It would be the same if you had no data in the database at all.

database        bdb
suffix          "dc=lnp"
rootdn          "cn=Manager,dc=lnp"
rootpw          secret

[...]
syncrepl rid=001
        provider=ldap://localhost:389
        bindmethod=simple
        type=refreshAndPersist
        searchbase="ou=31,dc=lnp"

You have configured a database on suffix "dc=lnp", but you're only replicating the subtree "ou=31,dc=lnp". Therefore, there is no LDAP entry "dc=lnp", which is where syncrepl stores it's contextCSN. This probably explains the errors you're seeing.

Either create a simple "dc=lnp" entry yourself, or replicate that entry from the master aswell.

Regards,
Jonathan

--
--------------------------------------------------------------
Jonathan Clarke - jonathan@phillipoux.net
--------------------------------------------------------------
Ldap Synchronization Connector (LSC) - http://lsc-project.org
--------------------------------------------------------------