Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: [SOLVED] Error Upgrading from Zimbra 5.02 to Zimbra 5.04 OSS

  1. #1
    jvsantosgt is offline Junior Member
    Join Date
    Mar 2008
    Posts
    9
    Rep Power
    7

    Default [SOLVED] Error Upgrading from Zimbra 5.02 to Zimbra 5.04 OSS

    When I try to upgrade to Zimbra 5.04 I get the following error:

    This appears to be 5.0.2_GA
    Redolog Version: 1.22 New Redolog Version: 1.22
    Schema upgrade required
    Running /opt/zimbra/libexec/scripts/migrate20080130-ImapFlags.pl
    Mon Mar 24 20:18:43 2008: Verified schema version 50.
    Mon Mar 24 20:18:44 2008: Adding flags column to mboxgroup1.imap_message.
    ERROR 1060 (42S21) at line 1: Duplicate column name 'flags'
    Mon Mar 24 20:18:44 2008: Error while running '/opt/zimbra/bin/mysql --user=zimbra --password=.prk0K8dvX6oG7NLCbkwr14635qT --database=zimbra --batch --skip-column-names'.
    Script failed with code 256: - exiting
    UPGRADE FAILED - exiting

    Is this a known issue with my schema or do I have to manually fix it? Please help I'm completely lost on what to do next.

  2. #2
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,016
    Rep Power
    24

    Default

    Welcome to the forums

    It sounds like corruption to me in the MySQL tables. Do you have a good backup in case ?

  3. #3
    jvsantosgt is offline Junior Member
    Join Date
    Mar 2008
    Posts
    9
    Rep Power
    7

    Default

    I reverted back to my backup and since then I'm running 5.02, my production server is running OK now, but I would like to upgrade to 5.04.

    When I started the upgrade process I verified the databases and it was OK. Any ideas?

  4. #4
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,016
    Rep Power
    24

    Default

    glad your up and running again. as you have restored and restarted Zimbra would you check your Log Files - Zimbra :: Wiki for any error messages and post them please.

  5. #5
    Bill Brock is offline Outstanding Member
    Join Date
    May 2007
    Location
    Oklahoma
    Posts
    703
    Rep Power
    8

    Default

    Did you allow Zimbra to verify database integrity during the upgrade?

    I upgraded this morning from 5.0.2 to 5.0.4 and all went well.

  6. #6
    jvsantosgt is offline Junior Member
    Join Date
    Mar 2008
    Posts
    9
    Rep Power
    7

    Default

    I did verify the database. Below you will find the log.

    Operations logged to /tmp/zmsetup.03242008-201744.log
    Getting installed packages
    Getting local config zimbra_server_hostname
    Getting local config ldap_url
    zimbra_server_hostname contained in ldap_url checking ldap status
    Checking ldap status.
    *** Running as zimbra user: /opt/zimbra/bin/ldap status
    Starting ldap...
    *** Running as zimbra user: /opt/zimbra/sleepycat/bin/db_recover -h /opt/zimbra/
    openldap-data
    *** Running as zimbra user: /opt/zimbra/libexec/zmldapapplyldif
    *** Running as zimbra user: /opt/zimbra/bin/ldap status
    slapd running pid: 2522
    done.
    Getting installed services from ldap
    checking isEnabled zimbra-core
    zimbra-core not in enabled cache
    enabled packages
    zimbra_server_hostname contained in ldap_url checking ldap status
    Checking ldap status.
    *** Running as zimbra user: /opt/zimbra/bin/ldap status
    slapd running pid: 2522
    slapd already running.
    Getting enabled services from ldap
    Marking zimbra-apache as installed. Services for zimbra-apache will be enabled.
    Setting defaults...
    Setting local config zimbra_java_home to /opt/zimbra/java
    *** Running as zimbra user: /opt/zimbra/bin/zmlocalconfig -f -e zimbra_java_home
    ='/opt/zimbra/java' 2> /dev/null
    checking isEnabled zimbra-cluster
    zimbra-cluster not in enabled cache
    enabled packages zimbra-logger zimbra-store zimbra-mta zimbra-core zimbra-apache
    zimbra-snmp zimbra-ldap zimbra-spell
    zimbra_server_hostname contained in ldap_url checking ldap status
    Checking ldap status.
    *** Running as zimbra user: /opt/zimbra/bin/ldap status
    slapd running pid: 2522
    slapd already running.
    Getting enabled services from ldap
    Marking zimbra-apache as installed. Services for zimbra-apache will be enabled.
    checking isEnabled zimbra-store
    zimbra-store is enabled
    checking isEnabled zimbra-ldap
    zimbra-ldap is enabled
    checking isEnabled zimbra-store
    zimbra-store is enabled
    checking isEnabled zimbra-mta
    zimbra-mta is enabled
    done.
    Upgrading from 5.0.2_GA_1975 to 5.0.4_GA_2101
    Stopping zimbra services
    Verifying /opt/zimbra/conf/my.cnf
    Starting mysql
    Starting logger mysql
    This appears to be 5.0.2_GA
    Redolog Version: 1.22 New Redolog Version: 1.22
    Schema upgrade required
    Running /opt/zimbra/libexec/scripts/migrate20080130-ImapFlags.pl
    Mon Mar 24 20:18:43 2008: Verified schema version 50.
    Mon Mar 24 20:18:44 2008: Adding flags column to mboxgroup1.imap_message.
    ERROR 1060 (42S21) at line 1: Duplicate column name 'flags'
    Mon Mar 24 20:18:44 2008: Error while running '/opt/zimbra/bin/mysql --user=zimb
    ra --password=.prk0K8dvX6oG7NLCbkwr14635qT --database=zimbra --batch --skip-colu
    mn-names'.
    Script failed with code 256: - exiting
    UPGRADE FAILED - exiting

  7. #7
    Bill Brock is offline Outstanding Member
    Join Date
    May 2007
    Location
    Oklahoma
    Posts
    703
    Rep Power
    8

    Default

    According to this wiki - Account mailbox database structure - Zimbra :: Wiki - there is already a flags column in the database.

    I am wondering why the upgrade would try to "add" this column. Something has me confused. The add worked on my upgrade however.

  8. #8
    bburtin is offline Zimbra Employee
    Join Date
    Sep 2005
    Posts
    78
    Rep Power
    9

    Default

    Looks like whatever scheme you used to roll back to 5.0.2 didn't roll back the database schema. The best thing to do is to roll back your database to the 5.0.2 schema. If this is not possible, you'll need to run the script attached to this bug:

    Bug 26220 - Upgrade failure if some people use external IMAP sync

    and then hack your upgrade process so that it doesn't run migrate20080130-ImapFlags.pl.

  9. #9
    jvsantosgt is offline Junior Member
    Join Date
    Mar 2008
    Posts
    9
    Rep Power
    7

    Default

    Where is that script being called?
    What should be the order that I have to use?
    - Upgrade to 5.04 <- even if it fails
    *Note that for the new packages get installed, it fails when it tries to upgrade the schema
    - Run the imapfix script

    Or should I do the following:
    - Run the imapfix script
    - Upgrade to 5.04 <- In theory it shouldn't run the migrate20080130-ImapFlags.pl

  10. #10
    brian is offline Project Contributor
    Join Date
    Jul 2006
    Posts
    623
    Rep Power
    9

    Default

    This isn't database corruption, this is caused by partially upgraded schema. This is usually caused when an upgrade is aborted or failed during a previous attempt. You should make sure that you completely restore to the previous version including the database schema.

    In this case we have a script that will get you past a mid-upgrade failure. Steps to recover are

    - Upgrade to 5.0.4
    - Run fix script only if upgrade fails.
    - Rerun zmsetup.pl after running the fix script

    The fix script will fix the schema for the individual schema upgrade that is failing. Rerunning zmsetup.pl after that script will finish the upgrade process.

    To run the fix script, download the attachment http://bugzilla.zimbra.com/attachment.cgi?id=9590
    Save the attachment in /opt/zimbra/libexec/scripts/imapfix.pl
    Make sure you logged in as zimbra (su - zimbra)
    cd /opt/zimbra/libexec/scripts
    perl ./imapfix.pl
    Last edited by brian; 03-26-2008 at 11:39 AM.
    Bugzilla - Wiki - Downloads - Before posting... Search!

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Cleanup after many upgrades
    By tobru in forum Installation
    Replies: 1
    Last Post: 12-23-2007, 09:21 AM
  2. zmtlsctl give LDAP error
    By sourcehound in forum Administrators
    Replies: 5
    Last Post: 03-11-2007, 03:48 PM
  3. 4.5 Upgrade failure
    By brained in forum Installation
    Replies: 9
    Last Post: 03-03-2007, 03:30 PM
  4. Post instsallation problems
    By Assaf in forum Installation
    Replies: 14
    Last Post: 01-29-2007, 11:38 AM
  5. FC3 Install and no zimbra ?
    By aws in forum Installation
    Replies: 10
    Last Post: 10-09-2005, 04:19 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
  •