ubuntu 12.04升级到14.04, openldap/slapd启动失败

执行slapcat 出现如下错误,启动slapd服务也失败

qisen@jdcloud:/var/lib/ldap$ sudo slapcat
579f099a hdb_db_open: database "dc=phoneos,dc=org": unclean shutdown detected; attempting recovery.
579f099a hdb_db_open: database "dc=phoneos,dc=org": recovery skipped in read-only mode. Run manual recovery if errors are encountered.
579f099a bdb(dc=phoneos,dc=org): BDB1538 Program version 5.3 doesn't match environment version 5.1
579f099a hdb_db_open: database "dc=phoneos,dc=org" cannot be opened, err -30969. Restore from backup!
579f099a backend_startup_one (type=hdb, suffix="dc=phoneos,dc=org"): bi_db_open failed! (-30969)
slap_startup failed

Program version 5.3 doesn't match environment version 5.1 主要根据这句,猜想是数据库格式问题,所以安装 bdb5.1

sudo apt-get install db5.1-util

然后通过如下命令,修复数据库:

db5.1_checkpoint -1
db5.1_recover

修复后,再之执行slapcat,成功。sudo service slapd start 正常启动。

转自:http://www.yinqisen.cn/blog-701.html

posted @ 2016-08-18 14:53  鹤骨松姿  阅读(893)  评论(0编辑  收藏  举报