Description of problem: since a few days ?2007-10-04? the maillog is full of errors "dberror db4" afair since a few weeks "Exporting cyrus-imapd databases: [FAILED]". afair cyrus and postfix (lmtp) were installed on this machine in feb 2007. Version-Release number of selected component (if applicable): cyrus-imapd-2.3.9-7.fc8 db4-4.6.19-1.fc8 compat-db-4.5.20-3.fc8 postfix-2.4.5-2.fc8 How reproducible: always Steps to Reproduce: 1. service cyrus-imapd start 2. service cyrus-imapd stop Additional info: (/usr/lib/cyrus-imapd/cvt_cyrusdb_all) [root@localhost imap]# db43_checkpoint -v -1 -h /var/lib/imap/db db_checkpoint: open: No such file or directory [root@localhost imap]# db43_checkpoint -V Sleepycat Software: Berkeley DB 4.3.29: (August 18, 2007) db42_checkpoint = the same error db45_checkpoint, db45_recover = cyrus will not start db_checkpoint, db_recover = cyrus will not start [root@localhost imap]# pwd ; ls db ; ls /var/lib/imap skipstamp annotations.db db.backup2 md5 ptclient socket backup deliver.db meta quota sync db log msg rpm tls_sessions.db db.backup1 mailboxes.db proc sieve user
Created attachment 218871 [details] var-log-maillog
What's the version of the db4-utils package? For some reason, this package does not get updated automatically and we have seen it even being lost during an upgrade. I just tried to reproduce the issue -- I upgraded cyrus-imapd using yum, the db4-utils package stayed at the old version, it was impossible to start cyrus, so I updated the db4-utils package and everything returned to normal.
[root@localhost ~]# rpm -qa db4\* db4-utils-4.6.19-1.fc8 db4-4.6.19-1.fc8 i do not know if it is related to the problem but 'cyradm' does not work as expectetd, at least none of '--auth <mechanism>' works [root@localhost ~]# saslauthd -v saslauthd 2.1.22 authentication mechanisms: getpwent kerberos5 pam rimap shadow ldap [root@localhost ~]# cyradm --user root 127.0.0.1 Login disabled. cyradm: cannot authenticate to server with as root [root@localhost ~]# tail -2f /var/log/messages Oct 10 10:57:57 localhost perl: No worthy mechs found Oct 10 10:59:12 localhost perl:last message repeated 4 times # cat /etc/imapd.conf configdirectory: /var/lib/imap partition-default: /var/spool/imap admins: cyrus root sievedir: /var/lib/imap/sieve sendmail: /usr/sbin/sendmail hashimapspool: true sasl_pwcheck_method: saslauthd sasl_mech_list: PLAIN tls_cert_file: /etc/pki/cyrus-imapd/cyrus-imapd.pem tls_key_file: /etc/pki/cyrus-imapd/cyrus-imapd.pem tls_ca_file: /etc/pki/tls/certs/ca-bundle.crt
it is a testbox, i removed the old data and installed cyrus-imapd once again, all is ok now. "closed: insufficient_data" is this ok? disabled plaintext had nothing to do with the problem: for cyradm and squirrelmail i added "allowplaintext: 1" in imapd.conf ---- allowplaintext: 1 altnamespace: 1 unixhierarchysep: 1 duplicatesuppression: 0 ----/----
Well, it would be great to know what caused this, but since the upgrade went cleanly on my testbox, I have no problem with closing it.
here is the beginning of the problem. 20071028 fc6+updates dist-upgrade via yum to f7+updates. i will attach the yum.log and the maillog from the upgrade. as you will see, exactly at the point when cyrus-imapd is updated the DBERRORS are beginning. no DBERRORS while fc6+updates here are the usual error when stopping cyrus-imapd -------- # LANG=C service cyrus-imapd start Importing cyrus-imapd databases: [ OK ] Starting cyrus-imapd: [ OK ] [root@localhost ~]# LANG=C service cyrus-imapd status cyrus-master (pid 20727) is running... [root@localhost ~]# LANG=C service cyrus-imapd stop Shutting down cyrus-imapd: [ OK ] Exporting cyrus-imapd databases: [FAILED] ----/---- ---corresponding maillog---- Oct 29 13:13:34 localhost master[20727]: process started Oct 29 13:13:34 localhost master[20728]: about to exec /usr/lib/cyrus-imapd/ctl_cyrusdb Oct 29 13:13:34 localhost ctl_cyrusdb[20728]: recovering cyrus databases Oct 29 13:13:35 localhost ctl_cyrusdb[20728]: skiplist: recovered /var/lib/imap/mailboxes.db (22 records, 3776 bytes) in 1 second Oct 29 13:13:35 localhost ctl_cyrusdb[20728]: skiplist: recovered /var/lib/imap/annotations.db (0 records, 144 bytes) in 0 seconds Oct 29 13:13:35 localhost ctl_cyrusdb[20728]: done recovering cyrus databases Oct 29 13:13:35 localhost master[20730]: about to exec /usr/lib/cyrus-imapd/idled Oct 29 13:13:35 localhost master[20727]: ready for work Oct 29 13:13:35 localhost master[20732]: about to exec /usr/lib/cyrus-imapd/ctl_cyrusdb Oct 29 13:13:35 localhost master[20733]: about to exec /usr/lib/cyrus-imapd/imapd Oct 29 13:13:35 localhost master[20734]: about to exec /usr/lib/cyrus-imapd/imapd Oct 29 13:13:35 localhost master[20735]: about to exec /usr/lib/cyrus-imapd/pop3d Oct 29 13:13:35 localhost master[20736]: about to exec /usr/lib/cyrus-imapd/pop3d Oct 29 13:13:35 localhost master[20737]: about to exec /usr/lib/cyrus-imapd/lmtpd Oct 29 13:13:35 localhost master[20738]: about to exec /usr/lib/cyrus-imapd/imapd Oct 29 13:13:35 localhost master[20739]: about to exec /usr/lib/cyrus-imapd/imapd Oct 29 13:13:35 localhost master[20740]: about to exec /usr/lib/cyrus-imapd/pop3d Oct 29 13:13:35 localhost master[20741]: about to exec /usr/lib/cyrus-imapd/pop3d Oct 29 13:13:35 localhost lmtpunix[20737]: executed Oct 29 13:13:35 localhost pop3[20740]: executed Oct 29 13:13:35 localhost ctl_cyrusdb[20732]: checkpointing cyrus databases Oct 29 13:13:35 localhost imaps[20734]: executed Oct 29 13:13:35 localhost imap[20738]: executed Oct 29 13:13:35 localhost imaps[20739]: executed Oct 29 13:13:35 localhost pop3s[20736]: executed Oct 29 13:13:35 localhost pop3[20735]: executed Oct 29 13:13:35 localhost pop3s[20741]: executed Oct 29 13:13:35 localhost imap[20733]: executed Oct 29 13:13:35 localhost ctl_cyrusdb[20732]: archiving log file: /var/lib/imap/db/log.0000000001 Oct 29 13:13:36 localhost ctl_cyrusdb[20732]: archiving log file: /var/lib/imap/db/log.0000000001 Oct 29 13:13:36 localhost ctl_cyrusdb[20732]: archiving database file: /var/lib/imap/annotations.db Oct 29 13:13:36 localhost ctl_cyrusdb[20732]: archiving database file: /var/lib/imap/mailboxes.db Oct 29 13:13:36 localhost ctl_cyrusdb[20732]: archiving log file: /var/lib/imap/db/log.0000000001 Oct 29 13:13:36 localhost ctl_cyrusdb[20732]: done checkpointing cyrus databases Oct 29 13:13:36 localhost master[20727]: process 20732 exited, status 0 Oct 29 13:13:36 localhost master[20742]: about to exec /usr/lib/cyrus-imapd/imapd Oct 29 13:13:36 localhost master[20743]: about to exec /usr/lib/cyrus-imapd/pop3d Oct 29 13:13:36 localhost master[20744]: about to exec /usr/lib/cyrus-imapd/imapd Oct 29 13:13:36 localhost master[20745]: about to exec /usr/lib/cyrus-imapd/pop3d Oct 29 13:13:36 localhost imap[20744]: executed Oct 29 13:13:36 localhost pop3[20745]: executed Oct 29 13:13:36 localhost pop3[20743]: executed Oct 29 13:13:36 localhost imap[20742]: executed Oct 29 13:13:37 localhost master[20748]: about to exec /usr/lib/cyrus-imapd/imapd Oct 29 13:13:37 localhost master[20749]: about to exec /usr/lib/cyrus-imapd/imapd Oct 29 13:13:37 localhost master[20750]: about to exec /usr/lib/cyrus-imapd/imapd Oct 29 13:13:37 localhost master[20751]: about to exec /usr/lib/cyrus-imapd/pop3d Oct 29 13:13:37 localhost master[20752]: about to exec /usr/lib/cyrus-imapd/imapd Oct 29 13:13:37 localhost master[20753]: about to exec /usr/lib/cyrus-imapd/imapd Oct 29 13:13:37 localhost master[20754]: about to exec /usr/lib/cyrus-imapd/imapd Oct 29 13:13:37 localhost master[20755]: about to exec /usr/lib/cyrus-imapd/pop3d Oct 29 13:13:37 localhost imap[20749]: executed Oct 29 13:13:37 localhost imap[20750]: executed Oct 29 13:13:37 localhost pop3[20755]: executed Oct 29 13:13:37 localhost imap[20753]: executed Oct 29 13:13:37 localhost imap[20752]: executed Oct 29 13:13:37 localhost pop3[20751]: executed Oct 29 13:13:37 localhost imap[20754]: executed Oct 29 13:13:37 localhost imap[20748]: executed Oct 29 13:13:46 localhost master[20727]: exiting on SIGTERM/SIGINT Oct 29 13:13:47 localhost cvt_cyrusdb[20902]: DBERROR db4: file /var/lib/imap/tls_sessions.db has LSN 1/46423, past end of log at 1/10173 Oct 29 13:13:47 localhost cvt_cyrusdb[20902]: DBERROR db4: Commonly caused by moving a database from one transactional database Oct 29 13:13:47 localhost cvt_cyrusdb[20902]: DBERROR db4: environment to another without clearing the database LSNs, or removing Oct 29 13:13:47 localhost cvt_cyrusdb[20902]: DBERROR db4: all of the log files from a database environment Oct 29 13:13:47 localhost cvt_cyrusdb[20902]: DBERROR db4: /var/lib/imap/tls_sessions.db: unexpected file type or format Oct 29 13:13:47 localhost cvt_cyrusdb[20902]: DBERROR: opening /var/lib/imap/t ----/----
Created attachment 241751 [details] fc6+ yum.log f7+ yum.log from upgrade fc6+updates to f7+updates via yum. # grep cyrus-imapd yum.log-fc6-f7update Oct 28 16:58:41 Updated: cyrus-imapd-perl.x86_64 2.3.9-7.fc7 Oct 28 16:59:12 Updated: cyrus-imapd-utils.x86_64 2.3.9-7.fc7 Oct 28 17:11:41 Updated: cyrus-imapd.x86_64 2.3.9-7.fc7
Created attachment 241761 [details] maillog DBERROR $ grep -i error maillog-fc6-f7-update | head -6 Oct 28 17:11:19 localhost cvt_cyrusdb[23842]: DBERROR db4: Unacceptable log file /var/lib/imap/db/log.0000000003: unsupported log version 12 Oct 28 17:11:19 localhost cvt_cyrusdb[23842]: DBERROR db4: Invalid log file: log.0000000003: Invalid argument Oct 28 17:11:19 localhost cvt_cyrusdb[23842]: DBERROR db4: PANIC: Invalid argument Oct 28 17:11:19 localhost cvt_cyrusdb[23842]: DBERROR: critical database situation Oct 28 17:11:19 localhost cvt_cyrusdb[23856]: DBERROR db4: PANIC: fatal region error detected; run recovery Oct 28 17:11:19 localhost cvt_cyrusdb[23856]: DBERROR: critical database situation
I'm not sure whether that's the reason, but db4 and db4-utils were upgraded before cyrus-imapd was stopped. cyrus-imapd exports its databases when stopped and imports them when started and I think this should happen using the right version of db4-utils. This problem is probably one of the reasons why upgrade from one Fedora version to another using yum is not officially supported.
oops, what luck that i had a backup from the 2007-10-07 /var/lib/imap # service cyrus-imapd stop # cd /var/lib # mv imap imap-20071029-f7-db4.5-corrupt # cp -rp imap-20071007-fc6-db4.3 imap check the owner cyrus:mail # service cyrus-imapd start no error while stopping, no DBERROR, all users and mailboxes are ok. all is ok by a simple copy from a backup. if you know the magic between the cd-upgrade and the yum-upgrade you should tell it "seth vidal" it seems that some databases get corrupted while `yum update db4\* cyrus\*` # rpm -q db4 db4-utils db4-4.5.20-5.fc7 db4-utils-4.5.20-5.fc7 the previous fc6 version was: db4-4.3.29-9.fc6.x86_64.rpm db4-utils-4.3.29-9.fc6.x86_64.rpm # LANG=C rpm -e --test db4-utils db4 error: Failed dependencies: db4-utils is needed by (installed) cyrus-imapd-2.3.9-7.fc7.x86_64 libdb-4.5.so()(64bit) is needed by (installed) iproute-2.6.20-2.fc7.x86_64 libdb-4.5.so()(64bit) is needed by (installed) libgda-1.9.100-12.fc7.x86_64 libdb-4.5.so()(64bit) is needed by (installed) perl-5.8.8-24.fc7.x86_64 libdb-4.5.so()(64bit) is needed by (installed) ruby-libs-1.8.6.110-1.fc7.x86_64 libdb-4.5.so()(64bit) is needed by (installed) apr-util-1.2.10-1.fc7.x86_64 libdb-4.5.so()(64bit) is needed by (installed) httpd-2.2.6-1.fc7.x86_64 libdb-4.5.so()(64bit) is needed by (installed) sendmail-8.14.1-4.2.fc7.x86_64 libdb-4.5.so()(64bit) is needed by (installed) cyrus-imapd-utils-2.3.9-7.fc7.x86_64 libdb-4.5.so()(64bit) is needed by (installed) pam_ccreds-4-2.fc7.x86_64 libdb-4.5.so()(64bit) is needed by (installed) cyrus-imapd-2.3.9-7.fc7.x86_64 libdb-4.5.so()(64bit) is needed by (installed) mutt-1.5.14-4.fc7.x86_64 libdb-4.5.so()(64bit) is needed by (installed) squidGuard-1.2.0-15.fc7.x86_64 libdb-4.5.so()(64bit) is needed by (installed) webalizer-2.01_10-32.x86_64 libdb-4.5.so()(64bit) is needed by (installed) python-2.5-12.fc7.x86_64 libdb-4.5.so()(64bit) is needed by (installed) evolution-data-server-1.10.3.1-2.fc7.x86_64 libdb-4.5.so()(64bit) is needed by (installed) openoffice.org-core-2.2.1-18.2.fc7.x86_64 db4 is needed by (installed) pam_ccreds-4-2.fc7.x86_64 db4 is needed by (installed) evolution-data-server-1.10.3.1-2.fc7.x86_64
The magic between cd-upgrade and yum-upgrade is that no services are running during cd-update. I'm not sure we want to do this during yum update.
Based on the date this bug was created, it appears to have been reported during the development of Fedora 8. In order to refocus our efforts as a project we are changing the version of this bug to '8'. If this bug still exists in rawhide, please change the version back to rawhide. (If you're unable to change the bug's version, add a comment to the bug and someone will change it for you.) Thanks for your help and we apologize for the interruption. The process we're following is outlined here: http://fedoraproject.org/wiki/BugZappers/F9CleanUp We will be following the process here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this doesn't happen again.
During an update of both db4 (between incompatible versions) and cyrus-imapd the db4 is updated first and then it is not possible to export the cyrus-imapd databases. The solution could be usage of %pretrans and %postrans script. It will stop cyrus-imapd when the old db4 installed yet and start it with the new db4. *** This bug has been marked as a duplicate of 160317 ***