“An error occurred while configuring <your_server_name> as a directory replica. Please check your network configuration and try again"
A great place to begin hunting for more information on this is the slapconfig section of the Console app on the replica machine (under /Library/Logs/slapconfig.log). Click on that and you may see one or both of the following:
NSMutableDictionary *_getRootDSE(const char *): rootDSE not found
Password change failed because password does not meet minimum quality requirements
You can also try this command on the replica and see what the output is:
sudo /usr/sbin/slapconfig -preflightreplica <your_server_ip> diradmin
I’ve experienced a few things that can cause this (of course, as always, be sure to have a backup, and, ideally, a bootable clone, of your system before trying any of these):
1. As is always wise with Open Directory, make sure DNS is set up properly on both the master and replica, by opening terminal and running this command on each one, and you want to see “success” as the result:
sudo changeip -checkhostname
2. Having SSL enabled: for troubleshooting, you can try un-checking the “SSL” box in the LDAP section of Directory Utility on the OD master machine. Keep in mind: this can be a useful troubleshooting step, but this obviously disables encrypted communication between the master and replica.
3. Password policy restriction: one time I experienced this problem creating a replica on a Yosemite server, and the issue turned out to be related to password policies on the OD Master (you can view or change the password policy in Yosemite server by opening the Server App, clicking on “Users” on the left, and then clicking on “Local Network Users” at the top of the user list. Then click the padlock icon that appears beneath the user list and authenticate, and then click the gearwheel [to the right of the padlock], and select “Edit Password Policy.”).
In my case, I went into the password policy configuration, and in addition to the “Disable login” and "Passwords must” sections that normally appear, there was a third section at the bottom which listed a number of plist files, which were listed as having been created outside the Server App. I removed those polices and then the promotion to OD replica worked fine. You can also try removing all the policy restrictions (again, as a troubleshooting step), and see if that helps.