[Dovecot] Director problems
Hi,
I've just setup a testing enviroment for director, and it's not working as expected. I have just 1 director (called director) and 2 dovecot servers (dovecot1 and dovecot2); these are exact copies.
First problem: when both dovecot servers are up, every imap connection is redirected to the same server as you can see here:
$ sudo doveadm director map user mail server ip expire time
<unknown> 158.227.4.186 2012-06-06 13:34:12 <unknown> 158.227.4.186 2012-06-06 13:34:27 <unknown> 158.227.4.186 2012-06-06 13:34:34
(I don't know if that <unknown> is good or not)
I've tried with 3 different users and ips to no change, users are always directed to the same host.
Second problem: if I try to add/remove/modify one of the dovecot servers, the output of doveadm director map/status seems to be ok, but any new user connection fails with this log:
Jun 6 14:51:59 director dovecot: director: Warning: Delaying new user
requests until ring is synced
Jun 6 14:52:27 director dovecot: director: Error: director: User test1
host lookup failed: Timeout - queued for 30 secs (Ring not synced for 73
secs)
Jun 6 14:52:31 director dovecot: imap-login: Aborted login (auth
failed, 1 attempts in 34 secs): user=<>, method=PLAIN,
rip=158.227.4.186, lip=158.227.4.185, TLS, session=
Any clue?
This is the dovecot config -n output:
# 2.1.7: /usr/local/etc/dovecot/dovecot.conf # OS: Linux 2.6.32-220.17.1.el6.x86_64 x86_64 Red Hat Enterprise Linux Server release 6.2 (Santiago) director_mail_servers = dovecot1.example dovecot2.example director_servers = director.example lmtp_proxy = yes managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave passdb { args = proxy=y nopassword=y starttls=any-cert driver = static } service auth { unix_listener auth-userdb { group = mail mode = 0660 user = dovecot } } service director { fifo_listener login/proxy-notify { mode = 0666 } inet_listener { port = 9090 } unix_listener director-userdb { mode = 0600 } unix_listener login/director { mode = 0666 } } service imap-login { executable = imap-login director service_count = 0 } service lmtp { client_limit = 1 inet_listener lmtp { port = 24 } unix_listener /var/lib/dovecot/lmtp-socket { group = root mode = 0600 user = root } } service pop3-login { executable = pop3-login director service_count = 0 } service pop3 { process_limit = 5000 } shutdown_clients = no ssl_cert =
On 6.6.2012, at 16.01, Joseba Torre wrote:
I've just setup a testing enviroment for director, and it's not working as expected. I have just 1 director (called director) and 2 dovecot servers (dovecot1 and dovecot2); these are exact copies.
First problem: when both dovecot servers are up, every imap connection is redirected to the same server as you can see here:
$ sudo doveadm director map user mail server ip expire time <unknown> 158.227.4.186 2012-06-06 13:34:12 <unknown> 158.227.4.186 2012-06-06 13:34:27 <unknown> 158.227.4.186 2012-06-06 13:34:34
(I don't know if that <unknown> is good or not)
I've tried with 3 different users and ips to no change, users are always directed to the same host.
Perhaps you just managed to use such usernames that map to the same director.. You can try with "doveadm director status <user>" to see where they should go.
Second problem: if I try to add/remove/modify one of the dovecot servers, the output of doveadm director map/status seems to be ok, but any new user connection fails with this log:
Jun 6 14:51:59 director dovecot: director: Warning: Delaying new user requests until ring is synced
Looks like there's a bug when only one director is used. I'll try and fix it later..
El 09/06/12 23:17, Timo Sirainen escribió:
On 6.6.2012, at 16.01, Joseba Torre wrote:
I've just setup a testing enviroment for director, and it's not working as expected. I have just 1 director (called director) and 2 dovecot servers (dovecot1 and dovecot2); these are exact copies.
First problem: when both dovecot servers are up, every imap connection is redirected to the same server as you can see here:
$ sudo doveadm director map user mail server ip expire time <unknown> 158.227.4.186 2012-06-06 13:34:12 <unknown> 158.227.4.186 2012-06-06 13:34:27 <unknown> 158.227.4.186 2012-06-06 13:34:34
(I don't know if that<unknown> is good or not)
I've tried with 3 different users and ips to no change, users are always directed to the same host.
Perhaps you just managed to use such usernames that map to the same director.. You can try with "doveadm director status<user>" to see where they should go.
I was thinking that users where sent to one server or another in a more or less random way. As always, your guess was right, test[1-4] are all sent to the same server, but for example jorge is sent to the other one.
Second problem: if I try to add/remove/modify one of the dovecot servers, the output of doveadm director map/status seems to be ok, but any new user connection fails with this log:
Jun 6 14:51:59 director dovecot: director: Warning: Delaying new user requests until ring is synced
Looks like there's a bug when only one director is used. I'll try and fix it later..
Thanks a lot for your support
On 11.6.2012, at 13.43, Joseba Torre wrote:
I've tried with 3 different users and ips to no change, users are always directed to the same host.
Perhaps you just managed to use such usernames that map to the same director.. You can try with "doveadm director status<user>" to see where they should go.
I was thinking that users where sent to one server or another in a more or less random way. As always, your guess was right, test[1-4] are all sent to the same server, but for example jorge is sent to the other one.
The "randomness" is basically md5(username)%2.
Second problem: if I try to add/remove/modify one of the dovecot servers, the output of doveadm director map/status seems to be ok, but any new user connection fails with this log:
Jun 6 14:51:59 director dovecot: director: Warning: Delaying new user requests until ring is synced
Looks like there's a bug when only one director is used. I'll try and fix it later..
Thanks a lot for your support
Second problem: if I try to add/remove/modify one of the dovecot servers, the output of doveadm director map/status seems to be ok, but any new user connection fails with this log:
Jun 6 14:51:59 director dovecot: director: Warning: Delaying new user requests until ring is synced
Looks like there's a bug when only one director is used. I'll try and fix it later..
Thanks a lot for your support
Works perfectly, thank you
participants (2)
-
Joseba Torre
-
Timo Sirainen