Hi
Slave servers that are replicating changes using the refreshAndPersist operation type do not get updates from the master server until they are restarted. They will not be notified of any other changes. If I set the replication protocol operation type to refreshOnly and a suitable interval, the changes do get replicated as expected.
I have verified that syncrepl with type=refreshAndPersist works with openldap2-2.2.24 and 2.2.27) also works as it should. However neither the 2.3.19-x (which is the current version on my platform - SLES 10, kernel 2.6.16) nor 2.3.30 work as expected.
I have traversed the net and tried numerous configuration variations, but not found anything that changes the behavior. I always end up having to restart the slave to get the updates over. Needless to say that I have tried on different hardware (all x86-based) and all on complete fresh installations of the base OS.
When loading the consumer/replica/slave, the apparently connects to the provider (Config: ** successfully added syncrepl "ldap://host1.nts.com:389").
There seems to be many people who have this working, but I have not yet been able to find a configuration example that works.
Snip of consumer config (full config files attached) : ############################### database bdb suffix dc=example,dc=com directory /var/opt/ldap/master rootdn "cn=admin,dc=example,dc=com" rootpw secret index entryUUID,entryCSN,objectClass eq,pres index cn,displayname,uid,sn,givenname,telephoneNumber sub,eq,pres cachesize 250000 checkpoint 50 5 idlcachesize 750000 mode 0600 dbconfig set_cachesize 0 268435456 1 dbconfig set_lg_regionmax 262144 dbconfig set_lg_bsize 2097152 access to * by self write by dn.base="cn=admin,dc=example,dc=com" write by anonymous auth by * read syncrepl rid=101 provider=ldap://host1.nts.com type=refreshAndPersist retry="10 10 60 +" searchbase="dc=example,dc=com" filter="(objectClass=*)" scope=sub schemachecking=off sizelimit=500000 timelimit=360000 bindmethod=simple binddn="cn=admin,dc=example,dc=com" credentials=secret updateref ldap://host1.nts.com ###############################
Snip of provider : ############################### overlay syncprov syncprov-checkpoint: 100 10 syncprov-sessionlog: 3000
database bdb suffix dc=example,dc=com directory /var/opt/ldap/master rootdn "cn=admin,dc=example,dc=com" rootpw secret index entryUUID,entryCSN,objectClass eq,pres index cn,displayname,uid,sn,givenname,telephoneNumber sub,eq,pres cachesize 250000 checkpoint 50 5 idlcachesize 750000 mode 0600 dbconfig set_cachesize 0 268435456 1 dbconfig set_lg_regionmax 262144 dbconfig set_lg_bsize 2097152 access to * by self write by dn.base="cn=admin,dc=example,dc=com" write by anonymous auth by * read ###############################
Am I missing something or is refreshAndPersist broken ?
Any hints would be most appreciated.
Thank you
Andreas Taschner Support Engineer Novell Inc.
Andreas Taschner wrote:
Hi
Slave servers that are replicating changes using the refreshAndPersist operation type do not get updates from the master server until they are restarted. They will not be notified of any other changes. If I set the replication protocol operation type to refreshOnly and a suitable interval, the changes do get replicated as expected.
I have verified that syncrepl with type=refreshAndPersist works with openldap2-2.2.24 and 2.2.27) also works as it should. However neither the 2.3.19-x (which is the current version on my platform - SLES 10, kernel 2.6.16) nor 2.3.30 work as expected.
I have traversed the net and tried numerous configuration variations, but not found anything that changes the behavior. I always end up having to restart the slave to get the updates over. Needless to say that I have tried on different hardware (all x86-based) and all on complete fresh installations of the base OS.
When loading the consumer/replica/slave, the apparently connects to the provider (Config: ** successfully added syncrepl "ldap://host1.nts.com:389").
There seems to be many people who have this working, but I have not yet been able to find a configuration example that works.
Snip of consumer config (full config files attached) : ############################### database bdb suffix dc=example,dc=com directory /var/opt/ldap/master rootdn "cn=admin,dc=example,dc=com" rootpw secret index entryUUID,entryCSN,objectClass eq,pres index cn,displayname,uid,sn,givenname,telephoneNumber sub,eq,pres cachesize 250000 checkpoint 50 5 idlcachesize 750000 mode 0600 dbconfig set_cachesize 0 268435456 1 dbconfig set_lg_regionmax 262144 dbconfig set_lg_bsize 2097152 access to * by self write by dn.base="cn=admin,dc=example,dc=com" write by anonymous auth by * read syncrepl rid=101 provider=ldap://host1.nts.com type=refreshAndPersist retry="10 10 60 +" searchbase="dc=example,dc=com" filter="(objectClass=*)" scope=sub schemachecking=off sizelimit=500000 timelimit=360000 bindmethod=simple binddn="cn=admin,dc=example,dc=com" credentials=secret updateref ldap://host1.nts.com ###############################
Snip of provider : ############################### overlay syncprov syncprov-checkpoint: 100 10 syncprov-sessionlog: 3000
database bdb suffix dc=example,dc=com directory /var/opt/ldap/master rootdn "cn=admin,dc=example,dc=com" rootpw secret index entryUUID,entryCSN,objectClass eq,pres index cn,displayname,uid,sn,givenname,telephoneNumber sub,eq,pres cachesize 250000 checkpoint 50 5 idlcachesize 750000 mode 0600 dbconfig set_cachesize 0 268435456 1 dbconfig set_lg_regionmax 262144 dbconfig set_lg_bsize 2097152 access to * by self write by dn.base="cn=admin,dc=example,dc=com" write by anonymous auth by * read ###############################
Am I missing something or is refreshAndPersist broken ?
Any hints would be most appreciated.
Try moving the "overlay syncprov" inside the database specification (as clearly indicated in the documentation).
p.
Ing. Pierangelo Masarati OpenLDAP Core Team
SysNet s.n.c. Via Dossi, 8 - 27100 Pavia - ITALIA http://www.sys-net.it ------------------------------------------ Office: +39.02.23998309 Mobile: +39.333.4963172 Email: pierangelo.masarati@sys-net.it ------------------------------------------
--On Friday, January 05, 2007 1:21 PM +0000 Andreas Taschner ataschner@novell.com wrote:
Hi
Slave servers that are replicating changes using the refreshAndPersist operation type do not get updates from the master server until they are restarted. They will not be notified of any other changes. If I set the replication protocol operation type to refreshOnly and a suitable interval, the changes do get replicated as expected.
I have verified that syncrepl with type=refreshAndPersist works with openldap2-2.2.24 and 2.2.27) also works as it should. However neither the 2.3.19-x (which is the current version on my platform
- SLES 10, kernel 2.6.16) nor 2.3.30 work as expected.
I have traversed the net and tried numerous configuration variations, but not found anything that changes the behavior. I always end up having to restart the slave to get the updates over. Needless to say that I have tried on different hardware (all x86-based) and all on complete fresh installations of the base OS.
When loading the consumer/replica/slave, the apparently connects to the provider (Config: ** successfully added syncrepl "ldap://host1.nts.com:389").
There seems to be many people who have this working, but I have not yet been able to find a configuration example that works.
Am I missing something or is refreshAndPersist broken ?
Any hints would be most appreciated.
Works for me, is all I can say. :/
Have you run the test suite?
test018-syncreplication-persist
specifically tests refresh & persist.
Also, have you turned up debugging on the master to see what happens when the slave connects?
--Quanah
-- Quanah Gibson-Mount Principal Software Developer ITS/Shared Application Services Stanford University GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html
Andreas Taschner wrote:
Hi
There seems to be many people who have this working, but I have not yet been able to find a configuration example that works.
The easiest place to look is the configs in the test suite.
Snip of provider : ############################### overlay syncprov syncprov-checkpoint: 100 10 syncprov-sessionlog: 3000
database bdb suffix dc=example,dc=com
Am I missing something or is refreshAndPersist broken ?
refreshAndPersist certainly is not broken...
Any hints would be most appreciated.
It also helps to actually read the manpage, e.g. slapd.conf(5). #### GENERAL DATABASE OPTIONS
Options in this section only apply to the configuration file section for the database in which they are defined. They are supported by every type of backend. Note that the database and at least one suffix option are mandatory for each database. ... overlay <overlay-name> Add the specified overlay to this database. An overlay is a piece of code that intercepts database operations in order to extend or change them. ####
Your overlay definition is not inside your database definition.
Thank you
Andreas Taschner Support Engineer Novell Inc.
Thank you all, for the helpful and rapid responses.
Of course it was a configuration issue. Starting from square one with OpenLDAP 2 weeks ago I had not grasped the concept of multiple database definitions and not gotten the picture with moving the overlay syncprov into the database section.
Now it works perfect :) and the man pages have once again proven they are worth spending (more) time on...
Please do accept my apologies for not getting this on my own and polluting the list, but after considerable time spent on "goose chasing" I had try other ways of solving the problem.
Sincerely Andreas Taschner
openldap-software@openldap.org