From: Alex <mys...@gm...> - 2014-07-01 20:24:33
|
Hi, > I wrote the DBCluster code. I've just tested the scenario where the > sql-master dies and in my test it continues as expected, simply allowing > everything through. That's good to know. I'd definitely like to see about getting sqlgrey working properly before trying alternatives, so I very much appreciate your help. > I've tested both running sql loosing master and restarting sqlgrey with > master gone. If the master-db doesn't work, it simply seems to keep calm > and carry on. In both cases. > > When sqlgrey tries to reconnect, it fails and will keep failing. When this > happens i can clearly see it in my logfile: > sqlgrey: dbaccess: Using DBIx:DBCluster > sqlgrey: warning: Could not connect to any server in WRITE_HOSTS at > ./sqlgrey line 833 > sqlgrey: dbaccess: can't connect to DB: Can't connect to MySQL server on > '127.0.0.2' (111) > sqlgrey: dbaccess: error: couldn't access optout_domain table: Can't > connect to MySQL server on '127.0.0.2' (111) Yes, that is the very same messages I receive: Jun 30 06:35:16 mail03 sqlgrey: warning: Could not connect to any server in WRITE_HOSTS at /usr/sbin/sqlgrey line 827. Jun 30 06:35:16 mail03 sqlgrey: dbaccess: can't connect to DB: Can't connect to MySQL server on 'mail02.example.com' (113) Jun 30 06:35:16 mail03 sqlgrey: dbaccess: error: couldn't access config table: Can't connect to MySQL server on 'mail02.example.com' (113) Jun 30 06:35:16 mail03 sqlgrey: mail: failed to send: Jun 30 06:35:16 mail03 sqlgrey: fatal: setconfig error at /usr/sbin/sqlgrey line 195. I have sqlgrey defined as such in master.cf: greylist unix - n n - 0 spawn user=nobody argv=/usr/bin/perl /usr/sbin/sqlgrey and "check_policy_service inet:127.0.0.1:2501" in main.cf. > In fact, the ONLY way i have been able to get a "Server configuration > problem" in my tests, is if i point the db_host to a server that behind a > firewall that DROPS packages. This makes "connect" hang for a very long > time, which makes postfix drop the connection due to timeout and cry > "Server configuration problem". Have I configured postfix incorrectly? I'll include my sqlgrey.conf again, in hopes it helps. loglevel = 3 log_override = whitelist:1,grey:3,spam:2 reconnect_delay = 5 db_type = mysql db_name = sqlgrey db_host = mail02.example.com db_port = default db_user = sqlgrey db_pass = mypass db_cleanup_hostname=mail02.example.com db_cleandelay = 1800 clean_method = sync db_cluster = on read_hosts=localhost,mail02.example.com,mail03.example.com, mail01.example.com prepend = 1 admin_mail = my...@me... Thanks again, Alex |