1

Topic: ERROR: iredapd/tools/cleanup_db.py and iredadmin/tools/delete_mailboxe

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.9
- Deployed with iRedMail Easy or the downloadable installer? download
- Linux/BSD distribution name and version: FreeBSD
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? Yes 3.1
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Im getting these errors after upgrading. What to do?

/usr/local/bin/python /opt/iredapd/tools/cleanup_db.py >/dev/null:

Traceback (most recent call last):
File "/opt/iredapd/tools/cleanup_db.py", line 47, in <module>
conn_iredapd.delete('greylisting_tracking', where='record_expired < %d' % now)
File "/usr/local/lib/python2.7/site-packages/web/db.py", line 942, in delete
self.ctx.commit()
File "/usr/local/lib/python2.7/site-packages/web/db.py", line 553, in commit
ctx.db.commit()
_mysql_exceptions.OperationalError: (2013, 'Lost connection to MySQL server during query')


/usr/local/bin/python /usr/local/www/iredadmin/tools/delete_mailboxes.py:

Traceback (most recent call last):
File "/usr/local/www/iredadmin/tools/delete_mailboxes.py", line 162, in <module>
qr = conn.select('deleted_mailboxes', where=sql_where)
File "/usr/local/lib/python2.7/site-packages/web/db.py", line 719, in select
return self.query(qout, processed=True)
File "/usr/local/lib/python2.7/site-packages/web/db.py", line 678, in query
db_cursor = self._db_cursor()
File "/usr/local/lib/python2.7/site-packages/web/db.py", line 590, in _db_cursor
return self.ctx.db.cursor()
File "/usr/local/lib/python2.7/site-packages/web/db.py", line 531, in _getctx
self._load_context(self._ctx)
File "/usr/local/lib/python2.7/site-packages/web/db.py", line 542, in _load_context
ctx.db = self._connect(self.keywords)
File "/usr/local/lib/python2.7/site-packages/web/db.py", line 570, in _connect
return self.db_module.connect(**keywords)
File "/usr/local/lib/python2.7/site-packages/MySQLdb/__init__.py", line 81, in Connect
return Connection(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 193, in __init__
super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (2026, 'SSL connection error: error:00000001:lib(0):func(0):reason(1)')

----

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

2

Re: ERROR: iredapd/tools/cleanup_db.py and iredadmin/tools/delete_mailboxe

- Did you get them frequently, or just once, or few times a day?
- Any error if you run the commands manually?

3

Re: ERROR: iredapd/tools/cleanup_db.py and iredadmin/tools/delete_mailboxe

ZhangHuangbin wrote:

- Did you get them frequently, or just once, or few times a day?
- Any error if you run the commands manually?

I get this error 2 or 3 times a day.
No error if I try to run the commands manually.

4

Re: ERROR: iredapd/tools/cleanup_db.py and iredadmin/tools/delete_mailboxe

Updating dovecot to dovecot-2.3.4_5 seems to have fixed this error!