Hello there,

I have tried to upgrade my ZCS 8.0.0 (fresh install last year) to 8.0.4 on SLES 11 SP2 64BIT,

but i got a ldap error during the upgrade process:

Sat Jul 13 02:52:44 2013 *** Running as zimbra user: /opt/zimbra/libexec/zmldapschema 2>/dev/null
Looking for LDAP installation...succeeded
Installing core schema...
Installing cosine schema...
Installing inetOrgPerson schema...
Installing zimbra schema...
Installing amavis schema...
Installing dyngroup schema...
Installing OpenDKIM schema...
Sat Jul 13 02:52:45 2013 Upgrading from 8.0.0_GA_5434 to 8.0.1_GA_5438
Sat Jul 13 02:52:45 2013 Stopping zimbra services...
Sat Jul 13 02:52:45 2013 *** Running as zimbra user: /opt/zimbra/bin/zmcontrol stop
Host mail1.xxx.com
Stopping vmware-ha...Done.
Stopping zmconfigd...Done.
Stopping stats...Done.
Stopping mta...Done.
Stopping spell...Done.
Stopping snmp...Done.
Stopping cbpolicyd...Done.
Stopping archiving...Done.
Stopping antivirus...Done.
Stopping antispam...Done.
Stopping proxy...Done.
Stopping memcached...Done.
Stopping mailbox...Done.
Stopping logger...Done.
Stopping ldap...Done.
Sat Jul 13 02:52:51 2013 done.
Sat Jul 13 02:52:51 2013 Starting mysql...
Sat Jul 13 02:52:51 2013 *** Running as zimbra user: /opt/zimbra/bin/mysql.server start
Starting mysqld...failed.
Sat Jul 13 02:55:19 2013 *** Running as zimbra user: /opt/zimbra/bin/mysql.server start
Starting mysqld...failed.
Sat Jul 13 02:58:05 2013 *** Running as zimbra user: /opt/zimbra/bin/mysql.server start
Starting mysqld...failed.
Sat Jul 13 03:01:19 2013 *** Running as zimbra user: /opt/zimbra/bin/mysql.server start
Starting mysqld...done.
Sat Jul 13 03:02:04 2013 done.
Sat Jul 13 03:02:06 2013 This appears to be 8.0.0_GA
Sat Jul 13 03:02:06 2013 Error: /opt/zimbra/data/ldap/ldap.bak is empty
Sat Jul 13 03:02:06 2013 UPGRADE FAILED - exiting.

I searched around Google and Zimbra forum,

seems the setup is unable to create a ldap backup, and why the backup is unable to locate/load,

so i tried to perform a backup:

/opt/zimbra/libexec/zmslapcat /tmp

51e2e359 mdb_db_open: database "": DN index needs upgrade, run "slapindex entry DN".

It tells me to upgrade DN index, so i perform the following:

/opt/zimbra/openldap-2.4.35.2z/sbin/slapindex -F /opt/zimbra/data/ldap/config entryDN

51e2e3ed The first database does not allow slapindex: using the first available one (2)
51e2e3ed mdb_db_open: database "" cannot be opened, err 12. Restore from backup!
51e2e3ed backend_startup_one (type=mdb, suffix=""): bi_db_open failed! (12)
slap_startup failed

Seems the database is unable to open, i tried to backup the database first:

zimbra@mail1:~> /opt/zimbra/libexec/zmslapcat /tmp
51e2b369 mdb_db_open: database "" cannot be opened, err 12. Restore from backup!
51e2b369 backend_startup_one (type=mdb, suffix=""): bi_db_open failed! (12)
slap_startup failed

I still got the same error, i tried a db_recover:

cd /opt/zimbra/data/ldap/mdb/db
/opt/zimbra/bdb-5.2.36/bin/db_recover
<log.0000000001 is spawned with 10305760 bytes>

I tried to rerun the slapindex command:

/opt/zimbra/openldap-2.4.35.2z/sbin/slapindex -F /opt/zimbra/data/ldap/config entryDN

51e2e3ed The first database does not allow slapindex: using the first available one (2)
51e2e3ed mdb_db_open: database "" cannot be opened, err 12. Restore from backup!
51e2e3ed backend_startup_one (type=mdb, suffix=""): bi_db_open failed! (12)
slap_startup failed

i didn't tune any ldap setting, when i encountered an issue where TO field is unable to input on AJAX mail web interface and i found that 8.0.4 will fix this issue and i am going upgrade my ZCS.

Any ideas or sharing? Please help, thanks!