Upgrade from 7.2.0 to 8.0 fail with ldap error

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
User avatar
quanah
Zimbra Alumni
Zimbra Alumni
Posts: 1667
Joined: Fri Sep 12, 2014 10:33 pm
Contact:

Upgrade from 7.2.0 to 8.0 fail with ldap error

Postby quanah » Fri Sep 28, 2012 1:11 pm

That is correct.


--
Quanah Gibson-Mount
Product Architect, Symas http://www.symas.com/
OpenLDAP Core team http://www.openldap.org/project/
undersys
Posts: 30
Joined: Sat Sep 13, 2014 1:16 am

Upgrade from 7.2.0 to 8.0 fail with ldap error

Postby undersys » Mon Oct 22, 2012 10:30 pm

My error :-



Sun Oct 21 23:27:10 2012 This appears to be 7.2.0_GA

Sun Oct 21 23:27:10 2012 Setting local config ssl_allow_untrusted_certs to true

Sun Oct 21 23:27:10 2012 *** Running as zimbra user: /opt/zimbra/bin/zmlocalconfig -f -e ssl_allow_untrusted_certs='true' 2> /dev/null

Sun Oct 21 23:27:11 2012 Error: /opt/zimbra/data/ldap/ldap.bak is empty

Sun Oct 21 23:27:11 2012 UPGRADE FAILED - exiting.


I see that release "8.0.1_GA_5512" , should have a fix to prevent this happening ?

According to :-


Should">https://bugzilla.zimbra.com/show_bug.cgi?id=77623
Should
I just wait till 8.0.1 ?
If not, I am not sure when to run the following steps as zimbra user :-



cd /opt/zimbra/data/ldap

mv mdb mdb.old

mkdir -p mdb/db

/opt/zimbra/openldap/sbin/slapadd -q -b '' -F /opt/zimbra/data/ldap/config -l

/opt/zimbra/data/ldap/ldap.80


Do I run that after I get the failed install?

Do I then re run the install ?

or what? :confused:
User avatar
quanah
Zimbra Alumni
Zimbra Alumni
Posts: 1667
Joined: Fri Sep 12, 2014 10:33 pm
Contact:

Upgrade from 7.2.0 to 8.0 fail with ldap error

Postby quanah » Mon Oct 22, 2012 10:49 pm

8.0.1 would not help you with this. A zero sized ldap.bak means that the export done when 7.2.0 was uninstalled failed -- I.e., the problem occurred before you even started upgrading to ZCS 8. It would generally indicate an inability to write to disk.
--
Quanah Gibson-Mount
Product Architect, Symas http://www.symas.com/
OpenLDAP Core team http://www.openldap.org/project/
undersys
Posts: 30
Joined: Sat Sep 13, 2014 1:16 am

Upgrade from 7.2.0 to 8.0 fail with ldap error

Postby undersys » Mon Oct 22, 2012 11:02 pm

Hi quanah,
Thanks for your time.
Ouch that sounds bad. I noticed this in "dmesg" :-

slapadd[31263] general protection ip:4eeba8 sp:7faf2a7998c0 error:0

slapadd[31229] general protection ip:4eeba8 sp:7fff27b435c0 error:0 in slapd[400000+14e000]

slapadd[31261] general protection ip:4eeba8 sp:7faf2b79b8c0 error:0

slapadd[31262] general protection ip:4eeba8 sp:7faf2af9a8c0 error:0 in slapd[400000+14e000]

in slapd[400000+14e000]

in slapd[400000+14e000]


I can't see the above happening recently.

I can't see why zimbra would have issues writing to disk.

What is the command that generates ldap.bak during uninstall ?

I can generate the ldap.bak file by hand :-

[zimbra]$ /opt/zimbra/libexec/zmslapcat /tmp/dmp/

[zimbra]$ /opt/zimbra/libexec/zmslapcat -c /tmp/dmp/



So why would it fail during upgrade ?
is there any way i can find out whats going on?
User avatar
quanah
Zimbra Alumni
Zimbra Alumni
Posts: 1667
Joined: Fri Sep 12, 2014 10:33 pm
Contact:

Upgrade from 7.2.0 to 8.0 fail with ldap error

Postby quanah » Tue Oct 23, 2012 12:03 am

On upgrade, when 7.x is uninstalled, it runs zmslapcat to /opt/zimbra/data/ldap. You should see an "ldap.bak" file there. That is what zmupgrade.pm loads to process for upgrading to ZCS 8, before anything else is done. The error you have indicates that "ldap.bak" existed, but was zero size. Can you confirm?
--
Quanah Gibson-Mount
Product Architect, Symas http://www.symas.com/
OpenLDAP Core team http://www.openldap.org/project/
undersys
Posts: 30
Joined: Sat Sep 13, 2014 1:16 am

Upgrade from 7.2.0 to 8.0 fail with ldap error

Postby undersys » Tue Oct 23, 2012 12:40 am

Hi Quanah,
Thanks for your efforts!
I restored back to 7.2 after it failed.
Looking at the 7.2 directory looks fine :-

$ ls -la /opt/zimbra/data/ldap

total 940

drwxr-xr-x 4 zimbra zimbra 4096 May 19 11:38 .

drwxr-xr-x 11 zimbra zimbra 4096 Feb 10 2011 ..

drwxr-xr-x 3 zimbra zimbra 4096 Mar 25 2012 config

drwxr-xr-x 4 zimbra zimbra 4096 Jul 8 2010 hdb

-rw-r----- 1 zimbra zimbra 122013 May 19 11:38 ldap.bak

-rw-r----- 1 zimbra zimbra 95217 Feb 10 2011 ldap.bak.20110210195118

-rw-r----- 1 zimbra zimbra 108525 Jun 5 2011 ldap.bak.20110605052847

-rw-r----- 1 zimbra zimbra 120448 Aug 25 2011 ldap.bak.20110825182921

-rw-r----- 1 zimbra zimbra 121381 Oct 11 2011 ldap.bak.20111011125335

-rw-r----- 1 zimbra zimbra 121157 Mar 25 2012 ldap.bak.20120325133153

-rw-r----- 1 zimbra zimbra 121941 Apr 19 2012 ldap.bak.20120419135640

-rw-r----- 1 zimbra zimbra 122013 May 19 11:38 ldap.bak.20120519113806


I made a copy of the 8.0 upgrade fail and indeed there is a ldap.back file at 0 bytes

Take a look :-

# ls -la

total 1.2M

drwxr-xr-x 8 root root 4.0K Oct 21 23:41 .

drwxr-xr-x 12 root root 4.0K Oct 21 23:42 ..

drwxr-xr-x 3 root root 4.0K Oct 21 23:41 config

drwxr-xr-x 4 root root 4.0K Oct 21 23:41 hdb

-rw-r--r-- 1 root root 119K Oct 21 23:41 ldap.80

-rw-r----- 1 root root 0 Oct 21 23:41 ldap.bak

-rw-r----- 1 root root 93K Oct 21 23:41 ldap.bak.20110210195118

-rw-r----- 1 root root 106K Oct 21 23:41 ldap.bak.20110605052847

-rw-r----- 1 root root 118K Oct 21 23:41 ldap.bak.20110825182921

-rw-r----- 1 root root 119K Oct 21 23:41 ldap.bak.20111011125335

-rw-r----- 1 root root 119K Oct 21 23:41 ldap.bak.20120325133153

-rw-r----- 1 root root 120K Oct 21 23:41 ldap.bak.20120419135640

-rw-r----- 1 root root 120K Oct 21 23:41 ldap.bak.20120519113806

-rw-r----- 1 root root 118K Oct 21 23:41 ldap.bak.20121021224302

-rw-r----- 1 root root 0 Oct 21 23:41 ldap.bak.20121021224816

-rw-r----- 1 root root 0 Oct 21 23:41 ldap.bak.20121021225255

-rw-r----- 1 root root 0 Oct 21 23:41 ldap.bak.20121021225721

-rw-r----- 1 root root 0 Oct 21 23:41 ldap.bak.20121021230219

-rw-r----- 1 root root 119K Oct 21 23:41 ldap.bak.20121021231415

-rw-r----- 1 root root 0 Oct 21 23:41 ldap.bak.20121021232404

-rw-r----- 1 root root 0 Oct 21 23:41 ldap.bak.20121021232821

-rw-r----- 1 root root 0 Oct 21 23:41 ldap.bak.20121021233454

drwxr-xr-x 3 root root 4.0K Oct 21 23:41 mdb

