-
All replies
-
Helpful answers
-
-
Sep 3, 2012 10:47 PM in response to francisfromhavertownby Michael Kennard2,My client just updated to 10.8.1 and lost the Open Directory with this error. Reverse DNS is working and changeip works.
-
Oct 15, 2012 8:21 AM in response to francisfromhavertownby _Franck_,Check this to repair the database, it worked perfectly for me (yes 10.8.2 screwed the openldap db for me)
http://www.prestonlee.com/2009/07/08/recovering-a-corrupt-openldap-database-on-o sx-server/
1. check if this is the problem
$ sudo /usr/libexec/slapd -Tt
2. may be backup openldap db and try repairing
$ sudo db_recover -h /var/db/openldap/openldap-data/
3. check if things were repaired correctly
$ sudo /usr/libexec/slapd -Tt
4. restart the service
-
-
Oct 15, 2012 2:03 PM in response to _Franck_by Kevin Neal,sorry to hijack this post but when I try that command I get:
507c79a9 ldif_read_file: checksum error on "/etc/openldap/slapd.d/cn=config/olcDatabase={1}bdb.ldif"
507c79a9 bdb_monitor_db_open: monitoring disabled; configure monitor database to enable
I have tried destroying the whole OD and starting again but I still get this, any ideas
-
Jan 8, 2013 8:05 PM in response to _Franck_by graced.info,Hello!
$ sudo /usr/libexec/slapd -Tt
gives
50ecebcf olcDbDirectory: value #0: invalid path: No such file or directory
50ecebcf config error processing olcDatabase={1}bdb,cn=config: olcDbDirectory: value #0: invalid path: No such file or directory
slaptest: bad configuration file!
Open Directory was the #1 reason I wanted to use the Server, and it's very disappointing that it stopped working only after a few days.
-
Jan 8, 2013 11:44 PM in response to graced.infoby _Franck_,juste did a quick google search on this, there's a lot of results and info
did you try to repair disk permissions ?
$ diskutil repairPermissions /
-
Jan 9, 2013 7:57 PM in response to _Franck_by graced.info,Thanks Frank,
After the permission repair and sudo /usr/libexec/slapd -Tt this is what I see:
50ee3ba8 bdb_monitor_db_open: monitoring disabled; configure monitor database to enable
50ee3ba8 bdb(cn=authdata): file id2entry.bdb has LSN 1/9422729, past end of log at 1/9068158
50ee3ba8 bdb(cn=authdata): Commonly caused by moving a database from one database environment
50ee3ba8 bdb(cn=authdata): to another without clearing the database LSNs, or by removing all of
50ee3ba8 bdb(cn=authdata): the log files from a database environment
50ee3ba8 bdb(cn=authdata): /var/db/openldap/authdata/id2entry.bdb: unexpected file type or format
50ee3ba8 bdb_db_open: database "cn=authdata": db_open(/var/db/openldap/authdata/id2entry.bdb) failed: Invalid argument (22).
50ee3ba8 backend_startup_one (type=bdb, suffix="cn=authdata"): bi_db_open failed! (22)
slap_startup failed (test would succeed using the -u switch)
I've googled my error messages, too, but only thing that came up for me was this thread, and nothing that I thought was very relevant...
-
Feb 18, 2013 8:10 AM in response to graced.infoby krw,Same issue here:
truffula:~ admin$ sudo /usr/libexec/slapd -Tt
51225150 bdb_monitor_db_open: monitoring disabled; configure monitor database to enable
51225150 bdb(cn=authdata): file id2entry.bdb has LSN 15/5271406, past end of log at 15/4833906
51225150 bdb(cn=authdata): Commonly caused by moving a database from one database environment
51225150 bdb(cn=authdata): to another without clearing the database LSNs, or by removing all of
51225150 bdb(cn=authdata): the log files from a database environment
51225150 bdb(cn=authdata): /var/db/openldap/authdata/id2entry.bdb: unexpected file type or format
51225150 bdb_db_open: database "cn=authdata": db_open(/var/db/openldap/authdata/id2entry.bdb) failed: Invalid argument (22).
51225150 backend_startup_one (type=bdb, suffix="cn=authdata"): bi_db_open failed! (22)
slap_startup failed (test would succeed using the -u switch)
-
Feb 25, 2013 6:37 AM in response to krwby salomo,I also have the same issue. Did anybody find a solution?
-
Jun 6, 2013 11:42 AM in response to _Franck_by neocodesoftware,★HelpfulThanks _Franck_!
I had to do a few more steps than and modify the recover command based on info from Case #2 - http://www.iredmail.org/forum/topic3694-iredmail-support-power-cut-ldap-dont-sta rt.html
1. check if this is the problem
$ sudo /usr/libexec/slapd -Tt
>> bdb_db_open: database "cn=authdata": db_open(/var/db/openldap/authdata/id2entry.bdb) failed: Invalid argument (22).
2. Stop LDAP on OD Master
$ sudo launchctl unload /System/Library/LaunchDaemons/org.openldap.slapd.plist
3. Repair Permissions
$ diskutil repairPermissions /
4. backup openldap db
$ sudo cp /var/db/openldap/authdata/id2entry.bdb /var/db/openldap/authdata/id2entry.bdb.backup
5. repair
$ sudo db_recover -cv -h /var/db/openldap/openldap-data/
>> Recovery complete at Thu Jun 6 11:01:35 2013
>> Maximum transaction ID 8000060e Recovery checkpoint [2][6589846]
6. run repair again to check
$ sudo db_recover -cv -h /var/db/openldap/openldap-data/
>> Finding last valid log LSN: file: 2 offset 6589938
>> Recovery starting from [1][28]
>> Recovery complete at Thu Jun 6 11:02:32 2013
>> Maximum transaction ID 8000060e Recovery checkpoint [2][6589938]
7. double check if things were repaired correctly
$ sudo /usr/libexec/slapd -Tt
>> bdb_monitor_db_open: monitoring disabled; configure monitor database to enable
config file testing succeeded
8. restart the service
$ sudo launchctl load /System/Library/LaunchDaemons/org.openldap.slapd.plist
-
Jul 25, 2013 6:20 AM in response to neocodesoftwareby BMcWhirt,neocodesoftware,
This worked great! Saved my but as I corrupted the db trying to get a FreeBSD Samba server to authentacate. For some reason even timemachien wasnt fixing the problem but this did.
Thanks.
-
Jul 25, 2013 6:30 AM in response to BMcWhirtby neocodesoftware,Awesome! Glad it worked for you too!
-
Sep 24, 2013 9:11 AM in response to francisfromhavertownby S-N-Y,I have the same Problem, i try the 8. steps of neocodesoftware from above, but they doesn't help me.
The command:
sudo /usr/libexec/slapd -Tt
always show this Error:
bdb_db_open: database "cn=authdata": db_open(/var/db/openldap/authdata/id2entry.bdb) failed: Invalid argument (22)
Then after the step 7. from neocodesoftware i also repaired the openldap/auth-data with this repair command:
sudo db_recover -cv -h /var/db/openldap/authdata/
then i restart the service with step 8. from above
sudo launchctl load /System/Library/LaunchDaemons/org.openldap.slapd.plist
and now my Open Directory came back to Live