On Aug 30, 2013, at 3:01 PM, Quanah Gibson-Mount quanah@zimbra.com wrote:
On Aug 30, 2013, at 2:57 PM, Quanah Gibson-Mount quanah@zimbra.com wrote:
On Aug 30, 2013, at 2:31 PM, Clint Petty cpetty@luthresearch.com wrote:
I.e., you need to look at /tmp/ldif that you generated via slapcat.
--Quanah
Ok, I cleaned up the /tmp/ldif file, and added the database: # slapadd -F /usr/local/etc/openldap/slapd.d -n 1 -l /tmp/ldif 52210b14 bdb_monitor_db_open: monitoring disabled; configure monitor database to enable _#################### 100.00% eta none elapsed none fast! Closing DB... #
Then tried starting slapd: # service slapd start slapd: [INFO] Using /etc/default/slapd for configuration slapd: [INFO] Launching OpenLDAP configuration test... slapd: [OK] OpenLDAP configuration test successful slapd: [INFO] No db_recover done slapd: [INFO] Launching OpenLDAP... slapd: [OK] File descriptor limit set to 1024 slapd: [ALERT] No PID file for OpenLDAP
Then tried starting slapd in debug mode: # /usr/local/openldap/libexec/slapd -d -1 -u ldap -F /usr/local/etc/openldap/slapd.d -h ldapi:/// 52210bda slapd startup: initiated. 52210bda backend_startup_one: starting "cn=config" 52210bda config_back_db_open Backend ACL: access to * by * none 52210bda config_back_db_open: line 0: warning: cannot assess the validity of the ACL scope within backend naming context 52210bda backend_startup_one: starting "dc=luthresearch,dc=net" 52210bda bdb_db_open: "dc=luthresearch,dc=net" 52210bda bdb_db_open: database "dc=luthresearch,dc=net": alock package is unstable. 52210bda backend_startup_one (type=bdb, suffix="dc=luthresearch,dc=net"): bi_db_open failed! (-1) 52210bda slapd shutdown: initiated 52210bda ====> bdb_cache_release_all 52210bda slapd destroy: freeing system resources. 52210bda syncinfo_free: rid=002 52210bda slapd stopped.
Saw that alock package is unstable, so removed the alock file and ran db_recover (which recreated the alock file). Then tried starting slapd in debug mode again: # /usr/local/openldap/libexec/slapd -d -1 -u ldap -F /usr/local/etc/openldap/slapd.d -h ldapi:/// 52210d17 slapd startup: initiated. 52210d17 backend_startup_one: starting "cn=config" 52210d17 config_back_db_open Backend ACL: access to * by * none
52210d17 config_back_db_open: line 0: warning: cannot assess the validity of the ACL scope within backend naming context 52210d17 backend_startup_one: starting "dc=luthresearch,dc=net" 52210d17 bdb_db_open: "dc=luthresearch,dc=net" 52210d17 bdb_db_open: database "dc=luthresearch,dc=net": dbenv_open(/var/lib/ldap). 52210d17 bdb(dc=luthresearch,dc=net): /var/lib/ldap/log.0000000003: log file unreadable: Permission denied 52210d17 bdb(dc=luthresearch,dc=net): PANIC: Permission denied 52210d17 bdb(dc=luthresearch,dc=net): Invalid log file: log.0000000003: DB_RUNRECOVERY: Fatal error, run database recovery 52210d17 bdb(dc=luthresearch,dc=net): PANIC: DB_RUNRECOVERY: Fatal error, run database recovery 52210d17 bdb(dc=luthresearch,dc=net): unable to join the environment 52210d17 bdb_db_open: database "dc=luthresearch,dc=net" cannot be opened, err -30975. Restore from backup! 52210d17 ====> bdb_cache_release_all 52210d17 bdb(dc=luthresearch,dc=net): txn_checkpoint interface requires an environment configured for the transaction subsystem 52210d17 bdb_db_close: database "dc=luthresearch,dc=net": txn_checkpoint failed: Invalid argument (22). 52210d17 backend_startup_one (type=bdb, suffix="dc=luthresearch,dc=net"): bi_db_open failed! (-30975) 52210d17 slapd shutdown: initiated 52210d17 ====> bdb_cache_release_all 52210d17 bdb_db_close: database "dc=luthresearch,dc=net": alock_close failed 52210d17 slapd destroy: freeing system resources. 52210d17 syncinfo_free: rid=002 52210d17 slapd stopped. #
Fixed the permissions error, and now get: # /usr/local/openldap/libexec/slapd -d -1 -u ldap -F /usr/local/etc/openldap/slapd.d -h ldapi:/// 52210e6f slapd startup: initiated. 52210e6f backend_startup_one: starting "cn=config" 52210e6f config_back_db_open Backend ACL: access to * by * none
52210e6f config_back_db_open: line 0: warning: cannot assess the validity of the ACL scope within backend naming context 52210e6f backend_startup_one: starting "dc=luthresearch,dc=net" 52210e6f bdb_db_open: "dc=luthresearch,dc=net" 52210e6f bdb_db_open: database "dc=luthresearch,dc=net": dbenv_open(/var/lib/ldap). 52210e6f bdb(dc=luthresearch,dc=net): Unacceptable log file /var/lib/ldap/log.0000000003: unsupported log version 14 52210e6f bdb(dc=luthresearch,dc=net): Invalid log file: log.0000000003: Invalid argument 52210e6f bdb(dc=luthresearch,dc=net): PANIC: Invalid argument 52210e6f bdb(dc=luthresearch,dc=net): unable to join the environment 52210e6f bdb_db_open: database "dc=luthresearch,dc=net" cannot be opened, err -30975. Restore from backup! 52210e6f ====> bdb_cache_release_all 52210e6f bdb(dc=luthresearch,dc=net): txn_checkpoint interface requires an environment configured for the transaction subsystem 52210e6f bdb_db_close: database "dc=luthresearch,dc=net": txn_checkpoint failed: Invalid argument (22). 52210e6f backend_startup_one (type=bdb, suffix="dc=luthresearch,dc=net"): bi_db_open failed! (-30975) 52210e6f slapd shutdown: initiated 52210e6f ====> bdb_cache_release_all 52210e6f bdb_db_close: database "dc=luthresearch,dc=net": alock_close failed 52210e6f slapd destroy: freeing system resources. 52210e6f syncinfo_free: rid=002 52210e6f slapd stopped. #
Clint
Fairly obvious. You ran slapadd as root and slapd runs as a different user. Use slapadd as the same user as slapd uses or fix the permissions with champs
chmod even. Stupid autocorrect.
sheesh... chown even. :p