Results 1 to 5 of 5

Thread: Replication Failed after it was working

  1. #1
    Join Date
    Mar 2006
    Posts
    41
    Rep Power
    9

    Default Replication Failed after it was working

    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

  2. #2
    Join Date
    Nov 2005
    Location
    London, ON
    Posts
    255
    Rep Power
    10

    Default

    Firstly I wouldn't recommend editting localconfig.xml by hand, use the zmlocalconfig tool.

    ldap_url should contain both LDAP servers master and replica. Thats what I have in mine.
    zmlocalconfig -e ldap_url="ldap://master.mydomain.com ldap://slave.mydomain.com"

    ldap_master_url should obviously only contain the master ldap url.
    zmlocalconfig -e ldap_master_url=ldap://master.mydomain.com

    My suggestion is to attempt to re-enable replication by editting /opt/zimbra/config/slapd.conf

    Code:
    syncrepl rid=100
            provider=ldap://master.mydomain.com:389
            type=refreshAndPersist
            schemachecking=off
            updatedn="uid=zimbrareplication,cn=admins,cn=zimbra"
            bindmethod=simple
            binddn="uid=zimbra,cn=admins,cn=zimbra"
            credentials=ldappassword
    updateref  ldap://master.mydomain.com:389
    Change everything in blue.

  3. #3
    Join Date
    Mar 2006
    Posts
    41
    Rep Power
    9

    Default

    Thanks for you help.

    All of the information above looks very sensible, so I did the works.

    Set everything as above. Triple checked it all. Checked LDAP server, Master ldap, manually looked at localconfig to make sure it was correct, check slapd.conf - all fine.

    But... still no replication. I still have 90+ entries on the master, and 31 on the slave. I tried adding a dummy entry, to see if was just out of date, no luck, still only 31.

    What is annoying is that I can't find any logs or errors regarding syncing.

    BTW. I can do this...

    ldapvi -h slave.mydomain.com
    AND
    ldapvi -h master.mydomain.com
    From both machines, so they can definitely talk together.

    Thanks again

    Scott

  4. #4
    Join Date
    Nov 2005
    Location
    London, ON
    Posts
    255
    Rep Power
    10

    Default

    Well in my experience it wasn't instantaneous, but I guess if it has all replicated at the time that I write this then it's not going to. Having gone over the zmldapenablereplica script this is what happens:

    1 creates the LDAP config that i showed you.
    2 creates the replica user
    3 exports ldif file and imports it into replica server.

    there are a few other steps by they are starting or stoping services or verification steps.


    I guess I'm out of ideas, unless one of the zimbra gurus has a better idea, I'd say re-install the replica.

  5. #5
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    19

    Default

    Have you restarted the master and slaves just to make sure they are using the latest config?
    Looking for new beta users -> Co-Founder of Acompli. Previously worked at Zimbra (and Yahoo! & VMware) since 2005.

Similar Threads

  1. LDAP Replication Experiences
    By technikolor in forum Administrators
    Replies: 4
    Last Post: 11-12-2008, 12:52 AM
  2. Upgrade: 4.5.5 -> 4.5.6 failed, LDAP/slapd issues
    By Daimyo in forum Installation
    Replies: 7
    Last Post: 08-04-2007, 10:23 PM
  3. Lotus migration
    By babou in forum Migration
    Replies: 15
    Last Post: 03-05-2007, 10:33 PM
  4. Replies: 18
    Last Post: 03-20-2006, 02:22 PM
  5. Insallation failed (Debian server)
    By popui007 in forum Installation
    Replies: 5
    Last Post: 09-29-2005, 03:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •