[Dovecot] Multiple MYSQL hosts as passdb backend
moody_cz
moodycz01 at gmail.com
Wed Nov 17 01:44:39 EET 2010
Hello,
I use mysql as passdb backend for my dovecot 2.0.6 installation. I have 2
mysql 5.0.77 servers with master/slave replication enabled. My goal is to
ensure dovecot's ability to provide its services even when one of the mysql
hosts are unavailable. Here is my passdb backend conf:
passdb {
driver = sql
args = /etc/dovecot/mysql.conf
}
and mysql.conf:
default_pass_scheme = PLAIN
driver = mysql
connect = host=10.0.0.3 host=10.0.0.4 dbname=some_database user=some_user
password=some_password
password_query = some_query
Everything works fine as long as 10.0.0.3 is up and running. However, when I
shutdown mysql server on 10.0.0.3, dovecot won't even try the other host
10.0.0.4 as it is told to do in the conf.
My dovecot verbose log says:
Nov 16 14:29:24 auth: Error: mysql: Query failed, retrying: MySQL server has
gone away
Nov 16 14:29:24 auth: Error: mysql: Connect failed to 10.0.0.3
(some_database): Can't connect to MySQL server on '10.0.0.3' (111) - waiting
for 1 seconds before retry
Nov 16 14:30:28 auth-worker: Error: mysql: Query timed out (no free
connections for 64 secs): some_sql_query
Nov 16 14:30:28 auth-worker: Error: sql(mail_user,127.0.0.1): Password query
failed: Not connected to database
Nov 16 14:30:28 auth: Error: auth worker: Aborted request: Lookup timed out
Nov 16 14:30:28 auth: Error: mysql: Connect failed to 10.0.0.3
(some_database): Can't connect to MySQL server on '10.0.0.3' (111) - waiting
for 1 seconds before retry
Nov 16 14:31:33 pop3-login: Info: Disconnected (auth failed, 1 attempts):
user=<mail_user>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
What am I doing wrong? Thanks for reply in advance.
--
View this message in context: http://old.nabble.com/Multiple-MYSQL-hosts-as-passdb-backend-tp30234196p30234196.html
Sent from the Dovecot mailing list archive at Nabble.com.
More information about the dovecot
mailing list