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

RE: slapd shuts down for no reason



Hi,

On Tue, 18 Mar 2014, Borresen, John - 0442 - MITLL wrote:

Fall back to legacy unix...sorry logrotate is more appropriate.  Yes, yours
is very similar to how ours looked and it would stop the daemon fine, and
rotate the log but would not restart.  I modified it to look like this:

   ....
           /etc/init.d/slapd stop; sleep 5; /etc/init.d/slapd start

why are you stopping and starting slapd ?  This does not make any sense.

Greetings
Christian

   ....

Commenting out the "/bin/kill -s HUP syslogd".

Now, it does what it is supposed to do.

John

-----Original Message-----
From: Hallvard Breien Furuseth [mailto:h.b.furuseth@usit.uio.no]
Sent: Tuesday, March 18, 2014 4:26 AM
To: Borresen, John - 0442 - MITLL
Cc: openldap-technical@openldap.org
Subject: RE: slapd shuts down for no reason

On Mon, 2014-03-17 at 08:30 -0400, Borresen, John - 0442 - MITLL wrote:
We had a similar issue a few months back.  I discovered that it was
dying at about the same time.  Come to find out it was syslog rotation
that was doing it.  Syslog sends a HUP signal to rotate the logs and
restart a daemon.  I had to put a sleep statement in the syslog for slapd.

Your syslog rotates logs?  On our host (RedHat) it's logrotate which does
that.  And it's logrotate which must kill -HUP syslogd, to make syslogd
close and reopen the log.  From logrotate.conf:

notifempty
missingok
create  0640 ldap cerebrum
start   0

/ldap/log/syslog/openldap.log {
       size=250M
       rotate  2500
       compress
       delaycompress
       lastaction
               /bin/kill -s HUP syslogd
       endscript
}



--
Christian Kratzer                   CK Software GmbH
Email:   ck@cksoft.de               Wildberger Weg 24/2
Phone:   +49 7032 893 997 - 0       D-71126 Gaeufelden
Fax:     +49 7032 893 997 - 9       HRB 245288, Amtsgericht Stuttgart
Mobile:  +49 171 1947 843           Geschaeftsfuehrer: Christian Kratzer
Web:     http://www.cksoft.de/