Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

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.

share|improve this answer
    
what directories exactly do you mean? –  Pavel Jun 11 '12 at 14:35
    
On my debian, the datas are stored in /var/lib/ldap, which should be owned by openldap:openldap. All files in the dir should have the same owner. –  Dom Jun 11 '12 at 14:40
    
yeah, it's the same on my ubuntu box. –  Pavel Jun 11 '12 at 14:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.