Results 1 to 3 of 3

Thread: Migrating from OSX 4.5.10GA

Hybrid View

  1. #1
    Join Date
    Mar 2007
    Posts
    26
    Rep Power
    8

    Default Migrating from OSX 4.5.10GA

    HI.

    Struggling a bit, despite looking at various threads here:

    http://www.zimbra.com/forums/install...ew-server.html
    http://www.zimbra.com/blog/archives/...er_server.html

    I'm trying to migrate an existing Zimbra setup from OSX (4.5.10GA) to Debian 4 on a Xen DomU. So far, as a sanity check, my first step was to make sure that Zimbra 5.0RC2 works on the DomU, which it does if I install and set it up from scratch.

    So as the first part of my migration, I set up another DomU running Debian Sarge and installed ZCS 4.5.10GA on that.

    I then copied over an rsync backup from the Mac of /opt/zimbra and also an exported ldap.ldif file exported on the Mac generated using:

    su zimbra
    /opt/zimbra/openldap/sbin/slapcat -f /opt/zimbra/conf/slapd.conf -l /tmp/ldap.ldif

    I've cat'd the ldif and it has entries for the various user accounts, aliases etc.

    Moving onto the Debian Sarge DomU, I do an ./install.sh -s to setup the system. Then, given the binaries from my Mac are going to be incompatible for importing the ldap.ldif file, I did NOT blow away the /opt/zimbra directory, but I copied the /opt/zimbra/conf/slapd.conf file and /opt/zimbra/openldap-data/ directory from the Mac to the Debian Sarge DomU, and ran the zmfixperms script.

    su zimbra
    /opt/zimbra/openldap/sbin/slapadd -f /opt/zimbra/conf/slapd.conf -l /root/ldap.ldif

    Which reports:

    The first database does not allow slapadd; using the first available one (2)
    bdb_db_open: Warning - No DB_CONFIG file found in directory /opt/zimbra/openldap-data: (2)
    Expect poor performance for suffix .
    bdb(): Program version 4.2 doesn't match environment version
    bdb_db_open: Database cannot be opened, err 22. Restore from backup!
    bdb(): DB_ENV->lock_id_free interface requires an environment configured for the locking subsystem
    bdb(): txn_checkpoint interface requires an environment configured for the transaction subsystem
    bdb_db_close: txn_checkpoint failed: Invalid argument (22)
    backend_startup_one: bi_db_open failed! (22)
    slap_startup failed
    So, I emptied the contents of /opt/zimbra/openldap-data and tried again:

    The first database does not allow slapadd; using the first available one (2)
    bdb_db_open: Warning - No DB_CONFIG file found in directory /opt/zimbra/openldap-data: (2)
    Expect poor performance for suffix .
    but otherwise seems to populate the DB tables. After this I moved /opt/zimbra/openldap-data/ to /root/ldap_import_backup and blew away /opt/zimbra.

    Now I moved the entire /opt/zimbra backup from the Mac to the Debian DomU, and replaced the /opt/zimbra/openldap-data with the backup I just made above.

    Then I do one more ./install.sh to upgrade the Zimbra setup, ignoring the mail store check, but selecting the upgrade options, which oddly asks me for the password shutting down Zimbra mail (which isn't running) about 5 times (first time I tried entering the admin password which would have been in the ldap dump, and the last few times I just pressed Return).

    After the packages get installed, the installer tries to start up Zimbra, but none of the default settings are populated:

    Setting defaults from saved config in /opt/zimbra/.saveconfig/config.save
    HOSTNAME=
    LDAPHOST=
    LDAPPORT=
    SNMPTRAPHOST=
    SMTPSOURCE=
    SMTPDEST=
    SNMPNOTIFY=0
    SMTPNOTIFY=0
    LDAPROOTPW=
    LDAPZIMBRAPW=
    Restoring existing configuration file from /opt/zimbra/.saveconfig/config.save...done
    Operations logged to /tmp/zmsetup.log.10848
    ERROR: service.FAILURE (system failure: getDirectContext) (cause: javax.naming.CommunicationException localhost:389)
    ERROR: service.FAILURE (system failure: getDirectContext) (cause: javax.naming.CommunicationException localhost:389)
    Setting defaults...Done
    Setting defaults from existing config...Warning: null valued key 'mysql_logger_root_password'
    Checking for port conflicts
    Checking ldap status
    Starting ldap
    ldap startup failed with exit code 256
    Setting defaults from ldap...ERROR: service.FAILURE (system failure: getDirectContext) (cause: javax.naming.CommunicationException localhost:389)
    ERROR: service.FAILURE (system failure: getDirectContext) (cause: javax.naming.CommunicationException localhost:389)
    and I'm required to set the hostname etc in the main menu?! This includes parameters like HTTP Port, HTTPS Port, POP ports etc. So I set them, save the config and quit.

    Then I try to start Zimbra and I get:

    Host XXXXXXXX.XXXXXXX.com
    Unable to determine enabled services from ldap.
    Unable to determine enabled services. Cache is out of date or doesn't exist.
    Joy. Luckily trying to do an 'ldap start' gives me more meaningful stuff:

    zimbra@mail:/usr/src/zcs$ ldap start
    ldap_url and ldap_master_url cannot be the same on an ldap replica
    So I fire up zmlocalconfig and see that ldap_host, ldap_port, ldap_url, ldap_master_url are blank, and ldap_is_master is set to false!?

    Ok, so I set them to what they should be, and try 'ldap start' again:

    zimbra@mail:/usr/src/zcs$ ldap start
    /opt/zimbra/bin/ldap: line 55: kill: (6321) - No such process
    Failed to start slapd. Attempting debug start to determine error.
    bdb(): PANIC: DB_RUNRECOVERY: Fatal error, run database recovery
    bdb_db_close: txn_checkpoint failed: Invalid argument (22)
    backend_startup_one: bi_db_open failed! (-30978)
    bdb_db_close: alock_close failed
    Ok, now I'm completely stumped and fearing that my only solution is going to be an imapsync from 4.5.10GA to the deployment on the DomU. Is there anything I'm missing?

    Thanks in advance.

    Mezza

  2. #2
    Join Date
    Jan 2007
    Location
    Minnesota
    Posts
    719
    Rep Power
    9

    Default

    You probably need to start with

    su - zimbra

    The "-" gets you lots of stuff in ~zimbra/.bashrc, so that you're using Zimbra's version of bdb and other libraries, rather than Debian's.

    /opt/zimbra/openldap/sbin/slapcat ... | openssl md5 should return identical answers on the original and the copy. Once you've got that working, the rest should fall into place, as documented elsewhere.

  3. #3
    Join Date
    Mar 2007
    Posts
    26
    Rep Power
    8

    Default su - zimbra

    Hi Rich,

    Thanks for the suggestion. It's odd, I'd have thought that just su'ing would have loaded the environment for the zimbra user, but after a quick test just now I see (at least on Mac OS X) it's not the case.

    Will retry exporting the reimporting the LDAP info.

    Thanks.

    Mezza

Similar Threads

  1. Replies: 7
    Last Post: 05-25-2007, 08:40 PM
  2. pre-upgrade questions - osx 4.01 to 4.03
    By gherndon in forum Installation
    Replies: 0
    Last Post: 10-19-2006, 09:03 AM
  3. OSX OpenLdap
    By kraftygreg in forum Installation
    Replies: 4
    Last Post: 10-17-2006, 09:27 PM
  4. Installing Zimbra using OSX LDAP
    By camiriddle in forum Installation
    Replies: 2
    Last Post: 07-13-2006, 07:17 PM
  5. Clues to OsX Daily Crashes:
    By s3nz3x in forum Installation
    Replies: 3
    Last Post: 12-05-2005, 05:46 AM

Posting Permissions

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