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

N-Way replication



Hello.
I'm trying to do N-way replication, and I have some strange issue with
replication.
I have two servers ldap1 and ldap2. In ldap1 I did these:

#slapadd -F /usr/local/etc/openldap/slapd.d/ -n 0 <<EOF
dn: cn=config
objectClass: olcGlobal
cn: config

dn: olcDatabase={0}config,cn=config
objectClass: olcDatabaseConfig
olcDatabase: {0}config
olcRootPW: SECRET
EOF

#chown -R ldap /usr/local/etc/openldap/slapd.d/*
#/usr/local/libexec/slapd -F /usr/local/etc/openldap/slapd.d -u ldap -g ldap -d Sync -h "ldap://";
#ldapadd -D cn=config -H ldap://localhost -w larati5nco6e << EOF
dn: cn=module{0},cn=config
objectClass: olcModuleList
cn: module{0}
olcModulePath: /usr/local/libexec/openldap
olcModuleLoad: {0}back_bdb
olcModuleLoad: {1}back_hdb
EOF

#ldapmodify -D cn=config -H ldap://localhost -w larati5nco6e <<EOF
dn: cn=config
changetype: modify
replace: olcServerID
olcServerID: 1 ldap://ldap1
olcServerID: 2 ldap://ldap2

dn: olcOverlay=syncprov,olcDatabase={0}config,cn=config
changetype: add
objectClass: olcOverlayConfig
objectClass: olcSyncProvConfig
olcOverlay: syncprov

dn: olcDatabase={0}config,cn=config
changetype: modify
add: olcSyncRepl
olcSyncRepl: rid=001 provider=ldap://ldap1 binddn="cn=config" bindmethod=simple
  credentials=SECRET searchbase="cn=config" type=refreshAndPersist
  retry="5 5 300 5" timeout=1
olcSyncRepl: rid=002 provider=ldap://ldap2 binddn="cn=config" bindmethod=simple
  credentials=SECRET searchbase="cn=config" type=refreshAndPersist
  retry="5 5 300 5" timeout=1
-
add: olcMirrorMode
olcMirrorMode: TRUE
EOF

#slapcat -n 0 -l cn=config.ldif

And after that I copied cn=config.ldif to ldap2, and did
#slapadd -F /usr/local/etc/openldap/slapd.d/ -n 0 -l cn=config.ldif
#chown -R ldap /usr/local/etc/openldap/slapd.d/*
#/usr/local/libexec/slapd -F /usr/local/etc/openldap/slapd.d -u ldap -g ldap -d Sync -h "ldap://";

When I did changes in cn=config in ldap1 replication works fine, but
if I did it in ldap2 replication doesn't work.
On console where I started slapd I don't see any tries to do
replication.

Please advise.

-- 
Best Regards,
Alexander Kriventsov
.masterhost