I've configured a second host to replicate the main LDAP server via syncrepl in the slapd.conf
:
syncrepl rid=666
provider=ldaps://my-main-server.com
type=refreshAndPersist
searchBase="dc=Staff,dc=my-main-server,dc=com"
filter="(objectClass=*)"
scope=sub
schemachecking=off
bindmethod=simple
binddn="cn=repadmin,dc=my-main-server,dc=com"
credentials=mypassword
When I restart slapd
, it writes to /var/log/debug
Jun 11 15:48:33 cluster-mn-04 slapd[29441]: @(#) $OpenLDAP: slapd 2.4.9 (Mar 31 2009 07:18:37) $ ^Ibuildd@yellow:/build/buildd/openldap2.3-2.4.9/debian/build/servers/slapd
Jun 11 15:48:34 cluster-mn-04 slapd[29442]: slapd starting
Jun 11 15:48:34 cluster-mn-04 slapd[29442]: null_callback : error code 0x14
Jun 11 15:48:34 cluster-mn-04 slapd[29442]: syncrepl_entry: rid=666 be_modify failed (20)
Jun 11 15:48:34 cluster-mn-04 slapd[29442]: do_syncrepl: rid=666 quitting
I've looked into the sources for the return code and found only
#define LDAP_TYPE_OR_VALUE_EXISTS 0x14
in include/ldap.h
. Anyway, I don't quite get what the error message means.
Can you help me debugging this problem and figure out why the LDAP replication doesn't work? I've managed to put a "manual" copy via slapcat
and slapadd
into the database, but I'd like to sync automatically.
UPDATE:
"Solved" by removing /var/lib/ldap/*
and re-importing the database with slapadd
.
Are you sure that slapd have the right to write in dirs ? Usually, after a from scratch insert, you must change the owner of directories.