Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Installation

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-23-2008, 11:27 PM
Active Member
 
Posts: 28
Default Failure Upgrading from 4.5.11 to 5.0.6 Open-Source

Upgrade starts, then:

Tue Jun 24 01:21:24 2008: SELECT value FROM config WHERE name = 'db.version'
This appears to be 4.5.11_GA
Redolog Version: 1.22 New Redolog Version: 1.22
Schema upgrade required
Running /opt/zimbra/libexec/scripts/migrate20070614-BriefcaseFolder.pl
Tue Jun 24 01:21:29 2008: Verified schema version 38.
..........Tue Jun 24 01:21:32 2008: DB: UPDATE mboxgroup41.mail_item mi, mailbox mb
SET mi.name = CONCAT('Briefcase - renamed (', mi.id, ' - 1214288488)'),
mi.subject = CONCAT('Briefcase - renamed (', mi.id, ' - 1214288488)'),
mi.mod_metadata = mb.change_checkpoint,
mi.mod_content = mb.change_checkpoint,
mi.change_date = 1214288488
WHERE mi.mailbox_id = 41 AND mi.folder_id = 1 AND
mi.id != 16 AND LOWER(mi.name) = LOWER('Briefcase') AND
mb.id = mi.mailbox_id;: Table 'mboxgroup41.mail_item' doesn't exist

Died at /opt/zimbra/libexec/scripts/Migrate.pm line 361, line 41.
Script failed with code 256: - exiting
UPGRADE FAILED - exiting


I have no idea how to proceed - any suggestions?
Reply With Quote
  #2 (permalink)  
Old 06-25-2008, 08:41 PM
Active Member
 
Posts: 28
Default

I tried it again tonight, after shutting down all other services. Same exact error. Is there a utility or something to run a consistency check on mysql prior to an upgrade?
Reply With Quote
  #3 (permalink)  
Old 07-01-2008, 11:25 AM
Zimbra Employee
 
Posts: 57
Default

Hi, the error message says the upgrade script was trying to run some SQL command against mboxgroup41.mail_item table but the table wasn't there. Either the mail_item table is missing or the mboxgroup41 database is missing. Use mysql client to check which is the case. "use mboxgroup41" command will fail if the database isn't there. If the database is there, do "desc mboxgroup41.mail_item". That will fail if the table is missing.

Either way, this is indicating something went wrong during creation of mailbox 41, which was way before the upgrade. Check "select * from zimbra.mailbox where id=41". There must be a row for mailbox 41, and that is why the upgrade script is trying to process that mailbox and its mailbox group. The solution is to drop mboxgroup41 database and delete the id=41 row from mailbox table. Likewise for all other mailboxes that were not created properly. There was an old bug that produced this condition, and it has since been fixed.

To see all mailbox group databases, do this in mysql client:

show databases like 'mboxgroup%';

You can cross reference this with the groups being referenced by the mailbox table:

select distinct group_id from zimbra.mailbox;

Then, you can see the mailboxes for these groups:

select id, group_id, comment from zimbra.mailbox where group_id in (...);

where "..." is the comma-separated list of group ids from the second query.

For each group and mailbox referring to it, clean up by doing:

drop database mboxgroupX;
delete from zimbra.mailbox where group_id=X;

You can't recover from a mistake during drop/delete, so be very careful!

After the cleanup, run the upgrade again.
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #4 (permalink)  
Old 07-29-2008, 01:54 AM
Intermediate Member
 
Posts: 23
Default

I realy feel like it's a solution for me, but I get:
mysql> drop database mboxgroup20;
ERROR 1010 (HY000): Error dropping database (can't rmdir './mboxgroup20', errno: 39)
Why I can't delete it?
tried from both zimbra and root accounts, stopped zimbra, chmoded 777 to that folder
Reply With Quote
  #5 (permalink)  
Old 07-29-2008, 10:48 AM
Zimbra Employee
 
Posts: 57
Default

Errno 39 is ENOTEMPTY, directory not empty. I think it's saying you have tables in mboxgroup20 database, and you must drop the tables before dropping the database. Try:

mysql> use mboxgroup20;
mysql> show tables;
mysql> drop table [table name]; (for each table)

If that still doesn't work, shutdown mysql and move everything under the directory out, restart and drop again. Try it this way rather than deleting the directory, because you want to tell mysql you're dropping the database.
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #6 (permalink)  
Old 07-29-2008, 11:43 AM
Intermediate Member
 
Posts: 23
Default

Thanks a lot!
emtying directory worked
now will try to upgrade from 5.0.2 to 5.0.4 then to 5.0.8
Reply With Quote
  #7 (permalink)  
Old 07-29-2008, 11:52 AM
Intermediate Member
 
Posts: 23
Default

but now, i can't this -
delete from zimbra.mailbox where group_id=20;
ERROR 2013 (HY000): Lost connection to MySQL server during query
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.