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

Re: Problem with running slapd on clusters



Susanne,

On Sat, 27 Apr 2002, Susanne Benkert wrote:

>Hi,
>
>I'd like to run slapd on a server with two clusters. Therefor I installed
>Openldap 2.0.23 and created a couple of start/stop/check scripts. Generally
>it works, but if slapd is stopped on one cluster, it cannot be restarted on
>the same cluster for a couple of time. Starting slapd on the other cluster
>works, but what to do if the second cluster is down ... ?
>
>I check my scripts and compared them with the scripts of other applications
>on this server - I can't find any difference. So it seems to be an Openldap
>related problem. Has anyone out there an idea how to solve this or where to
>search for reasons?


as I don't know which OS you are using I have to guess: seems that the
socket is in TIME_WAIT state which doesn't allow you to use the IP/port
pair for a while (details in Stevens TCP/IP Vol 1). If you check the
sources (line 473, openldap-2.0.23/servers/slapd/daemon.c) you will see

#ifdef SO_REUSEADDR
            /* enable address reuse */
            tmp = 1;
            rc = setsockopt( l.sl_sd, SOL_SOCKET, SO_REUSEADDR,
                     (char *) &tmp, sizeof(tmp) );
            ...
#endif

If my assumption is right you should check if setsockopt() gets called.

Hope this helps,
Thomas

-----------------------------------------------------------------
PGP fingerprint: B1 EE D2 39 2C 82 26 DA  A5 4D E0 50 35 75 9E ED
Phone:           +49 731 50 22464
FAX:             +49 731 50 22471