I followed the replication example on the WIKI

http://wiki.zimbra.com/index.php?title=LDAP

Everything worked perfectly for the first day, every change on one server was replicated on the other.

The next day the server was rebooted and I restarted Zimbra on the SLAVE, it did not start. So I looked at the code in zmcontrol and found out how it worked out what to start. It was connecting to the LDAP database to work out if it needed to start services, including the local LDAP (unless the ldap url and localhost are the same). After more investigation I found that "ldap_url" in "conf/localconfig.xml" contained "ldap://slave.mydomain.com".

I changed this value to "ldap://master.mydomain.com" and now the local LDAP server started up perfectly... but no more replication.

I have tried changing that back, and the LDAP server won't even start with it set to slave.

The MASTER has not been changed, and has not been restarted. I can't re-run the "zmldapenablereplica" because it complains that there is then duplicate entries in the database?

So two questions: What is the right value for conf/localconfig.xml, and why has the replication stopped.

Here is the actual config file (domains changed)

Code:
<?xml version="1.0" encoding="UTF-8"?>

<localconfig>
  <key name="zimbra_server_hostname">
    <value>slave.mydomain.com</value>
  </key>
  <key name="zimbra_uid">
    <value>1000</value>
  </key>
  <key name="ldap_root_password">
    <value>TheMasterPassword</value>
  </key>
  <key name="zimbra_user">
    <value>zimbra</value>
  </key>
  <key name="ssl_allow_untrusted_certs">
    <value>TRUE</value>
  </key>
  <key name="mysql_logger_root_password">
    <value>TheMySQLRootPassword</value>
  </key>
  <key name="ldap_url">
<!-- The original value, that won't start the LDAP server
    <value>ldap://slave.mydomain.com</value>
-->
    <value>ldap://master.mydomain.com</value>
  </key>
  <key name="ldap_master_url">
    <value>ldap://master.mydomain.com:389</value>
  </key>
  <key name="zimbra_gid">
    <value>104</value>
  </key>
  <key name="av_notify_user">
    <value>admin@slave.mydomain.com</value>
  </key>
  <key name="zimbra_ldap_password">
    <value>TheMasterPassword</value>
  </key>
  <key name="zimbra_logger_mysql_password">
    <value>TheMySQLPassword</value>
  </key>
</localconfig>
Thanks

Scott