drwxr-xr-x 3 root root 4.0K Oct 21 23:41 mdb.old

drwxr-x--- 3 root root 4.0K Oct 21 23:41 mdb.prev

drwxr-xr-x 3 root root 4.0K Oct 21 23:41 mdb.prev.8945


I don't understand why ?

7.2 works and currently is working ( Love backups!).
Thank you
User avatar
quanah
Zimbra Alumni
Zimbra Alumni
Posts: 1667
Joined: Fri Sep 12, 2014 10:33 pm
Contact:

Upgrade from 7.2.0 to 8.0 fail with ldap error

Postby quanah » Tue Oct 23, 2012 12:44 pm

Well, the first thing I see is that the permissions on the 8.0 location are entirely wrong (root:root vs zimbra:zimbra). Although I can't tell if that's an artifact of how you copied the 8.0 backup over. At a guess, I'd say it is.
Also, you apparently have had multiple backup failures? Given the number of zero-sized ldap.bak files. It is also puzzlign why there are so many with the 2012/10/21 timestamp all around the same time of day. It is like you ran backups while the install was happening or something? In any case, I'd snapshot your installation and try upgrading to 8.0 again. I've never seen the failure you've encountered before, but it is almost like a backup ran while the upgrade was in progress, while there was no actual DB (because of the migration).
--
Quanah Gibson-Mount
Product Architect, Symas http://www.symas.com/
OpenLDAP Core team http://www.openldap.org/project/
undersys
Posts: 30
Joined: Sat Sep 13, 2014 1:16 am

Upgrade from 7.2.0 to 8.0 fail with ldap error

Postby undersys » Tue Oct 23, 2012 6:05 pm

Hi Quanah,
Remissions are wrong as its just a copy to preserve the failed install , analyse latter. I did not copy permissions.
They are not my backups. That's the upgrade creating them. My backups only run once a week and are cold copies.
The reason why there are more then one .bak file is that I tried to run the installer for 8.0 more then once on the same day.

So i can rule out a backup running anytime near the upgrade. (last one was at least 12 hrs prior) .
I am still worried about just trying the upgrade again. Is there something I can dig into more logs etc ?
User avatar
quanah
Zimbra Alumni
Zimbra Alumni
Posts: 1667
Joined: Fri Sep 12, 2014 10:33 pm
Contact:

Upgrade from 7.2.0 to 8.0 fail with ldap error

Postby quanah » Tue Oct 23, 2012 6:23 pm

ldap.bak in /opt/zimbra/data/ldap is created when you *uninstall* the previous version. You should not be running install.sh multiple times unless you want to guarantee failure.
What you can do, is, on your 7.x server, run install.sh -s from the ZCS 8 system. This will uninstall ZCS 7 and create the backup. Confirm that /opt/zimbra/data/ldap/ldap.bak exists, and is non-zero in size. Then you can run /opt/zimbra/libexec/zmsetup.pl as the root user. I'm guessing that the first, initial installation failed because of other reasons. Most likely the slapadd -q bug that will be fixed in the upcoming 8.0.1 which will be out soon. If it was the slapadd -q bug, you will hit it again when you upgrade to 8.0.0. Easier to just wait for 8.0.1 to be out before upgrading, so you can avoid that.
--Quanah
--
Quanah Gibson-Mount
Product Architect, Symas http://www.symas.com/
OpenLDAP Core team http://www.openldap.org/project/
undersys
Posts: 30
Joined: Sat Sep 13, 2014 1:16 am

Upgrade from 7.2.0 to 8.0 fail with ldap error

Postby undersys » Tue Oct 23, 2012 7:30 pm

Hi Quanah,
Thanks for all your time on this matter.
Thanks for the tip on the install script.

If I do run install.sh -s from the ZSC 8 system and my ldap.bak file is empty can i run one of the following to generate it ?
[zimbra]$ /opt/zimbra/libexec/zmslapcat /opt/zimbra/data/ldap/

[zimbra]$ /opt/zimbra/libexec/zmslapcat -c /opt/zimbra/data/ldap/
Then run the "/opt/zimbra/libexec/zmsetup.pl" script ?
I still feel its best to wait for 8.0.1 like you said.
Thanks

Brendan

Return to “Administrators”

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 8 guests