[Dovecot] mysql auth failover failing
tss at iki.fi
Thu Sep 15 13:53:28 EEST 2011
On Fri, 2011-09-09 at 19:33 -0700, Paul B. Henson wrote:
> Sep 9 15:47:34 tweak dovecot: auth: Error:
> mysql(mysql-1.unx.csupomona.edu): Connect failed to database (idmgmt):
> Can't connect to MySQL server on 'mysql-1.unx.csupomona.edu' (111) -
> waiting for 1 seconds before retry
I did several fixes related to this in v2.0 hg.
> And postfix starts to fail authentications:
> Sep 9 15:47:35 tweak postfix/smtpd: warning:
> bender.iitsys.csupomona.edu[220.127.116.11]: SASL DIGEST-MD5
> authentication failed: Connection lost to authentication server
The reason why it kept failing with Postfix was because Dovecot had 10
second timeout for SQL connecting, and Postfix had 10 second timeout
before failing authentication. So Postfix never waited long enough for
Dovecot to attempt a second connection to the second MySQL server. I
dropped Dovecot's SQL connect timeout to 5 seconds.
> Now and again the authentication process dies:
> Sep 9 15:47:39 tweak dovecot: auth: Panic: file auth-request-handler.c:
> line 697 (auth_request_handler_flush_failures): assertion failed:
> (auth_request->state == AUTH_REQUEST_STATE_FINISHED)
This happened only with non-plaintext authentication (e.g. DIGEST-MD5).
More information about the dovecot