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

Re: How to access on ldbm databse by two slapd.



> Hello list,
>
> I am running openldap-2.2.26 with ldbm database. My problem is that
> I am running two slapd(both compiled seprately with same configuration)
>
> slapd1: 127.0.0.1:389
> slapd2: 192.168.9:390
> (check with netstat -anp | grep slapd)
>
> slapd.conf configuration of both slapd is same but i have changed only
> rootdn of both
> slapd.conf. Both slapd running fine. I am sharing my ldbm database in both
> slapd.conf that is in /var/ldap/var/openldap-data. I have keep constant
> watch in log.
> Both slapd have started successfully.
>
> Now i am doing ldap search for slapd 1
>
> ldapsearch -x -h 127.0.0.1 -p 389 -b "dc=maydomain,dc=com"
>
> It's showing found entery i have also check the databse.
>
> Now i am doing ldap search for slapd2
>
> ldapsearch -x -h 192.168.1.9 -p 390 -b "dc=mydomain,dc=com"
>
> It's not showing any entry, I have check the databse and found below error
>
> ............
> @40000000430ac0d42b7557e4 => ldbm_back_search
> @40000000430ac0d42b757b0c dn2entry_r: dn:
> "dc=avinash,dc=lan,dc=deeproot,dc=co,dc=in"
> @40000000430ac0d42b75a21c => dn2id(
> "dc=avinash,dc=lan,dc=deeproot,dc=co,dc=in" )
> @40000000430ac0d42b75cd14 => ldbm_cache_open(
> "/var/easypush/ldap/var/openldap-data/dn2id.gdbm", 34, 600 )
> @40000000430ac0d42b75f424 <= ldbm_cache_open NULL
> "/var/easypush/ldap/var/openldap-data/dn2id.gdbm" errno=11
> reason="Resource temporarily unavailable")
> .............
>
> If i am do reverse process i.e. do ldapsearch on slapd2 then ldap
> operation  would block for slapd1 and
> giving same above error. I want to allow slapd1 to do all operation on
> ldbm and only read operaion to
> slapd2.
>
> I am supecting that this problem might of ldbm, Can any body suggest me
> good idea/solution to acheive this
> scenerio.

I have no idea as of why it doesn't work, but my suggestion is very
simple: don't try it.  If you want two separate slapd's to be able to
present the same data, one read/write and one read-only, set up
replication between a master (read/write) and a slave (read-only).

p.

-- 
Pierangelo Masarati
mailto:pierangelo.masarati@sys-net.it


    SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497