Results 1 to 6 of 6

Thread: [SOLVED] Schema version mismatch. Expected version 2. Version in the database is 0.

  1. #1
    maumar is offline Elite Member
    Join Date
    Mar 2007
    Location
    Small village in the center of Italy
    Posts
    341
    Rep Power
    8

    Default [SOLVED] Schema version mismatch. Expected version 2. Version in the database is 0.

    I got UPGRADE FAILED - exiting
    during upgrade from 5.0.0 to zcs-5.0.3_GA_2101.RHEL5.20080319105041
    i warn others who want upgarde to keep care.

    i suggest to answer N to
    Do you want to verify message store database integrity? [Y] N
    maybe answering Y might have caused
    ERROR 1040 (08004): Too many connections

    i dunno...

    here the final steps toward death...


    Fri Mar 21 00:29:03 2008: Updating DB schema version from 50 to 51.
    Running /opt/zimbra/libexec/scripts/migrate20080213-IndexDeferredColumn.pl
    Fri Mar 21 00:29:05 2008: Verified schema version 51.
    Fri Mar 21 00:29:05 2008: Adding idx_deferred_count column to Mailbox table.
    Fri Mar 21 00:29:08 2008: Verified schema version 51.
    Fri Mar 21 00:29:08 2008: Updating DB schema version from 51 to 52.
    Stopping mysql
    An upgrade of the logger schema is necessary from version 0
    Running /opt/zimbra/libexec/scripts/migrateLogger1-index.pl
    Fri Mar 21 00:29:26 2008: Adding Indices
    Fri Mar 21 00:29:26 2008: alter table mta add index i_arrive_time (arrive_time);
    alter table amavis add index i_arrive_time (arrive_time);
    alter table mta_aggregate add index i_period_start (period_start);
    alter table mta_aggregate add index i_period_end (period_end);
    alter table amavis_aggregate add index i_period_start (period_start);
    alter table amavis_aggregate add index i_period_end (period_end);
    CREATE TABLE config (
    name VARCHAR(255) NOT NULL PRIMARY KEY,
    value TEXT,
    description TEXT,
    modified TIMESTAMP
    ) ENGINE = MyISAM;

    ERROR 1040 (08004): Too many connections
    Running /opt/zimbra/libexec/scripts/migrateLogger2-config.pl
    Fri Mar 21 00:29:28 2008: Adding Config
    Fri Mar 21 00:29:28 2008: DROP TABLE IF EXISTS config;
    CREATE TABLE config (
    name VARCHAR(255) NOT NULL PRIMARY KEY,
    value TEXT,
    description TEXT,
    modified TIMESTAMP
    ) ENGINE = MyISAM;

    ERROR 1040 (08004): Too many connections
    Fri Mar 21 00:29:28 2008: DELETE from zimbra_logger.config WHERE name = 'db.version';
    INSERT into zimbra_logger.config (name,value) values ('db.version',2);

    ERROR 1040 (08004): Too many connections
    Running /opt/zimbra/libexec/scripts/migrateLogger3-diskindex.pl
    Fri Mar 21 00:29:29 2008: SELECT value FROM config WHERE name = 'db.version'
    ERROR 1040 (08004): Too many connections
    Fri Mar 21 00:29:30 2008: Schema version mismatch. Expected version 2. Version in the database is 0.

    Script failed with code 1 - exiting
    UPGRADE FAILED - exiting
    Last edited by maumar; 03-20-2008 at 04:50 PM.

  2. #2
    jholder's Avatar
    jholder is offline Former Zimbran
    Join Date
    Oct 2005
    Location
    Thatcher, AZ
    Posts
    5,606
    Rep Power
    20

    Default

    Hey maumar,
    We've determined that this issue is likely unique to you. The logger db schema has been at version 5 for quite a while. We're not sure how yours got to zero. Have you been having issues with the logger?

    in any case, please reinitialize your logger by running:
    Code:
    su - zimbra
    rm -rf /opt/zimbra/logger/db/*
    cd /opt/zimbra/libexec
    ./zmloggerinit
    Then rerun the upgrade.

  3. #3
    maumar is offline Elite Member
    Join Date
    Mar 2007
    Location
    Small village in the center of Italy
    Posts
    341
    Rep Power
    8

    Default downgrade to 5.0.1 and now jetty issue

    thnx john for help.
    yes, u are right, logger service by some days showed stopped at console 7071.

    in the meantime u answer me, i reinstalled 5.0.0 over 5.0.3.
    All is working but jetty issue, i googled and i see Bug 17456 and Bug 19544 related to jetty issue.

    i tried 5.0.1 over 5.0.0 and still jetty issue is in place.
    here it is:
    ...
    checking isEnabled zimbra-store
    zimbra-store is enabled
    Initializing Documents...
    *** Running as zimbra user: /opt/zimbra/bin/zmprov mc default zimbraFeatureNotebookEnabled TRUE
    ERROR: zclient.IO_ERROR (invoke cannot determine soap protocol in reply: <html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"/><title>Error 503 SERVICE_UNAVAILABLE</title></head><body><h2>HTTP ERROR: 503</h2><pre>SERVICE_UNAVAILABLE</pre><p>RequestURI=/service/admin/soap/</p><p><i><small><a href="http://jetty.mortbay.org">Powered by jetty://</a></small></i></p></body></html>, server: localhost) (cause: com.zimbra.common.soap.SoapParseException cannot determine soap protocol in reply: <html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"/><title>Error 503 SERVICE_UNAVAILABLE</title></head><body><h2>HTTP ERROR: 503</h2><pre>SERVICE_UNAVAILABLE</pre><p>RequestURI=/service/admin/soap/</p><p><i><small><a href="http://jetty.mortbay.org">Powered by jetty://</a></small></i></p></body></html>)


    now, all service are running but access to admin console on 7071 port give a blank pink page.

    what do u suggest? i try to re-installing 5.0.3 over 5.0.1.
    Now logger issue should be vanished and maybe jetty issue in 5.0.3 was fixed

    tia
    maurizio
    Last edited by maumar; 03-20-2008 at 07:24 PM.

  4. #4
    jholder's Avatar
    jholder is offline Former Zimbran
    Join Date
    Oct 2005
    Location
    Thatcher, AZ
    Posts
    5,606
    Rep Power
    20

    Default

    oh man

    The only thing worse you could have done is to rm -rf /opt/zimbra

    do you have your installer logs from your 5.0->5.0.3 migration?

    I hope that it didn't upgrade mysql and ldap and postfix yet...

  5. #5
    maumar is offline Elite Member
    Join Date
    Mar 2007
    Location
    Small village in the center of Italy
    Posts
    341
    Rep Power
    8

    Default

    Quote Originally Posted by jholder View Post
    Hey maumar,
    We've determined that this issue is likely unique to you. The logger db schema has been at version 5 for quite a while. We're not sure how yours got to zero. Have you been having issues with the logger?

    in any case, please reinitialize your logger by running:
    Code:
    su - zimbra
    rm -rf /opt/zimbra/logger/db/*
    cd /opt/zimbra/libexec
    ./zmloggerinit
    Then rerun the upgrade.
    i am getting the same issu, now, migrating from 5.0.11 to 5.0.12; issuing what you suggested i get:
    Code:
    [07:21:15 zimbra@zimbra ~/logger/db ]$ rm -rf *
    [07:21:22 zimbra@zimbra ~/logger/db ]$ ls -la
    total 8
    drwxr-xr-x 2 zimbra zimbra 4096 Feb  1 07:21 .
    drwxrwxr-x 4 zimbra zimbra 4096 Feb  1 03:32 ..
    [07:21:25 zimbra@zimbra ~/logger/db ]$ cd /opt/zimbra/libexec
    [07:21:39 zimbra@zimbra ~/libexec ]$ ./zmloggerinit
    * Creating required directories
    * Creating database in /opt/zimbra/logger/db/data
    * Starting logger_mysql server
    * Loading schema /opt/zimbra/db/loggerdb.sql
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/zimbra/logger/db/mysql.sock' (2)
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/zimbra/logger/db/mysql.sock' (2)
    * Setting random password for mysql root user in zimbra local config
    * Setting random password for mysql zimbra user in zimbra local config
    * Changing mysql root user password
    /opt/zimbra/logger/mysql/bin/mysqladmin: connect to server at 'localhost' failed
    error: 'Can't connect to local MySQL server through socket '/opt/zimbra/logger/db/mysql.sock' (2)'
    Check that mysqld is running and that the socket: '/opt/zimbra/logger/db/mysql.sock' exists!
    * Changing mysql zimbra user password
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/zimbra/logger/db/mysql.sock' (2)
    **** PASSWORD CHANGE FAILED
    what you suggest?

  6. #6
    maumar is offline Elite Member
    Join Date
    Mar 2007
    Location
    Small village in the center of Italy
    Posts
    341
    Rep Power
    8

    Default [SOLVED] Schema version mismatch. Expected version 2. Version in the database is 0

    i realize that there was a messy with logger and cron had made it worst, issuing a ps ax i got:

    Code:
    .. snip ..
    0002 ?        S      0:00 /bin/sh /opt/zimbra/logger/mysql/bin/mysqld_safe --defaults-file=/opt/zimbra/conf/my.logger.cnf --external-locking --log-error=/opt/zimbra/log/logger_mys
    10061 ?        Sl     0:20 /opt/zimbra/logger/mysql/libexec/mysqld --defaults-file=/opt/zimbra/conf/my.logger.cnf --basedir=/opt/zimbra/logger/mysql --datadir=/opt/zimbra/logger/db
    10215 ?        S      4:48 /usr/bin/perl /opt/zimbra/libexec/zmlogger
    10473 ?        S      1:17 /usr/bin/perl /tmp/.swatch_script.7348
    11056 ?        Z      0:00 [zmlogger] <defunct>
    11149 ?        S      1:08 /usr/bin/perl /tmp/.swatch_script.19885
    11479 ?        S      1:24 /usr/bin/perl /tmp/.swatch_script.11834
    11656 ?        Z      0:00 [zmlogger] <defunct>
    11694 ?        S      1:21 /usr/bin/perl /tmp/.swatch_script.9847
    11865 ?        S      0:28 /usr/bin/perl /tmp/.swatch_script.19105
    12027 ?        S      5:00 /usr/bin/perl /opt/zimbra/libexec/zmlogger
    12229 ?        S      4:51 /usr/bin/perl /opt/zimbra/libexec/zmlogger
    12408 ?        Z      0:00 [zmlogger] <defunct>
    12677 ?        S      0:38 /usr/bin/perl /tmp/.swatch_script.18011
    12949 ?        S      0:37 /usr/bin/perl /tmp/.swatch_script.5920
    13087 ?        S      0:47 /usr/bin/perl /tmp/.swatch_script.13082
    13230 ?        Z      0:00 [zmlogger] <defunct>
    13301 ?        Z      0:00 [zmlogger] <defunct>
    13399 ?        S      1:00 /usr/bin/perl /tmp/.swatch_script.23053
    13503 ?        Z      0:00 [zmlogger] <defunct>
    13539 ?        S      0:06 /usr/bin/perl /tmp/.swatch_script.6211
    13709 ?        Z      0:00 [zmlogger] <defunct>
    14010 ?        Z      0:00 [zmlogger] <defunct>
    14438 ?        S      0:26 /usr/bin/perl /tmp/.swatch_script.27855
    14510 ?        S      1:15 /usr/bin/perl /tmp/.swatch_script.5330
    14678 ?        S      1:43 /usr/bin/perl /tmp/.swatch_script.23204
    14742 ?        Ss     0:04 /usr/sbin/sshd
    14951 ?        S      0:57 /usr/bin/perl /tmp/.swatch_script.15496
    14988 ?        Z      0:00 [zmlogger] <defunct>
    15062 ?        S      4:27 /usr/bin/perl /opt/zimbra/libexec/zmlogger
    15078 ?        Z      0:00 [zmlogger] <defunct>
    15226 ?        S      0:28 /usr/bin/perl /tmp/.swatch_script.24500
    15228 ?        Z      0:00 [zmlogger] <defunct>
    15359 ?        S      0:56 /usr/bin/perl /tmp/.swatch_script.17262
    15431 ?        S      1:12 /usr/bin/perl /tmp/.swatch_script.22749
    15667 ?        S      0:11 /usr/bin/perl /tmp/.swatch_script.28318
    15726 ?        Ssl   20:00 /usr/sbin/named -u named -t /var/named/chroot
    15775 ?        Z      0:00 [zmlogger] <defunct>
    15830 ?        S      1:05 /usr/bin/perl /tmp/.swatch_script.3513
    15900 ?        Z      0:00 [zmlogger] <defunct>
    16033 ?        S      4:23 /usr/bin/perl /opt/zimbra/libexec/zmlogger
    16043 ?        Z      0:00 [zmlogger] <defunct>
    16409 ?        Z      0:00 [zmlogger] <defunct>
    16567 ?        S      0:00 /usr/bin/perl /opt/zimbra/libexec/logswatch --config-file=/opt/zimbra/conf/logswatchrc --use-cpan-file-tail --pid-file=/opt/zimbra/log/logswatch.pid --sc
    16569 ?        S      0:00 /usr/bin/perl /tmp/.swatch_script.16567
    16700 ?        S      0:00 /usr/bin/perl /opt/zimbra/libexec/swatch --config-file=/opt/zimbra/conf/swatchrc --use-cpan-file-tail --script-dir=/tmp -t /var/log/zimbra.log
    16706 ?        S      0:00 /usr/bin/perl /tmp/.swatch_script.16700
    16814 ?        S      0:34 /usr/bin/perl /opt/zimbra/libexec/zmmtaconfig
    16956 ?        Z      0:00 [zmlogger] <defunct>
    17129 ?        S      1:06 /usr/bin/perl /tmp/.swatch_script.15963
    17682 ?        Z      0:00 [zmlogger] <defunct>
    17813 ?        S      0:44 /usr/bin/perl /tmp/.swatch_script.26011
    17892 ?        Z      0:00 [zmlogger] <defunct>
    18526 ?        Ss     0:09 /usr/sbin/httpd
    18707 ?        S      0:16 /usr/bin/perl /tmp/.swatch_script.15914
    18745 ?        S      0:39 /usr/bin/perl /tmp/.swatch_script.4994
    18968 ?        S      0:25 /usr/bin/perl /tmp/.swatch_script.14574
    19023 ?        Z      0:00 [zmlogger] <defunct>
    19173 ?        S      1:19 /usr/bin/perl /tmp/.swatch_script.25415
    19324 ?        Z      0:00 [zmlogger] <defunct>
    19467 ?        Z      0:00 [zmlogger] <defunct>
    19687 ?        Z      0:00 [zmlogger] <defunct>
    19709 ?        S      1:21 /usr/bin/perl /tmp/.swatch_script.10614
    19993 ?        S      1:11 /usr/bin/perl /tmp/.swatch_script.19152
    20350 ?        Z      0:00 [zmlogger] <defunct>
    20538 ?        S      4:00 /usr/bin/perl /opt/zimbra/libexec/zmlogger
    21805 ?        S      0:57 /usr/bin/perl /tmp/.swatch_script.23652
    21997 ?        S      1:03 /usr/bin/perl /tmp/.swatch_script.23684
    22068 ?        Z      0:00 [zmlogger] <defunct>
    22407 ?        Z      0:00 [zmlogger] <defunct>
    22505 ?        S      1:20 /usr/bin/perl /tmp/.swatch_script.6702
    22632 ?        S      4:43 /usr/bin/perl /opt/zimbra/libexec/zmlogger
    22920 ?        S      1:14 /usr/bin/perl /tmp/.swatch_script.3588
    23066 ?        S      1:13 /usr/bin/perl /tmp/.swatch_script.14651
    23284 ?        S      0:40 /usr/bin/perl /tmp/.swatch_script.1572
    23322 ?        S      0:52 /usr/bin/perl /tmp/.swatch_script.22187
    23479 ?        Z      0:00 [zmlogger] <defunct>
    23508 ?        S      0:48 /usr/bin/perl /tmp/.swatch_script.18878
    23513 ?        Z      0:00 [zmlogger] <defunct>
    23644 ?        S      4:11 /usr/bin/perl /opt/zimbra/libexec/zmlogger
    23829 ?        Z      0:00 [zmlogger] <defunct>
    24081 ?        S      1:16 /usr/bin/perl /tmp/.swatch_script.4673
    24168 ?        Z      0:00 [zmlogger] <defunct>
    24290 ?        S      0:34 /usr/bin/perl /tmp/.swatch_script.30721
    24548 ?        Z      0:00 [zmlogger] <defunct>
    24757 ?        S      0:01 /usr/bin/perl /tmp/.swatch_script.31665
    24900 ?        Z      0:00 [zmlogger] <defunct>
    24928 ?        Z      0:00 [zmlogger] <defunct>
    25074 ?        S      0:01 /usr/bin/perl /tmp/.swatch_script.25018
    25089 ?        Z      0:00 [zmlogger] <defunct>
    25281 ?        S      1:32 /usr/bin/perl /tmp/.swatch_script.2313
    25741 ?        Z      0:00 [zmlogger] <defunct>
    25869 ?        S      0:40 /usr/bin/perl /tmp/.swatch_script.23421
    26382 ?        Z      0:00 [zmlogger] <defunct>
    26618 ?        S      1:36 /usr/bin/perl /tmp/.swatch_script.30190
    26802 ?        S      1:15 /usr/bin/perl /tmp/.swatch_script.26752
    27128 ?        Z      0:00 [zmlogger] <defunct>
    27191 ?        Z      0:00 [zmlogger] <defunct>
    27637 ?        S      0:26 /usr/bin/perl /tmp/.swatch_script.15361
    27675 ?        Z      0:00 [zmlogger] <defunct>
    28184 ?        S      0:14 /usr/bin/perl /tmp/.swatch_script.4198
    28595 ?        S      0:00 [pdflush]
    28686 ?        Z      0:00 [zmlogger] <defunct>
    28877 ?        S      0:00 [pdflush]
    30014 ?        S      1:24 /usr/bin/perl /tmp/.swatch_script.7799
    30358 ?        Z      0:00 [zmlogger] <defunct>
    30509 ?        S      0:30 /usr/bin/perl /tmp/.swatch_script.3747
    30908 ?        Z      0:00 [zmlogger] <defunct>
    31531 ?        S      0:05 /usr/bin/perl /tmp/.swatch_script.5777
    31682 ?        S      0:59 /usr/bin/perl /tmp/.swatch_script.15195
    32009 ?        Z      0:00 [zmlogger] <defunct>
    32063 ?        Ss     0:50 crond
    32228 ?        Z      0:00 [zmlogger] <defunct>
    during installation stopping, i was taking a coffe break, and during this period zimbra cron was keeping to retry to connect to logger.

    To fix all this mess i did (i am into a Centos 5):
    Code:
    1. chkconfig zimbra off
    2. mv /var/spool/cron/zimbra /tmp
    3. reboot
    after reboot, with zimbra not running and no silly cron script around, issuing a ps ax gave a very clean situation.
    I redid upgrade and now 5.0.12 is working like a charm.

    The lesson is:
    it would be sane if during zimbra installation, zimbra cron could be disabled, if one's place.
    my 2 cents.
    Last edited by maumar; 02-01-2009 at 12:13 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Debian - Upgrade from 4.5.6
    By magikman in forum Installation
    Replies: 1
    Last Post: 01-19-2008, 12:59 PM
  2. 4.0.4 to 4.5.6 upgrade failed in network edition
    By chenthil in forum Administrators
    Replies: 1
    Last Post: 08-27-2007, 09:36 AM
  3. [SOLVED] Simple backup question...
    By dameron in forum Administrators
    Replies: 3
    Last Post: 08-25-2007, 09:36 PM
  4. Upgrading from 3.1.4_GA_518 to 4.0.3_GA_406
    By a2mc in forum Installation
    Replies: 6
    Last Post: 11-13-2006, 12:52 PM
  5. Fix for SA Configure Files Version Mismatch
    By unilogic in forum Developers
    Replies: 1
    Last Post: 12-03-2005, 07:37 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
  •