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

RE: slapd shuts down for no reason



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
    ....

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
}

Attachment: smime.p7s
Description: S/MIME cryptographic signature