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.
--On Tuesday, August 05, 2008 6:29 PM +0400 Alexander Kriventsov akriventsov@masterhost.ru wrote:
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:
OpenLDAP release?
--Quanah
--
Quanah Gibson-Mount Principal Software Engineer Zimbra, Inc -------------------- Zimbra :: the leader in open source messaging and collaboration
You appear to be missing the serverID value. N-Way MultiMaster needs serverID to identify who is who. Otherwise, your method looks okay as far as I can tell.
See http://www.openldap.org/doc/admin24/replication.html#N-Way%20Multi-Master
On Aug 5, 2008, at 10:29 AM, Alexander Kriventsov wrote:
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.
++++++++++++++++++++++++++++++++++++++ Chris G. Sellers | Internet Engineer | NITLE 734.661.2318 | chris.sellers@nitle.org Jabber: csellers@nitle.org | AIM: imthewherd
I saw this link, but I can't repeat it. Yes, I have two serverID in each host in dn: cn=config olcServerID: 1 ldap://ldap1 olcServerID: 2 ldap://ldap2 May be I should write serverID to another dn.
You appear to be missing the serverID value. N-Way MultiMaster needs serverID to identify who is who. Otherwise, your method looks okay as far as I can tell.
See http://www.openldap.org/doc/admin24/replication.html#N-Way%20Multi-Master
On Aug 5, 2008, at 10:29 AM, Alexander Kriventsov wrote:
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.
++++++++++++++++++++++++++++++++++++++ Chris G. Sellers | Internet Engineer | NITLE 734.661.2318 | chris.sellers@nitle.org Jabber: csellers@nitle.org | AIM: imthewherd
openldap-software@openldap.org