I've tried many versions of OpenLDAP (both 2.0.x and 2.1.x) in Gentoo Linux and each one of them has a strange bug: "/etc/init.d/slapd stop" doesn't really stop the slapd daemon. One has to clean up the daemon manually, then "/etc/init.d/slapd zap" it and then restart it... Seems to happen with out-of-the-box configuration and my modified /etc/openldap/slapd.conf. Am I really the only one encountering this (in five servers + my desktop box)? Reproducible: Always Steps to Reproduce: 1. 2. 3.
I am unable to reproduce this bug with openldap 2.1.26. Starting and stopping slapd works fine for me. I suggest that it is something to do with your particular setup.
Hmm, let me try with 2.1.26 -- I must confess that the latest 2.1.x version I tried was 2.1.23. I'll also give 2.0.27-r5 a try, the latest I really have tried is 2.0.27-r4, but since changelog didn't tell me anything related to this bug, I thought it would still be alive.
Ok. It works fine with 2.0.27-r5, but not with 2.1.26 (tried with my own slapd.conf and out-of-the-box slapd.conf). With 2.0.27-r5 there were slapd.pid and slapd.args files in /var/run/openldap/, but not with 2.1.26, so that must be why restarting slapd fails. I wonder what's going on - I have these lines in my slapd.conf but still in some versions of OpenLDAP the pid/args file doesn't get created during startup. --- pidfile /var/run/openldap/slapd.pid argsfile /var/run/openldap/slapd.args ---
Maybe slapd crashed *before* you tried to shut it down? Does 'ps xa | grep slapd' show something?
No, slapd did not crash before /etc/init.d/slapd stop. I know it because that ldap database was in active use all the time.
Is this still a problem? Does the directory /var/run/openldap exist with owner ldap:ldap? ; ls -l /var/run | fgrep openldap drwxr-xr-x 2 ldap ldap 136 nov 17 19:35 openldap And does your /etc/init.d/slapd say this: ; cat /etc/init.d/slapd | egrep " --stop" start-stop-daemon --stop --quiet --pidfile /var/run/openldap/slapd.pid
Nowadays this works ok.
(In reply to comment #7) > Nowadays this works ok. Closing a stale bug.