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

Re: Accessing slave ldap server



> Hello all;
>
> I've configured a master and slave ldap server, and in the
> client  I've put the following line in /etc/ldap.conf
>
> ## begin
> # Your LDAP server. Must be resolvable without using LDAP.
> # Multiple hosts may be specified, each separated by a
> # space. How long nss_ldap takes to failover depends on
> # whether your LDAP client library supports configurable
> # network or connect timeouts (see bind_timelimit).
> host master slave
> ##end
>
> But only the first host is reachable in the client. The second
> host seems not be reachable by client, even if the slave daemon
> is running.
>
> I'd like to know the right configuration in client to reach slave
> when master is not running.

1) the /etc/ldap.conf file usually is not part of the OpenLDAP software,
nor is used by OpenLDAP tools unless you instruct them to do so; the
default location for OpenLDAP's client configuration file is
${prefix}/etc/openldap/ldap.conf; is this the case?

2) the (simple) failover mechanism of libldap implies that the hosts in
the host list are tried left to right until one succeeds.  So, provided
you put the "host" directive in the file that's actually used by your
client, the string "host master slave" will cause "slave" to be used only
in case "master" does not respond at the time the connection was initiated
(e.g. when the first operation is executed, not when ldap_init is called).
 If the server stops while the connecton is open, the library does not
automatically call another host in the list.  You need to re-init the
connection (please correct me if I'm wrong).

p.

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




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