I'm trying to set up LDAP replication according to the directions on Ubuntu's site. I went through all the directions for setting up the provider without any trouble. But when I try to set up the consumer, I'm running into an error. I'm trying to import this ldif file:
dn: cn=module{0},cn=config
changetype: modify
add: olcModuleLoad
olcModuleLoad: syncprov
dn: olcDatabase={1}hdb,cn=config
changetype: modify
add: olcDbIndex
olcDbIndex: entryUUID eq
-
add: olcSyncRepl
olcSyncRepl: rid=001 provider="ldap://myserver.mycompany.com" bindmethod=simple binddn="cn=admin,dc=mycompany,dc=com"
credentials=mypassword searchbase="dc=mycompany,dc=com" logbase="cn=accesslog"
logfilter="(&(objectClass=auditWriteObject)(reqResult=0))" schemachecking=on
type=refreshAndPersist retry="60 +" syncdata=accesslog
-
add: olcUpdateRef
olcUpdateRef: ldap://myserver.mycompany.com
When I run ldapadd -Q -Y EXTERNAL -H ldapi:/// -c -f consumer.ldif
I get this error:
modifying entry "olcDatabase={1}hdb,cn=config"
ldap_modify: Other (e.g., implementation specific) error (80)
additional info: Base DN "accesslog" is not within the database naming context
Can anyone tell me what I am doing wrong?
FWIW, the cn=accesslog database does exist on the provider machine and it is being populated any time changes are made.
Thank you in advance!
Best Answer
I had previously thought that I do not need to manually create the dc=mycompany,dc=com database on my consumer server, because I thought it would be created as part of ldap's replication. It turned out that I needed to create dc=mycompany,dc=com manually on the consumer first, then the LDIF file imported and replication started as expected.