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

(ITS#6240) cn=config replication failing on repeat olcDbConfig



Full_Name: Matt Edlefsen
Version: 2.4.16
OS: FreeBSD
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (98.213.15.129)


When trying to setup multi-master replication of a cn=config database I
encountered the following error:
Aug  3 20:21:38 gabbro slapd[81578]: syncrepl_message_to_entry:
rid=001 mods check (olcDbConfig: value #14 provided more than once)

Process:
The cn=config used was copied to both servers (using ldapsearch -LLL | slapadd
-n 0) from a third server, which in turn was originally converted from a basic
slapd.conf using slapd -f -F.

To turn on replication I added the following entries/attributes to the cn=config
tree of both servers following the steps outlined in the Users Guide (only the
relevant attributes are listed):

dn: cn=config
olcServerID: 1 ldap://rock.earlham.edu/
olcServerID: 2 ldap://gabbro.earlham.edu/

dn: olcDatabase={0}config,cn=config
olcSyncrepl: {0}rid=001 provider=dap://rock.earlham.edu/
binddn="<snip>" bindmethod=simple credentials=<snip> searchbase="cn=config"
type=refreshAndPersist      retry="5 5 300 5" timeout=1
olcSyncrepl: {1}rid=002 provider=ldap://gabbro.earlham.edu/
binddn="<snip>" bindmethod=simple credentials=<snip> searchbase="cn=config"
type=refreshAndPersist      retry="5 5 300 5" timeout=1
olcMirrorMode: TRUE

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

When I added the above to the second server it started replicating against the
first and when it reached the olcDbConfig attributes of the bdb database config
it failed with the error message given above.  The olcDbConfig attributes are:

olcDbConfig: {0}# $OpenLDAP: pkg/ldap/servers/slapd/DB_CONFIG,v
1.3.2.4 2007/12/18 11:53:27 ghenry Exp $
olcDbConfig: {1}# Example DB_CONFIG file for use with slapd(8) BDB/HDB
databases.
olcDbConfig: {2}#
olcDbConfig: {3}# See the Oracle Berkeley DB documentation
olcDbConfig: {4}# <http://www.oracle.com/technology/documentation/berkeley-db/db/ref/env/db_config.html>
olcDbConfig: {5}# for detail description of DB_CONFIG syntax and semantics.
olcDbConfig: {6}#
olcDbConfig: {7}# Hints can also be found in the OpenLDAP Software FAQ
olcDbConfig: {8}#       <http://www.openldap.org/faq/index.cgi?file=2>
olcDbConfig: {9}# in particular:
olcDbConfig: {10}#   <http://www.openldap.org/faq/index.cgi?file=1075>
olcDbConfig: {11}
olcDbConfig: {12}# Note: most DB_CONFIG settings will take effect only upon
rebuilding
olcDbConfig: {13}# the DB environment.
olcDbConfig: {14}
olcDbConfig: {15}# one 1 GB cache
olcDbConfig: {16}set_cachesize 0 1073741824 1
olcDbConfig: {17}
olcDbConfig: {18}# Data Directory
olcDbConfig: {19}#set_data_dir db
olcDbConfig: {20}
olcDbConfig: {21}# Transaction Log settings
olcDbConfig: {22}set_lg_regionmax 262144
olcDbConfig: {23}set_lg_bsize 104857600
olcDbConfig: {24}set_lk_max_locks 100000
olcDbConfig: {25}#set_lg_dir logs
olcDbConfig: {26}
olcDbConfig: {27}# Note: special DB_CONFIG flags are no longer needed for
"quick"
olcDbConfig: {28}# slapadd(8) or slapindex(8) access (see their -q option).

Fix:
Removing all the duplicate entries (not counting the {#} prefixes) fixed the
problem.