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

Re: Multi-Master OpenLDAP Replication for 3 nodes -- slapadd command failing



From the manpage of slapadd:

'-n dbnum       Add  entries  to  the dbnum-th database listed in the
configuration file.  The -n cannot be used in conjunction with the -b
option.  To populate the config database slapd-config(5), use -n 0 as it
is always  the  first  database.  It must physically exist on the
filesystem prior to this, however.'

hth

On 28.12.2012 09:14, fal patel wrote:
> Hi Dieter,
> 
> Thank you very much, but even though I spent all day trying to figure out
> the problem I could not make any progress at all.
> 
> The mmr_servers.ldif file I provided is an *exact* copy of the OpenLDAP 2.4
> Administrator's Guide Section 18.3.3 "N-Way Multi-Master", so if it is not
> working it has to be a documentation error/bug in that section of the
> Administrator's Guide itself.
> Or is it the case that the variables I'm setting therein are wrong?
> 
> Here are the variable values I'm setting:
> ============================
> # Also, replace all ${} variables with whatever is applicable to your setup:
> BACKEND=bdb
> BASEDN="dc=ldapservice,dc=hq,dc=mycompany,dc=com"
> MANAGERDN="cn=admin,$BASEDN"
> PASSWD=secret
> 
> 
> The slapd.conf file also is the *exact* same one that gets created at
> install-time in /usr/local/etc/openldap/ , with the only change being my
> "BDB database definitions" customisations as follows:
> #######################################################################
> # BDB database definitions
> #######################################################################
> 
> ## added for multimaster replication (prior to running slapadd to create
> db):
> database        bdb
> # suffix <DN of root of subtree you are trying to create>
> suffix          "dc=ldapservice,dc=hq,dc=mycompany,dc=com"
> rootdn          "cn=admin,dc=ldapservice,dc=hq,dc=mycompany,dc=com"
> rootpw          secret
> # directory for index files
> directory       /usr/local/var/openldap-data
> # specify which indices you want to build
> index   objectClass     eq
> # loglevel 64
> 
> 
> Whatever I try, however, slapadd gives the same error:
> =======================================
> ubuntu11@ubuntu11:~$ sudo slapadd -l
> /home/ubuntu11/openldap-2.4.33/mmr_servers.ldif -f
> /usr/local/etc/openldap/slapd.conf -F /usr/local/etc/openldap/slapd.d
> 50dd4b2a bdb_monitor_db_open: monitoring disabled; configure monitor
> database to enable
> slapadd: line 1: database #1
> (dc=ldapservice,dc=hq,dc=practicefusion,dc=com) not configured to hold
> "cn=config"; did you mean to use database #0 (cn=config)?
> _                       3.25% eta   none elapsed            none spd 833.5
> k/s
> Closing DB...
> 
> 
> I didn't quite understand your instructions either:
> ==================================
> "cn=config has to be database  number 0, that
> is, the first database declaration must be cn=config."
> 
> In mmr_servers.ldif, the very first line is
> dn:   cn=config
> 
> How do I cause cn=config to be database number 0 , please?
> 
> And why should I have to, unless the text in OpenLDAP 2.4 Administrator's
> Guide, Section 18.3.3 "N-Way Multi-Master" has a bug?
> 
> Could you please advise?  I am completely stuck.
> 
> Thank you very much.
> 
> Fal
> 
> 
> 
> On Thu, Dec 27, 2012 at 3:54 AM, Dieter Klünter <dieter@dkluenter.de> wrote:
> 
>> Am Thu, 27 Dec 2012 02:22:18 -0800
>> schrieb fal patel <fal0patel@gmail.com>:
>>
>>> Oops -- forgot to enter subject-line!
>>>
>>>
>>> On Thu, Dec 27, 2012 at 2:11 AM, fal patel <fal0patel@gmail.com>
>>> wrote:
>>>
>>>> Hello,
>>>>
>>>> I'm trying to accomplish Multi-Master OpenLDAP Replication for 3
>>>> nodes, but it's not working.
>> [...]
>>>>
>>>> (1)  The slapadd command, I execute, and the error message I get:
>>>> ================================================
>>>> sudo slapadd -l /home/ubuntu11/openldap-2.4.33/mmr_servers.ldif -f
>>>> /usr/local/etc/openldap/slapd.conf
>>>> -F /usr/local/etc/openldap/slapd.d [sudo] password for ubuntu11:
>>>> 50dc0b31 bdb_monitor_db_open: monitoring disabled; configure monitor
>>>> database to enable
>>>> slapadd: line 1: database #1
>>>> (dc=ldapservice,dc=hq,dc=mycompany,dc=com) not configured to hold
>>>> "cn=config"; did you mean to use database #0 (cn=config)?
>>>> _                       2.58% eta   none elapsed            none
>>
>> This error is quite clear, cn=config has to be database  number 0, that
>> is, the first database declaration must be cn=config.
>> This is probably due to including a slapd.conf file with a database
>> declaration.
>>
>> -Dieter
>>
>> --
>> Dieter Klünter | Systemberatung
>> http://dkluenter.de
>> GPG Key ID:DA147B05
>> 53°37'09,95"N
>> 10°08'02,42"E
>>
>>
> 

-- 
Technische Universität Berlin - FGINET

Bernd May

System Administration
An-Institut Deutsche Telekom Laboratories
Sekr. TEL 16
Ernst-Reuter-Platz 7
10587 BERLIN
GERMANY

Mobile: 0160/90257737
E-Mail: bernd@net.t-labs.tu-berlin.de (T-Labs work)
WWW:    net.t-labs.tu-berlin.de

Attachment: signature.asc
Description: OpenPGP digital signature