CentOS 5.1 ldap server stop problem
The /etc/init.d/ldap scripts kills the slapd process after 3 seconds. If there are active threads with longer shutdown time, then the BDB requires a check on the next startup
Status
- Patch available
- open
Description
The /etc/init.d/ldap try to stop the slapd process with the TERM signal first. If the process is active after three seconds, then the script stops slapd with the KILL signal. The next ldap start requires recovery:
# service ldap start
Checking configuration files for slapd: bdb_db_open: unclean shutdown detected; attempting recovery.
bdb_db_open: Recovery skipped in read-only mode. Run manual recovery if errors are encountered.
--> hit Cntrl-C
config file testing succeeded
[OK ]
Starting slapd: [OK ]
Solution
Using option -d with the killproc function. The delay time ca be configured with /etc/sysconfig/ldap. This solution allows a flexible configuration for the administrator.
Patch
This Patch and create the configuration file /etc/sysconfig/ldap with:
STOP_DELAY=60
Logfile
This example show a shutdown duration of 12 seconds:
Mar 11 19:23:50 slave slapd[9315]: daemon: shutdown requested and initiated.
Mar 11 19:23:50 slave slapd[9315]: daemon: closing 7
Mar 11 19:23:50 slave slapd[9315]: daemon: closing 8
Mar 11 19:23:50 slave slapd[9315]: slapd shutdown: waiting for 1 threads to terminate
Mar 11 19:23:50 slave slapd[9315]: =>do_syncrepl
Mar 11 19:23:50 slave slapd[9315]: connection_get(12)
Mar 11 19:23:50 slave slapd[9315]: connection_get(12): got connid=0
Mar 11 19:23:50 slave slapd[9315]: daemon: removing 12r
Mar 11 19:23:50 slave slapd[9315]: slapd shutdown: initiated
Mar 11 19:24:01 slave slapd[9315]: ====> bdb_cache_release_all
Mar 11 19:24:02 slave slapd[9315]: slapd destroy: freeing system resources.
Mar 11 19:24:02 slave slapd[9315]: slapd stopped.

Previous:
Hoary Array 6 and Preview - Installation Test Bugs
