1

Topic: Cant connect to MySQL server

==== Required information ====
- iRedMail version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Linux/BSD distribution name and version:
- Related log if you're reporting an issue:
======== Required information ====
- iRedMail version: 0.8.4
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql
- Linux/BSD distribution name and version: Debian/Wheezy Stable
- Related log if you're reporting an issue:
====

Hello Zhang,

This happens once in 3 or 4 days and I have to restart my server to make the mail server work again. I get the following error when I try to send emails. This doesn't happen always. But once in a few days. Please suggest what went wrong. Thanks.

Nov 19 14:01:01 mx cleanup: clean up process starting: policyd v1.82
Nov 19 14:01:01 mx cleanup: clean up process starting: policyd v1.82
Nov 19 14:01:01 mx cleanup: connecting to mysql database: 127.0.0.1
Nov 19 14:01:01 mx cleanup: mysql_real_connect(): Can't connect to MySQL server on '127.0.0.1' (111)
Nov 19 14:01:01 mx cleanup: expiring throttlesender records older than 31 days (1382191261)
Nov 19 14:01:01 mx cleanup: connecting to mysql database: 127.0.0.1
Nov 19 14:01:01 mx cleanup: mysql_real_connect(): Can't connect to MySQL server on '127.0.0.1' (111)
Nov 19 14:01:01 mx cleanup: expiring validated records older than 7 days (1384264861)
Nov 19 16:01:01 mx cleanup: clean up process starting: policyd v1.82
Nov 19 16:01:01 mx cleanup: clean up process starting: policyd v1.82
Nov 19 16:01:01 mx cleanup: connecting to mysql database: 127.0.0.1
Nov 19 16:01:01 mx cleanup: mysql_real_connect(): Can't connect to MySQL server on '127.0.0.1' (111)
Nov 19 16:01:01 mx cleanup: expiring validated records older than 7 days (1384272061)
Nov 19 16:01:01 mx cleanup: connecting to mysql database: 127.0.0.1
Nov 19 16:01:01 mx cleanup: mysql_real_connect(): Can't connect to MySQL server on '127.0.0.1' (111)
Nov 19 16:01:01 mx cleanup: expiring throttlesender records older than 31 days (1382198461)
Nov 19 16:15:34 mx postfix/smtpd[21731]: connect from unknown[59.96.253.143]
Nov 19 16:15:46 mx postfix/smtpd[21731]: warning: unknown[59.96.253.143]: SASL PLAIN authentication failed: Connection lost to authentication server
Nov 19 16:15:57 mx postfix/smtpd[21731]: warning: unknown[59.96.253.143]: SASL LOGIN authentication failed: Connection lost to authentication server
Nov 19 16:16:07 mx postfix/smtpd[21731]: disconnect from unknown[59.96.253.143]

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Cant connect to MySQL server

How many times do you configure Policyd cleanup program to be executed? Try to reduce it.

3

Re: Cant connect to MySQL server

I haven't changed any setting. Is that inside /etc/postfix-policyd.conf ?

4

Re: Cant connect to MySQL server

Check cron job.

5

Re: Cant connect to MySQL server

ZhangHuangbin wrote:

Check cron job.

Zhang,

My crontab shows:

# cat /var/spool/cron/crontabs/policyd 


#
# File generated by iRedMail (2013.04.17.13.39.46):
#
# Version:  0.8.4
# Project:  http://www.iredmail.org/
#
# Community: http://www.iredmail.org/forum/
#

1    */2    *    *    *    /usr/lib/postfix-policyd/cleanup -c /etc/postfix-policyd.conf
1    */2    *    *    *    /usr/lib/postfix-policyd/cleanup -c /etc/postfix-policyd_throttle.conf

6

Re: Cant connect to MySQL server

Hi aniyan.rajan6,

Please don't try to get answer for each step by asking, why not try to understand what it means and make decision.