4.01 to 4.02 upgrade problem (with solution)
About a week ago I installed Zimbra on my Centos 4.4 powered server. The installation went without a hitch, except for two issues: The first was that the install died due to a missing key. A quick search of the forums found a solution to that. (zmsshkeygen && zmupdateauthkeys && tomcat restart)
Once that was fixed, I tried to set up a documents area and got an error.. again, a quick search of the forums got me an answer (zmprov initNotebook email@example.com 123456)
After that, my Zimbra was running and life was good.
Why do I bore you with this, do you ask?
Because it points to the root cause of the subject of my post.
Today, I decided to upgrade to 4.02. I shut down zimbra, grabbed the tarball, untarred it, ran install.sh, and everything was going dandy until this:
Geez. Everybody hates a quitter. Especially when my wife can't get her email! But I digress.
Setting defaults...Setting defaults from existing config...Done
Upgrading from to 4.0.2_GA_362
Thu Sep 28 17:33:27 2006: Stopping zimbra services
Thu Sep 28 17:33:35 2006: Starting mysql
Thu Sep 28 17:33:38 2006: SELECT value FROM config WHERE name = 'db.version'
Thu Sep 28 17:33:38 2006: Checking logger mysql status
Thu Sep 28 17:33:39 2006: Starting logger mysql
Thu Sep 28 17:33:40 2006: SELECT value FROM config WHERE name = 'db.version'
I can't upgrade version
So, I dug around in the code until I figured out that zmsetup.pl parses out versions by reading /opt/zimbra/.install_history. Further, in this particular scenario, it expects to see "CONFIGURED END" in that file, and if it doesn't, a variable is left in it's initialized state (empty), resulting in the behavior above. (Note the "Upgrading from to" line)
Looking at .install_history, I saw that the CONFIGURED entries for the day I installed got up to "CONFIGURED setupSyslog" and then just stopped. What the?! Where's the "CONFIGURED END"?
While figuring out how install.sh/zmsetup.pl worked, I noticed that I could run zmsetup.pl against a saved config. Hey, these guys really know what they are doing! So I blew away the /opt/zimbra directory, restored from the backup I took before I started, and ran zmsetup.pl -c config.18869 (the config that got saved when I originally installed 4.01)
Sure enough, zmsetup configured configInitNotebooks after setupSyslog this time, followed by CONFIGURED END. Woohoo! Back in business! I ran install.sh again, and the upgrade to 4.02 succeeded.
Now usually at this time I'd be dancing around shaking my booty at the server, but since the server is in Texas and I'm in South Carolina, the dogs had to suffice.
The 4.01 install failed during configInitNotebooks (I would imagine), but not a hard enough failure to keep anything except documents from working.
No "CONFIGURED END" == failed upgrade.
I would recommend that anyone who plans to upgrade from 4.01 (which looks like it has an installation problem when it comes to documents) to 4.02 to check to make sure that /opt/zimbra/.install_history has a "CONFIGURED END" for every "CONFIGURED BEGIN". If it doesn't, you need to figure out what config process failed and fix it. If your scenario matches mine (4.01 setup failed during configInitNotebooks), I think the fix is to run "zmprov initNotebook firstname.lastname@example.org 123456" and then run "zmsetup.pl -c <last saved config>" before you attempt to upgrade. Otherwise, you are doomed to failure.
Zimbrans - Awesome product. From an admin point of view, this is the most fully featured, easy to work with, nicely integrated mail system I've ever seen. And I've seen a few. I almost forgive you for making me look at perl (the horror!)
Charles (python guy)