[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: syncrepl error (53) with 3-way delta-mmr (consumer state is newer than provider)
- To: Quanah Gibson-Mount <quanah@symas.com>, openldap-technical@openldap.org
- Subject: Re: syncrepl error (53) with 3-way delta-mmr (consumer state is newer than provider)
- From: Sven Mäder <maeder@phys.ethz.ch>
- Date: Thu, 31 Aug 2017 15:51:35 +0200
- Content-language: en-US
- In-reply-to: <1FAE71863FA255994872CF4D@[192.168.1.30]>
- References: <2c527361-fd25-9002-1aa5-96ba00a69135@phys.ethz.ch> <WM!b7c3fe2511184c54402ed987a2cdb1758ba6d828beeae5347fc91bd5f9bb332b6d135e69c80b69d37a5b733b59176d33!@mailstronghold-1.zmailcloud.com> <1FAE71863FA255994872CF4D@[192.168.1.30]>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1
On 08/30/2017 07:42 PM, Quanah Gibson-Mount wrote:
> This would generally indicate that the accesslog DB was empty at
> startup, and it generated a new CSN. This is a general problem with
> delta-syncrepl -- If the accesslog DB goes empty, there are a host of
> issues that can ensue (See ITS#8100 for example).
I did not check the accesslog DB, but this must have been the case. I
saw in the logs that there were no writes during the last days on
ServerID 001 and 002. ServerID 000 had some writes, which should not
have been purged by:
olcAccessLogPurge: 1+00:00 0+01:00
>
> Generally you need a script that writes a change on all masters in
> your cluster on a regular interval so that the DB is never purged, and
> there is always an active contextCSN value that's stored in the DB for
> each serverID.
Thanks a lot for this information.
Below is what I did, in case somebody else needs this (the timestamp
could be used to monitor the syncrepl health).
schema:
dn: cn={5}dphys,cn=schema,cn=config
changetype: modify
add: olcAttributeTypes
olcAttributeTypes: ( 1.3.6.1.4.1.12530.10.1.1.7.1 NAME 'heartbeatServerID'
DESC 'delta-syncrepl heartbeat server id (format: nnn)'
EQUALITY caseExactMatch
SUBSTR caseExactSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{255} )
olcAttributeTypes: ( 1.3.6.1.4.1.12530.10.1.1.7.2 NAME 'heartbeatTimestamp'
DESC 'delta-syncrepl heartbeat timestamp (format: date -u --rfc-3339=ns)'
EQUALITY caseExactMatch
SUBSTR caseExactSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{255} )
-
add: olcObjectClasses
olcObjectClasses: ( 1.3.6.1.4.1.12530.10.1.1.8.1 NAME 'heartbeatEntry'
DESC 'entry for delta-syncrepl transaction heartbeats'
SUP top STRUCTURAL
MUST ( cn $ heartbeatServerID )
MAY heartbeatTimestamp )
database entry:
dn: ou=syncrepl,dc=phys,dc=ethz,dc=ch
changetype: add
objectClass: organizationalUnit
description: slapd syncrepl branch
ou: syncrepl
dn: ou=hb,ou=syncrepl,dc=phys,dc=ethz,dc=ch
changetype: add
objectClass: organizationalUnit
description: slapd delta-syncrepl heartbeat branch
ou: hb
dn: cn=phd-aa1,ou=hb,ou=syncrepl,dc=phys,dc=ethz,dc=ch
changetype: add
objectClass: heartbeatEntry
heartbeatServerID: 000
heartbeatTimestamp: 0000-00-00 00:00:00.000000000+00:00
script (run by cron):
#!/bin/bash
HOSTNAME="phd-aa1"
cat << EOF | /usr/bin/ldapmodify -Q -Y EXTERNAL -H ldapi://
dn: cn=${HOSTNAME},ou=hb,ou=syncrepl,dc=phys,dc=ethz,dc=ch
changetype: modify
replace: heartbeatTimestamp
heartbeatTimestamp: $(date -u --rfc-3339=ns)
EOF
--
Sven