Open Directory Unable to load replica list

Hi everyone -


Had a server force shut down earlier today, and once rebooted I'm having issues with open directory. I have rebooted multiple times, basically to make sure that the initial (non-planned) shut down wasn't causing the issue, but it has persisted.


When I open the Server application (version 5.3.1 on OS X 10.12.6) and navigate to the Open Directory page, under Servers I only see "Unable to load replica list".


It appears that the master directory is running correctly... at the top of the Open Directory page, Status is green and says "Available at [server address]".


On a different Community post I found a recommendation to run the following command as a test:

sudo /usr/libexec/slapd -Tt | pbcopy


I ran this on the computer and got a response in the attached screen shot.


Does this make sense to anyone? Any suggestions?


Appreciate any help... kind of dead in the water right now.

Posted on Jan 7, 2020 9:52 AM

Reply
Question marked as Top-ranking reply

Posted on Jan 7, 2020 4:16 PM

If you want to repair OD, you should stop the service first, then run the repair. Do you actually have a master and a replica? If so, you should stop the service on both servers. Here is what has worked in the past:


## Stop the service

sudo launchctl unload /System/Library/LaunchDaemons/org.openldap.slapd.plist


## Run the db_recover tool and attempt to repair the damage. First try and repair the LDAP data.

sudo db_recover -v -h /var/db/openldap/openldap-data/


## Next, repair the authentication data.

sudo db_recover -cv -h /var/db/openldap/authdata/


## Check the configuration file using:

sudo /usr/libexec/slapd -Tt


## Reboot the server or start slapd using:

sudo launchctl load /System/Library/LaunchDaemons/org.openldap.slapd.plist


Let me know if it helped.


Reid Bundonis

Carbon Technologies

2 replies
Question marked as Top-ranking reply

Jan 7, 2020 4:16 PM in response to jake_stage

If you want to repair OD, you should stop the service first, then run the repair. Do you actually have a master and a replica? If so, you should stop the service on both servers. Here is what has worked in the past:


## Stop the service

sudo launchctl unload /System/Library/LaunchDaemons/org.openldap.slapd.plist


## Run the db_recover tool and attempt to repair the damage. First try and repair the LDAP data.

sudo db_recover -v -h /var/db/openldap/openldap-data/


## Next, repair the authentication data.

sudo db_recover -cv -h /var/db/openldap/authdata/


## Check the configuration file using:

sudo /usr/libexec/slapd -Tt


## Reboot the server or start slapd using:

sudo launchctl load /System/Library/LaunchDaemons/org.openldap.slapd.plist


Let me know if it helped.


Reid Bundonis

Carbon Technologies

Jan 8, 2020 6:21 AM in response to Strontium90

Hi Reid -


Thanks for the quick response.


Step #2 yielded the following:


sudo db_recover -v -h /var/db/openldap/openldap-data/

Finding last valid log LSN: file: 1 offset 10101490

Recovery starting from [1][10101342]

Recovery complete at Wed Jan  8 09:17:46 2020

Maximum transaction ID 80000567 Recovery checkpoint [1][10101490]


When I got to step #3 I got the following return:


$ sudo db_recover -cv -h /var/db/openldap/authdata/

Finding last valid log LSN: file: 66301 offset 1588685

db_recover: DB_LOGC->get: LSN 66300/142518: invalid log record header

db_recover: Log file corrupt at LSN: [66300][142462]

db_recover: PANIC: Invalid argument

db_recover: process-private: unable to find environment

db_recover: DB_ENV->open: DB_RUNRECOVERY: Fatal error, run database recovery


Can't imagine that's good.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Open Directory Unable to load replica list

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