Notes from a Carbon Based Life Form
thoughts, opinions, and drivel. 100% free, guaranteed.

20050716 Saturday July 16, 2005

Cyrus Imapd and DB Errors upgrading Fedora Core 3 to 4

SO.... There I was... upgrading a remote server (my personal colo box) which is hosted at aplus.net, and which is running Fedora Core 3, to Fedora Core 4.

I've upgraded before, but this time was different, as in the intervening year I've been running up2date and yum on different repositories, and using devel packages and stuff like that. The box is basically a remote, always-up, box that I can play with. I do dev stuff, and compile on it, run an apache server, imap server, get my personal email there, etc, etc.

This time, I had to back out of a bunch of patches, and try to upgrade to Fedora 4. Long story short, the major problem I had was that my IMAP server was b0rked. Dropping lots of errors like:


Jul 16 14:35:27 radix imap[19744]: DBERROR ^DA^K^H: db4
Jul 16 14:35:27 radix imap[19738]: DBERROR ^DA^K^H: db4
Jul 16 14:35:27 radix pop3[19747]: DBERROR \204�^H^H: db4
Jul 16 14:35:27 radix pop3[19748]: DBERROR \204�^H^H: db4
Jul 16 14:35:28 radix imap[19745]: DBERROR: critical database situation
Jul 16 14:35:28 radix imap[19733]: DBERROR: critical database situation
Jul 16 14:35:28 radix imaps[19734]: DBERROR: critical database situation
Jul 16 14:35:28 radix imap[19728]: DBERROR: critical database situation
Jul 16 14:35:28 radix imaps[19729]: DBERROR: critical database situation
Jul 16 14:35:28 radix pop3s[19731]: DBERROR: critical database situation

Googling the issue shows a lot of people having the same error, but not really any useful solutions. Some people want to use db4_recover or other db4 utils to try and rescue the databases. The actual solution for me was quite a bit easier.

The directory /var/lib/imap/db contains the db files that the above processes are complaining about. The easy solution is to:


/etc/init.d/cyrus-master stop
cd /var/lib/imap/db/
rm __db.*
[ optional steps here ]**
/etc/init.d/cyrus-master start

If those steps don't work for you right away, you can also try the cyrus commands, 'ctl_recover -r' and 'reconstruct -m -r'. I've used those in the past to help me recover cyrus servers when upgrading.

Anyways... I hope this helps someone... If google every finds my blog. :)

At least I'll always have the answer myself, if I need it.

Posted by tkblog ( Jul 16 2005, 11:45:10 PM EDT ) Permalink Comments [3]

Trackback URL: http://blogs.sun.com/tkblog/entry/cyrus_imapd_and_db_errors
Comments:

Thanks! Today, I experienced the same symptom for the power failure caused by a lighting damage.

Posted by Imai on August 10, 2005 at 07:14 AM EDT #

You rock. Too bad you were the third link. It needs to be the first. I'll try to rectify that by throwing it in my Blog.

Posted by Jeff Pitman on October 12, 2005 at 03:54 AM EDT #

Bless you and your kind! Nothing like actually finding someone nice enough to post their solution as opposed to having the exact same error message as many other posters out there only to find NO answer. Cheers to you my friend!

Posted by James Sanders on April 09, 2006 at 01:51 PM EST #

Post a Comment:

Name:
E-Mail:
URL:

Your Comment:

HTML Syntax: NOT allowed

Archives
Language
Links
Referrers