Bug 242319

Summary: cyrus-imapd does not work after update to F7
Product: [Fedora] Fedora Reporter: Matteo Corti <matteo>
Component: cyrus-imapdAssignee: Tomas Janousek <tjanouse>
Status: CLOSED DUPLICATE QA Contact: Brian Brock <bbrock>
Severity: urgent Docs Contact:
Priority: low    
Version: 7CC: k.georgiou, p.zandbergen
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-07-10 08:39:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Matteo Corti 2007-06-03 09:51:01 UTC
Description of problem:

fails with the following entries in maillog:

Jun  3 11:02:31 sp2002a cvt_cyrusdb[26518]: DBERROR db4: file
/var/lib/imap/deliver.db has LSN 1/213480, past end of log at 1/544
Jun  3 11:02:31 sp2002a cvt_cyrusdb[26518]: DBERROR db4: Commonly caused by
moving a database from one transactional database
Jun  3 11:02:31 sp2002a cvt_cyrusdb[26518]: DBERROR db4: environment to another
without clearing the database LSNs, or removing
Jun  3 11:02:31 sp2002a cvt_cyrusdb[26518]: DBERROR db4: all of the log files
from a database environment
Jun  3 11:02:31 sp2002a cvt_cyrusdb[26518]: DBERROR db4:
/var/lib/imap/deliver.db: unexpected file type or format
Jun  3 11:02:31 sp2002a cvt_cyrusdb[26518]: DBERROR: opening
/var/lib/imap/deliver.db: Invalid argument
Jun  3 11:02:31 sp2002a cvt_cyrusdb[26533]: DBERROR db4: file
/var/lib/imap/tls_sessions.db has LSN 1/69256, past end of log at 1/544
Jun  3 11:02:31 sp2002a cvt_cyrusdb[26533]: DBERROR db4: Commonly caused by
moving a database from one transactional database
Jun  3 11:02:31 sp2002a cvt_cyrusdb[26533]: DBERROR db4: environment to another
without clearing the database LSNs, or removing
Jun  3 11:02:31 sp2002a cvt_cyrusdb[26533]: DBERROR db4: all of the log files
from a database environment
Jun  3 11:02:31 sp2002a cvt_cyrusdb[26533]: DBERROR db4:
/var/lib/imap/tls_sessions.db: unexpected file type or format
Jun  3 11:02:31 sp2002a cvt_cyrusdb[26533]: DBERROR: opening
/var/lib/imap/tls_sessions.db: Invalid argument


Version-Release number of selected component (if applicable):
cyrus-imapd-2.3.8-3.fc7

How reproducible:
Upgrade from FC6 to F7

Steps to Reproduce:
1. Upgrade from FC6 to F7

Actual results:
Not working: errors in log (see above)

Expected results:
Working

Additional info:

Comment 1 Tomas Janousek 2007-06-07 14:27:09 UTC
The version of Berkeley DB4 changed between FC6 and F7, probably making the old
databases unusable without tweaking.

The cyrus-imapd init script converts the database from/to cyrus skiplist format
at startup/shutdown respectively. This means that the upgrade should have been
fine if cyrus-imapd had been shut down before the upgrade. Did you use yum to
upgrade a running system?

As the error message suggests, removing the log files (/var/lib/imap/db/log.*)
might help. I am not sure though, because I wasn't able to reproduce it.

Comment 2 Pim Zandbergen 2007-07-06 11:52:47 UTC
I've seen the same problem with several upgrades fron FC6 to F7. 

What happens is that cyrus-imapd requires tools from db4-utils to dump and load
its databases on stop and start, respectively. This is done in order to prevent
problems like the ones raised when upgrading FC3 to FC4, where too the berkeley
database format changed.

Even though the cyrus-imapd RPM requires db4-utils, somehow db4-utils is
sometimes gone after an update, even if it was previously installed. Just
installing db4-utils fixes the cyrus-imapd problem.

The real problem probably lies in Anaconda which fails to install db4-utils.

Pim


Comment 3 Tomas Janousek 2007-07-10 08:39:05 UTC
Pim, thanks for your explanation. Therefore, I'm closing this as a duplicate of
that bug.

*** This bug has been marked as a duplicate of 241437 ***