[Dovecot] dovecot bug - kevent(EV_DELETE, 9)
Sorry for my english.
FreeBSD 7.0-STABLE dovecot-1.1.2_1 (from ports with LDAP) AD LDAP на Win 2003 SP2 (work via GK) CPU 2xIntel XEON NFS not used
LDAP part of dovecot.conf (if you need all file, l'll send it): auth default { mechanisms = plain login passdb ldap { args = /usr/local/etc/dovecot-ldap.conf }
userdb ldap {
args = /usr/local/etc/dovecot-ldap.conf
}
user = nobody
count = 1
ssl_require_client_cert = no
ssl_username_from_cert = no
#Postfix Auth
socket listen {
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}
}
}
Whole dovecot-ldap.conf: hosts = 192.168.8.5:3268 192.168.8.6:3268 dn = CN=SomeUser,OU=SomeOU,DC=domain,DC=ru dnpass = password tls = no debug_level = 0 auth_bind = yes ldap_version = 3 base = DC=domain,DC=ru deref = never scope = subtree user_filter = (&(mail=%u)(objectclass=user)(memberOf=CN=Mail,OU=SomeOU,DC=domain,DC=ru)) pass_filter = (&(mail=%u)(objectclass=user)(memberOf=CN=Mail,OU=SomeOU,DC=domain,DC=ru)) default_pass_scheme = CRYPT
My problem.
dovecot works fine with AD! but i have this in logs (This not nice, but no more): Aug 14 02:21:03 somecomp dovecot: auth(default): LDAP: Connection lost to LDAP server, reconnecting Aug 14 02:21:03 somecomp dovecot: auth(default): kevent(EV_DELETE, 9) failed: Bad file descriptor Aug 14 02:36:04 somecomp dovecot: auth(default): LDAP: Connection lost to LDAP server, reconnecting Aug 14 02:36:04 somecomp dovecot: auth(default): kevent(EV_DELETE, 9) failed: Bad file descriptor Aug 14 02:51:04 somecomp dovecot: auth(default): LDAP: Connection lost to LDAP server, reconnecting Aug 14 02:51:04 somecomp dovecot: auth(default): kevent(EV_DELETE, 9) failed: Bad file descriptor Aug 14 03:06:05 somecomp dovecot: auth(default): LDAP: Connection lost to LDAP server, reconnecting Aug 14 03:06:05 somecomp dovecot: auth(default): kevent(EV_DELETE, 9) failed: Bad file descriptor Aug 14 03:21:05 somecomp dovecot: auth(default): LDAP: Connection lost to LDAP server, reconnecting Aug 14 03:21:05 somecomp dovecot: auth(default): kevent(EV_DELETE, 9) failed: Bad file descriptor Aug 14 03:36:06 somecomp dovecot: auth(default): LDAP: Connection lost to LDAP server, reconnecting Aug 14 03:36:06 somecomp dovecot: auth(default): kevent(EV_DELETE, 9) failed: Bad file descriptor
docecot was launched with debug_level = -1 in dovecot.conf. If you need this log (it's very big) - i send it too. But i don't see in it something new (dovecot check connection when it lost and succesefully reconnecting to AD LDAP).
I want to know: What this event means? Can i fix it and what to fix?
dovecot works fine with AD! but i have this in logs (This not nice, but no more): Aug 14 02:21:03 somecomp dovecot: auth(default): LDAP: Connection lost to LDAP server, reconnecting Aug 14 02:21:03 somecomp dovecot: auth(default): kevent(EV_DELETE, 9) failed: Bad file descriptor Aug 14 02:36:04 somecomp dovecot: auth(default): LDAP: Connection lost to LDAP server, reconnecting Aug 14 02:36:04 somecomp dovecot: auth(default): kevent(EV_DELETE, 9) failed: Bad file descriptor Aug 14 02:51:04 somecomp dovecot: auth(default): LDAP: Connection lost to LDAP server, reconnecting Aug 14 02:51:04 somecomp dovecot: auth(default): kevent(EV_DELETE, 9) failed: Bad file descriptor Aug 14 03:06:05 somecomp dovecot: auth(default): LDAP: Connection lost to LDAP server, reconnecting Aug 14 03:06:05 somecomp dovecot: auth(default): kevent(EV_DELETE, 9) failed: Bad file descriptor Aug 14 03:21:05 somecomp dovecot: auth(default): LDAP: Connection lost to LDAP server, reconnecting Aug 14 03:21:05 somecomp dovecot: auth(default): kevent(EV_DELETE, 9) failed: Bad file descriptor Aug 14 03:36:06 somecomp dovecot: auth(default): LDAP: Connection lost to LDAP server, reconnecting Aug 14 03:36:06 somecomp dovecot: auth(default): kevent(EV_DELETE, 9) failed: Bad file descriptor
I understand. Windows 2003 close idle connections every 15 minutes (that policy set by default in any windows 2003 server) and dovecot reconnects with this error.
Unfortunately dovecot haven't "keep-alive" parameter to keep connection to LDAP alive (not idle). :( And only that parameter can resolve my problem.
On Wed, 2008-08-20 at 22:43 +0400, Mail.ru wrote:
dovecot works fine with AD! but i have this in logs (This not nice, but no more): Aug 14 02:21:03 somecomp dovecot: auth(default): LDAP: Connection lost to LDAP server, reconnecting Aug 14 02:21:03 somecomp dovecot: auth(default): kevent(EV_DELETE, 9) failed: Bad file descriptor
These should help for the "Bad file descriptor" error:
http://hg.dovecot.org/dovecot-1.1/rev/0930aa699486 http://hg.dovecot.org/dovecot-1.1/rev/155d4e597397
I understand. Windows 2003 close idle connections every 15 minutes (that policy set by default in any windows 2003 server) and dovecot reconnects with this error.
Unfortunately dovecot haven't "keep-alive" parameter to keep connection to LDAP alive (not idle). :( And only that parameter can resolve my problem.
What "keep-alive parameter"? If you mean for TCP connections, it is already set and it doesn't help here. Does LDAP have a keep-alive option too? I think the two timeout options I see are about client-side timeout handling. One thing Dovecot could do is to send a dummy LDAP request every few minutes, but that seems pretty ugly.
Здравствуйте, Timo.
Вы писали 21 августа 2008 г., 8:42:24:
On Wed, 2008-08-20 at 22:43 +0400, Mail.ru wrote:
dovecot works fine with AD! but i have this in logs (This not nice, but no more): Aug 14 02:21:03 somecomp dovecot: auth(default): LDAP: Connection lost to LDAP server, reconnecting Aug 14 02:21:03 somecomp dovecot: auth(default): kevent(EV_DELETE, 9) failed: Bad file descriptor
These should help for the "Bad file descriptor" error:
http://hg.dovecot.org/dovecot-1.1/rev/0930aa699486 http://hg.dovecot.org/dovecot-1.1/rev/155d4e597397
I understand. Windows 2003 close idle connections every 15 minutes (that policy set by default in any windows 2003 server) and dovecot reconnects with this error.
Unfortunately dovecot haven't "keep-alive" parameter to keep connection to LDAP alive (not idle). :( And only that parameter can resolve my problem.
What "keep-alive parameter"? If you mean for TCP connections, it is already set and it doesn't help here. Does LDAP have a keep-alive option too? I think the two timeout options I see are about client-side timeout handling. One thing Dovecot could do is to send a dummy LDAP request every few minutes, but that seems pretty ugly.
Thank you very much!!! The patch is working fine. I haven't errors in logs any more.
About "keep-alive parameter" - I mean keep-alive option in config (like you said: "to send a dummy LDAP request every few minutes"). And i don't think that this "seems pretty ugly". When connection idle dovecot will reconnect to the LDAP every N minutes. Time interval (N minutes) sets by idle_timeout option in OpenLDAP (or by GPO in AD).
In logs it's look like (without error): Aug 14 03:36:06 somecomp dovecot: auth(default): LDAP: Connection lost to LDAP server, reconnecting Aug 14 03:51:06 somecomp dovecot: auth(default): LDAP: Connection lost to LDAP server, reconnecting Aug 14 04:06:06 somecomp dovecot: auth(default): LDAP: Connection lost to LDAP server, reconnecting
It's only IMHO: If you can add this option in new version of dovecot (only for LDAP), i will be happy (and not only me). :)
P.S. Thanks for patch again!
participants (2)
-
Mail.ru
-
Timo Sirainen