异常关机导致的Openldap启动失败

机器在openldap运行期间异常掉电或者字节kill ldap进程等,可能导致Openldap启动失败,失败信息如下:
[root@AS-1 bin]# service ldap start

Checking configuration files for slapd: bdb_db_open: unclean shutdown detected; attempting recovery.
bdb_db_open: …..

或者
 

[root@AS-1 bin]# service ldap start

Checking configuration files for slapd:  bdb_db_open: Warning – No DB_CONFIG file found in directory /var/lib/ldap: (2)
Expect poor performance for suffix .
bdb_db_open: Database cannot be opened, err 13. Restore from backup!
bdb(): DB_ENV->lock_id_free interface requires an environment configured for the locking subsystem
backend_startup_one: bi_db_open failed! (13)
slap_startup failed (test would succeed using the -u switch)
                                                           [FAILED]
stale lock files may be present in /var/lib/ldap           [WARNING]

修复这个问题的方法:
[root@AS-1 bin]# slapd_db_recover -v -h /var/lib/ldap/
[root@AS-1 bin]# service ldap start

这个时候ldap应该就可以正常启动了。

发表评论

邮箱地址不会被公开。 必填项已用*标注

机器人检查 *

分享我的最新文章标题到这里

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据