View previous topic :: View next topic |
Author |
Message |
selim Apprentice
Joined: 14 Apr 2004 Posts: 219
|
Posted: Wed Aug 16, 2006 2:08 am Post subject: cyrus imap lmtp socket timeout |
|
|
Aug 16 03:55:11 startseite4 sm-mta[7956]: k7FEZIJQ006323: to=<vui.olafnguyen@startseite.de>, delay=11:19:52, xdelay=00:05:00, mailer=cyrusv2, pri=121929, relay=localhost, dsn=4.4.2, stat=Deferred: Connection timed out with localhost
Aug 16 03:55:16 startseite4 sm-mta[7947]: k7FF37GR004437: to=<zentowski.ronald@startseite.de>, delay=10:52:07, xdelay=00:05:00, mailer=cyrusv2, pri=121937, relay=localhost, dsn=4.4.2, stat=Deferred: Connection timed out with localhost
I get this timeout from my localhost lmtp socket, created via cyrus imap.
My netstat shows me this:
unix 2 [ ACC ] STREAM LISTENING 8779 /var/imap/socket/lmtp
so the socket seems open. How can I find out why my sendmail get a timeout from this socket. Any way to check the connection?
Another strange thing I've noticed:
every time I do a "ps aux|grep lmtp" I get this line
cyrus 21744 0.0 0.0 0 0 ? Z 04:29 0:00 [lmtpd] <defunct>
pid changes every time so it seems lmtp which makes problem, a bug maybe?
Sebastian |
|
Back to top |
|
|
Janne Pikkarainen Veteran
Joined: 29 Jul 2003 Posts: 1143 Location: Helsinki, Finland
|
Posted: Wed Aug 16, 2006 7:38 am Post subject: |
|
|
Is this a working Cyrus installation, which just suddenly stopped receiving mail? Or a completely new installation? If a previous installation, try to restart Cyrus. I've seen similar situation couple of times and restarting Cyrus should help. _________________ Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.". |
|
Back to top |
|
|
selim Apprentice
Joined: 14 Apr 2004 Posts: 219
|
Posted: Wed Aug 16, 2006 11:00 am Post subject: |
|
|
It was a working cyrus installation, which I updated. After that I've restarted it serveral times and even restarted the whole system but seems to have no effect.
I get this errors from cyrus now in my messages log:
Aug 16 13:01:19 startseite4 master[6585]: service lmtpunix pid 30069 in READY st
ate: terminated abnormally
Aug 16 13:01:19 startseite4 master[6585]: service lmtpunix pid 30070 in READY st
ate: terminated abnormally
Aug 16 13:01:19 startseite4 master[6585]: service lmtpunix pid 30072 in READY st
ate: terminated abnormally
Aug 16 13:01:19 startseite4 lmtpunix[30130]: DBERROR : db4
Aug 16 13:01:19 startseite4 lmtpunix[30133]: DBERROR : db4 |
|
Back to top |
|
|
Janne Pikkarainen Veteran
Joined: 29 Jul 2003 Posts: 1143 Location: Helsinki, Finland
|
Posted: Wed Aug 16, 2006 11:12 am Post subject: |
|
|
Ok. There might be something wrong with your /var/imap/db/ directory. Try these steps and BACKUP YOUR /var/imap/ FIRST.
1. Just to make sure: BACKUP YOUR /var/imap/. I shall not take any responsibility whatsoever.
2. Stop Cyrus with /etc/init.d/cyrus stop.
3. Check your current BerkeleyDB version with emerge -pv db
4. Do this: Code: | cd /var/imap/db
dbX.Y_recover (where X.Y is the BDB version you did see before: for example, for BDB 4.1 you would run db4.1_recover) |
5. Wait until it finishes.
6. Restart Cyrus with /etc/init.d/cyrus start.
7. See if it works. _________________ Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.". |
|
Back to top |
|
|
selim Apprentice
Joined: 14 Apr 2004 Posts: 219
|
Posted: Wed Aug 16, 2006 1:48 pm Post subject: |
|
|
I get this for emerge -pv db:
[ebuild R ] sys-libs/db-4.2.52_p2-r1 USE="-bootstrap -doc -java -nocxx -tcl -test" 0 kB
and this when I try to start db4.2_recover:
db_recover: Program version 4.2 doesn't match environment version |
|
Back to top |
|
|
selim Apprentice
Joined: 14 Apr 2004 Posts: 219
|
Posted: Wed Aug 16, 2006 1:53 pm Post subject: |
|
|
Ok, I've found out that I'm using db 4.3.x and tried "db4.3_recovery in /var/imap/db and got this:
db_recover: Skipping log file log.0000000085: historic log version 8
db_recover: log.0000000086: log file open failed: No such file or directory
db_recover: PANIC: No such file or directory
db_recover: DB_ENV->log_put: 86: DB_RUNRECOVERY: Fatal error, run database recovery
db_recover: dbenv->close: DB_RUNRECOVERY: Fatal error, run database recovery |
|
Back to top |
|
|
Janne Pikkarainen Veteran
Joined: 29 Jul 2003 Posts: 1143 Location: Helsinki, Finland
|
Posted: Wed Aug 16, 2006 2:19 pm Post subject: |
|
|
Maybe you have some old logs in that directory and you have upgraded Cyrus or BerkeleyDB over time. In that situation a previous installation might have been used older version of BDB. _________________ Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.". |
|
Back to top |
|
|
selim Apprentice
Joined: 14 Apr 2004 Posts: 219
|
Posted: Wed Aug 16, 2006 2:23 pm Post subject: |
|
|
So what can I do in this case? |
|
Back to top |
|
|
selim Apprentice
Joined: 14 Apr 2004 Posts: 219
|
Posted: Wed Aug 16, 2006 2:32 pm Post subject: |
|
|
I tried db4.2_recover again, and got no error just the prompt again, is this what it should do?
Ok, I've done it with -v an got this:
db_recover: Finding last valid log LSN: file: 85 offset 4849583
db_recover: Recovery starting from [85][4849459]
db_recover: Recovery complete at Wed Aug 16 16:32:45 2006
db_recover: Maximum transaction ID 80005e36 Recovery checkpoint [85][4849583]
so it seems to work correctly now. But why does it tell me it doesn't match the envirement?
Last edited by selim on Wed Aug 16, 2006 2:37 pm; edited 1 time in total |
|
Back to top |
|
|
Janne Pikkarainen Veteran
Joined: 29 Jul 2003 Posts: 1143 Location: Helsinki, Finland
|
Posted: Wed Aug 16, 2006 2:34 pm Post subject: |
|
|
Still in the /var/imap/db/ directory give command db4.3_archive -v. It shows you the log files BDB does NOT need anymore.
If you are confident about the results and you have a fresh backup of log files, you can remove those files with Code: | db4.3_archive -v | xargs rm | command, of course command given in /var/imap/db/ directory. _________________ Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.". |
|
Back to top |
|
|
Janne Pikkarainen Veteran
Joined: 29 Jul 2003 Posts: 1143 Location: Helsinki, Finland
|
Posted: Wed Aug 16, 2006 2:37 pm Post subject: |
|
|
Oh, you had replied me while I typed my previous reply!
If db4.2_recover did proceed without errors, that probably was the correct version for your Cyrus. In that case just restarting Cyrus should make it work again. _________________ Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.". |
|
Back to top |
|
|
selim Apprentice
Joined: 14 Apr 2004 Posts: 219
|
Posted: Wed Aug 16, 2006 2:39 pm Post subject: |
|
|
sorry, it does not, I get the same error in my messages log:
Aug 16 16:39:17 startseite4 lmtpunix[2057]: DBERROR : db4
Aug 16 16:39:17 startseite4 lmtpunix[2063]: DBERROR : db4
Aug 16 16:39:17 startseite4 master[31393]: service lmtpunix pid 2057 in READY state: terminated abnormally
Aug 16 16:39:17 startseite4 master[31393]: service lmtpunix pid 2063 in READY state: terminated abnormally
Aug 16 16:39:17 startseite4 imap[2064]: DBERROR C : db4
Aug 16 16:39:17 startseite4 lmtpunix[2065]: DBERROR : db4
Aug 16 16:39:19 startseite4 master[31393]: exiting on SIGTERM/SIGINT |
|
Back to top |
|
|
Janne Pikkarainen Veteran
Joined: 29 Jul 2003 Posts: 1143 Location: Helsinki, Finland
|
Posted: Wed Aug 16, 2006 2:44 pm Post subject: |
|
|
So some database is still a bit rotten. Do you use duplicate suppression? In that case /var/imap/deliver.db can be the one which is corrupted. It's safe (knock, knock) to remove, only consequence being that if some user for any reason receives the exactly same mail again, it will be delivered to user instead of rejecting it. So you might try
Code: | /etc/init.d/cyrus stop
cd /var/imap
mv deliver.db deliver.db.bak
/etc/init.d/cyrus start |
_________________ Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.". |
|
Back to top |
|
|
selim Apprentice
Joined: 14 Apr 2004 Posts: 219
|
Posted: Wed Aug 16, 2006 2:48 pm Post subject: |
|
|
hmm, nothing changed, I've done the rename as you mentioned it but I still have:
Aug 16 16:47:48 startseite4 master[6536]: service lmtpunix pid 7061 in READY state: terminated abnormally
Aug 16 16:47:48 startseite4 master[6536]: service lmtpunix pid 7062 in READY state: terminated abnormally
Aug 16 16:47:48 startseite4 lmtpunix[7953]: DBERROR : db4 |
|
Back to top |
|
|
Janne Pikkarainen Veteran
Joined: 29 Jul 2003 Posts: 1143 Location: Helsinki, Finland
|
Posted: Wed Aug 16, 2006 2:51 pm Post subject: |
|
|
What the...
Do you have any idea when this started? You might want to search for the very first occurence of that DB4 error line and see log lines around it. Sometimes Cyrus does spit out some more verbose output about why it decided to bork. _________________ Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.". |
|
Back to top |
|
|
selim Apprentice
Joined: 14 Apr 2004 Posts: 219
|
Posted: Wed Aug 16, 2006 2:55 pm Post subject: |
|
|
I have some errors like this:
Aug 13 03:34:51 startseite4 syslog-ng[6180]: new configuration initialized
Aug 13 03:34:50 startseite4 lmtpunix[3840]: DBERROR db4: Program version 4.2 doe
sn't match environment version
Aug 13 03:34:50 startseite4 lmtpunix[3840]: DBERROR db4: environment not yet ope
ned
Aug 13 03:34:50 startseite4 master[23490]: service lmtpunix pid 3840 in READY st
ate: terminated abnormally
Aug 13 03:34:51 startseite4 lmtpunix[3947]: DBERROR db4: environment not yet ope
ned
Aug 13 03:34:50 startseite4 master[23490]: service lmtpunix pid 3844 in READY st
ate: terminated abnormally
Aug 13 03:34:51 startseite4 lmtpunix[3948]: DBERROR db4: Program version 4.2 doe
sn't match environment version
Aug 13 03:34:51 startseite4 lmtpunix[3948]: DBERROR db4: environment not yet ope
ned
Aug 13 03:34:51 startseite4 lmtpunix[3949]: DBERROR db4: Program version 4.2 doe
sn't match environment version
Aug 13 03:34:51 startseite4 lmtpunix[3949]: DBERROR db4: environment not yet ope
ned
Aug 13 03:34:50 startseite4 master[23490]: service lmtpunix pid 3845 in READY st
seems to be one of the first errors in this case |
|
Back to top |
|
|
Janne Pikkarainen Veteran
Joined: 29 Jul 2003 Posts: 1143 Location: Helsinki, Finland
|
Posted: Wed Aug 16, 2006 2:57 pm Post subject: |
|
|
Ok. It figures. Now please tell me, have you upgraded any software lately? It seems like Cyrus is currently linked against different BDB library version than it actually uses. Re-emerging Cyrus might help. _________________ Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.". |
|
Back to top |
|
|
selim Apprentice
Joined: 14 Apr 2004 Posts: 219
|
Posted: Wed Aug 16, 2006 3:09 pm Post subject: |
|
|
I'll try a complete reemerge of cyrus and a complete reemerge of db, we'll see if it works.
Thank you so far, if I have some more problems I try it again, at this place |
|
Back to top |
|
|
Janne Pikkarainen Veteran
Joined: 29 Jul 2003 Posts: 1143 Location: Helsinki, Finland
|
Posted: Wed Aug 16, 2006 3:09 pm Post subject: |
|
|
Ok. _________________ Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.". |
|
Back to top |
|
|
selim Apprentice
Joined: 14 Apr 2004 Posts: 219
|
Posted: Wed Aug 16, 2006 3:40 pm Post subject: |
|
|
Ok, reemerge doesn't helped anything.
Some other ideas maybe? |
|
Back to top |
|
|
Janne Pikkarainen Veteran
Joined: 29 Jul 2003 Posts: 1143 Location: Helsinki, Finland
|
Posted: Wed Aug 16, 2006 3:43 pm Post subject: |
|
|
Hmm. My server seems to have db 4.2 installed instead of db 4.3. Maybe you should force Cyrus believe that db 4.2 is used. How that's done, I don't know (yet) ... Google, here I come! _________________ Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.". |
|
Back to top |
|
|
Janne Pikkarainen Veteran
Joined: 29 Jul 2003 Posts: 1143 Location: Helsinki, Finland
|
Posted: Wed Aug 16, 2006 3:57 pm Post subject: |
|
|
That's odd. Cyrus should work ok with BDB 4.3, too. What does ldd /usr/cyrus/bin/lmtpd return? For me it shows DB 4.2:
Code: | jaba@myserver ~ % ldd /usr/lib/cyrus/lmtpd
linux-gate.so.1 => (0xffffe000)
libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0xb7f78000)
libdl.so.2 => /lib/libdl.so.2 (0xb7f74000)
libresolv.so.2 => /lib/libresolv.so.2 (0xb7f62000)
libdb-4.2.so => /usr/lib/libdb-4.2.so (0x4ac67000)
libc.so.6 => /lib/tls/libc.so.6 (0xb7e4f000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0xb7e22000)
/lib/ld-linux.so.2 (0xb7f9d000)
libpthread.so.0 => /lib/tls/libpthread.so.0 (0xb7e0f000) |
_________________ Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.". |
|
Back to top |
|
|
|