Results 1 to 4 of 4

Thread: Failed upgrade 8.0.0 -> 8.0.6

  1. #1
    Join Date
    May 2009
    Posts
    7
    Rep Power
    6

    Default Failed upgrade 8.0.0 -> 8.0.6

    I am currently running 8.0.0 (FOSS) on Ubuntu 12.04LTS in a KVM container. All is working OK and I have done upgrades before on this same system. I now need to upgrade to 8.0.6. I have a client with the NETWORK edition on the same version who I will also be upgrading so this is by way of a test/dry run (I have a copy on my KVM container to try the upgrade on and can restore as required).

    NOTE: the IP of the copy is, of course, different from the original - could this be a cause of the problem? Is the original IP embedded somewhere? The hostname is the same so any DNS resolving of the FQDN will come back with an incorrect address. I have put the FQDN in the /etc/hosts file with the KVM's IP address.

    I've tried several installs but all fail at the same point with this error:


    HTML Code:
    Running /opt/zimbra/libexec/scripts/migrate20121009-VolumeBlobs.pl
    Tue Feb 25 14:21:18 2014: Verified schema version 91.
    Tue Feb 25 14:21:19 2014: Verified schema version 91.
    Tue Feb 25 14:21:19 2014: Updating DB schema version from 91 to 92.
    Stopping mysql...done.
    Updating from 8.0.1_GA
    Can't call method "get_value" on an undefined value at /opt/zimbra/libexec/zmupgrade.pm line 4445, <OUTPUT> line 3.
    which refers to this:

    HTML Code:
        $result = $ldap->search(
          base=> "$dn",
          filter=>"(objectClass=*)",
          scope => "base",
          attrs => ['olcDbEnvFlags'],
        );
        my $entry=$result->entry($result->count-1);
     >>>   my @attrvals=$entry->get_value("olcDbEnvFlags");  <<<
    
        if (!(@attrvals)) {
          $result = $ldap->modify(
              $dn,
              add =>{olcDbEnvFlags=>["writemap","nometasync"]},
          );
        }
    The only reference I can find for this error refers the "su" problem (https://bugzilla.zimbra.com/show_bug.cgi?id=47713) but when I run the suggested test I get "1" so this should not be the problem here.

    I tried doing an incremantal install from 8.0.0 to 8.0.2 but has the same problem.

    I've installed pax and upgraded the current o/s:

    HTML Code:
    apt-get install pax
    
    apt-get update        # Fetches the list of available updates
    apt-get dist-upgrade  # Installs updates
    and fixed the tables as requested by the installer:

    HTML Code:
    To run the script:
    1. Switch to zimbra user.
    su - zimbra
    2. Stop mailboxd services to avoid email communications that might cause
    an interruption.
    zmmailboxdctl stop
    3. Execute the perl script to upgrade the database tables.
    /opt/zimbra/libexec/scripts/migrate20100913-Mysql51.pl
    4. Start the mailboxd service.
    zmmailboxdctl start
    Any idea what the problem could be? Suggestions of what to try next?

  2. #2
    Join Date
    May 2009
    Posts
    7
    Rep Power
    6

    Default

    I exported the LDAP database so I could take a look at it. There is no entry in either the ldap-config.bak or ldap.bak files for a variable called "olcDbEnvFlags" - which must, I suppose be why this is error is occurring. Should the entry be there? Does this mean the LDAP is corrupted? If so how can I fix it?

  3. #3
    Join Date
    May 2009
    Posts
    7
    Rep Power
    6

    Default

    Quote Originally Posted by johnsw16 View Post
    I exported the LDAP database so I could take a look at it. There is no entry in either the ldap-config.bak or ldap.bak files for a variable called "olcDbEnvFlags" - which must, I suppose be why this is error is occurring. Should the entry be there? Does this mean the LDAP is corrupted? If so how can I fix it?
    I've not had any replies so far. I have tried upgrading from 8.0.0 to 8.0.1 but I get exactly the same error. Is there a known issue with upgrading from 8.0.0? Is there a solution?

    Anyone know how to add the oldDbEnvFlags to LDAP? Could my LDAP be a version behind for any reason? (It all seems to be working OK but just wondered if previous upgrades could have caused the problem?

    Any help would be appreciated?

  4. #4
    Join Date
    May 2009
    Posts
    7
    Rep Power
    6

    Default Solved!

    Quote Originally Posted by johnsw16 View Post
    I've not had any replies so far. I have tried upgrading from 8.0.0 to 8.0.1 but I get exactly the same error. Is there a known issue with upgrading from 8.0.0? Is there a solution?

    Anyone know how to add the oldDbEnvFlags to LDAP? Could my LDAP be a version behind for any reason? (It all seems to be working OK but just wondered if previous upgrades could have caused the problem?

    Any help would be appreciated?
    Finally got the upgrade to work (now on Open source v8.0.6): It is a bit of a hack but in case it helps anyone else here's how I did it.

    (1) Not part of the problem but for completeness

    Code:
    apt-get install pax
    apt-get update          # Fetches the list of available updates
    apt-get dist-upgrade  # Installs updates
    
    Table rebuild required errors:
    
    1. Switch to zimbra user.
    su - zimbra
    2. Stop mailboxd services to avoid email communications that might cause
    an interruption.
    zmmailboxdctl stop
    3. Execute the perl script to upgrade the database tables.
    /opt/zimbra/libexec/scripts/migrate20100913-Mysql51.pl
    4. Start the mailboxd service.
    zmmailboxdctl start
    (2) Edited the zmupgrade.pn script that was failing - clearly you can only do this AFTER a failed upgrade which is not ideal. My install is on a Virtual Machine so I could just rollback to the backup so it is essential to either backup your live server very carefully or (better) create a test install with the same version as the one you are trying to update, upgrade it and then grab the /opt/zimbra/libexec/zmupgrade.pm file to edit.

    The code to edit is around lines 4450 and is part of the upgrade801GA function.

    Code:
    # =============== EDITED ==========================
       # ADDED:
       $result = $ldap->modify(
           $dn,
           add =>{olcDbEnvFlags=>["writemap","nometasync"]},
        );
    
        $result = $ldap->search(
          base=> "$dn",
          filter=>"(objectClass=*)",
          scope => "base",
          attrs => ['olcDbEnvFlags'],
        );
        my $entry=$result->entry($result->count-1);
    
    
    #    my @attrvals=$entry->get_value("olcDbEnvFlags");
    
    #    if (!(@attrvals)) {
    #      $result = $ldap->modify(
    #          $dn,
    #          add =>{olcDbEnvFlags=>["writemap","nometasync"]},
    #      );
    #    }
    #    my @attrvals=$entry->get_value("olcDbEnvFlags");
         my @attrvals=["writemap","nometasync"];
    
        if ($isLdapMaster && $alog == 1) {
       # ADDED:
       $result = $ldap->modify(
           $dn,
           add =>{olcDbEnvFlags=>["writemap","nometasync"]},
        );
    
          $result = $ldap->search(
            base=> "olcDatabase={2}mdb,cn=config",
            filter=>"(objectClass=*)",
            scope => "base",
            attrs => ['olcDbEnvFlags'],
          );
          my $entry=$result->entry($result->count-1);
          #my @attrvals=$entry->get_value("olcDbEnvFlags");
      
    #      if (!(@attrvals)) {
    #        $result = $ldap->modify(
    #            "olcDatabase={2}mdb,cn=config",
    #            add =>{olcDbEnvFlags=>["writemap","nometasync"]},
    #        );
    #      }
    #    my @attrvals=$entry->get_value("olcDbEnvFlags");
         my @attrvals=["writemap","nometasync"];
        }
    # =============== END EDITED ==========================
    The essence of the changes are to do the ldap modify first - I'm not sure this actually does anything works as when I tried this change WITHOUT manually setting the @attrvals array I had exactly the same failure as before. So, instead of using "get_value" to read the olcDbEnvFlags variable into the array I have just set it.

    Save this file outside the untar'd zcs-8.0.6.... directory.

    (3) Edit the install.sh script so that after replacing the packages with the new ones it replaces the supplied zmupgrade.pm script with my edited one before continuing. Around line 280:

    Code:
    for i in $INSTALL_PACKAGES; do
    	installPackage "$i"
    done
    D=`date +%s`
    echo "${D}: INSTALL SESSION COMPLETE" >> /opt/zimbra/.install_history
    
    # =========== ADDED ===============
    echo "Move new zmupgrade script...."
    cp -f /root/zmupgrade.pm /opt/zimbra/libexec/zmupgrade.pm
    echo " ...done."
    # =========== ADDED ===============
    (4) Run the install.sh script as normal.

    After the 8.0.0 -> 8.0.1 upgrade has complete the other updates work as expected so it looks as if this is a problem with the upgrade from 8.0.0 to 8.0.1 and should not affect other upgrades.

    Having go my own live and test Open source version upgraded I have to tackle the NETWORK version for a client....

Similar Threads

  1. Upgrade 8.0.2 -> 8.0.3 failed: Failed to start slapd
    By pavelbrylov in forum Administrators
    Replies: 3
    Last Post: 03-24-2013, 10:58 AM
  2. Upgrade to Zimbra 8 failed - script failed with code 256
    By dm4creavil in forum Administrators
    Replies: 0
    Last Post: 10-02-2012, 06:53 AM
  3. Replies: 1
    Last Post: 09-17-2010, 04:14 PM
  4. Replies: 7
    Last Post: 02-15-2010, 07:55 PM
  5. failed upgrade, failed restore, big trouble
    By feralcoder in forum Installation
    Replies: 2
    Last Post: 03-19-2007, 05:38 PM

Tags for this Thread

Posting Permissions

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