Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Open directory unable to start up after crash

Hi everyone,


Our OS X Server 10.8.4 crashed. After booting up again open directory doesn't want to start up so LDAP isn't running which means nobody can access their mails or do anything.


When trying to start the Open Directory service in the "Server" app it just says "Unable to load replica list"


Looking at the Open Directory Log after trying to switch it on this is what I get :


2013-06-28 15:22:53.830872 SAST - 43.7184, Module: AppleODClientLDAP - unable to create LDAP connection context - no server specified

2013-06-28 15:22:53.830888 SAST - 43.7184 - Client: opendirectoryd, UID: 0, EUID: 0, GID: 0, EGID: 0

2013-06-28 15:22:53.830888 SAST - 43.7184, Module: AppleODClientLDAP - unable to open connection to LDAP server - unable to create connection context

2013-06-28 15:23:23.832473 SAST - 43.7189 - Client: opendirectoryd, UID: 0, EUID: 0, GID: 0, EGID: 0

2013-06-28 15:23:23.832473 SAST - 43.7189, Module: AppleODClientLDAP - unable to create LDAP connection context - no server specified

2013-06-28 15:23:23.832488 SAST - 43.7189 - Client: opendirectoryd, UID: 0, EUID: 0, GID: 0, EGID: 0

2013-06-28 15:23:23.832488 SAST - 43.7189, Module: AppleODClientLDAP - unable to open connection to LDAP server - unable to create connection context


Does anyone have any advice on how to get it up and running again? I'd hate to lose all my users emails and do the server over. I have a time machine backup of a week ago as well which I guess is the second-to-last resort to restore the entire server from there?


Please help, I'm desperate here

Thanks

J

Posted on Jun 28, 2013 6:39 AM

Reply
7 replies

Jun 28, 2013 7:05 AM in response to JaimeMagiera

Hi JaimeMagiera,


Thanks for the advice, I've switched on the debug logging and it appears that the only recurring errors when I try to start up the service boil down to the fact that the LDAP server is unreachable.


Small clip from the log with the most descriptive error :


"Jun 28 15:58:47 walldesign.co.za servermgrd[120]: -[AccountsRequestHandler(AccountsOpenDirectoryHelpers) openLocalLDAPNodeIfNeeded]: dsLocalLDAP = (null), error = Error Domain=com.apple.OpenDirectory Code=2100 "Connection failed to node '/LDAPv3/127.0.0.1'" UserInfo=0x7f935e5c3f70 {NSLocalizedDescription=Connection failed to node '/LDAPv3/127.0.0.1', NSLocalizedFailureReason=Connection failed to the directory server.}"


I was under the impression that OD needs to run for LDAP to be available?

Dec 9, 2014 3:32 PM in response to JLombard

When my OD fails to start after a crash and db_recover commands don't work, it's always worked for me to restore the odmaster from a backupusing the command:


sudo slapconfig -restoredb /private/var/backups/ServerBackup_OpenDirectoryMaster.sparseimage


I'm careful to keep an independent OD backup with Carbon Copy Cloner and this preflight script.


You can also grab an earlier version of the sparse image ServerBackup_OpenDirectoryMaster.sparseimage from a Time Machine backup. It's also possible to rsync the database files directory from a Time Machine backup.

Dec 9, 2014 3:34 PM in response to JLombard

I was able to restore the existing server with the automatic OD backup that Server.app creates. When my OD fails to start after a crash and db_recover commands don't work, it's always worked for me to restore the odmaster from a backupusing the command:


sudo slapconfig -restoredb /private/var/backups/ServerBackup_OpenDirectoryMaster.sparseimage


I'm careful to keep an independent OD backup with Carbon Copy Cloner and this preflight script.


You can also grab an earlier version of the sparse image ServerBackup_OpenDirectoryMaster.sparseimage from a Time Machine backup. It's also possible to rsync the database files directory from a Time Machine backup.

Open directory unable to start up after crash

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.