1

Topic: Logrotate.service always failed everyday after reboot.

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

Feb 25 00:00:01 systemd[1]: Starting Rotate log files...
Feb 25 00:00:01 logrotate[33348]: [52B blob data]
Feb 25 00:00:01 logrotate[33348]: error: 'Access denied for user 'root'@'localhost' (using password: NO)'
Feb 25 00:00:01 logrotate[33310]: error: error running shared postrotate script for '/var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log /var/l>
Feb 25 00:00:02 systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE
Feb 25 00:00:02 systemd[1]: logrotate.service: Failed with result 'exit-code'.
Feb 25 00:00:02 systemd[1]: Failed to start Rotate log files.
====
Logrotate.service always failed everyday after reboot.

----

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

2

Re: Logrotate.service always failed everyday after reboot.

Try commands below:

cd /etc/mysql/
mv debian.cnf debian.cnf.bak
ln -sf /root/.my.cnf debian.cnf

3

Re: Logrotate.service always failed everyday after reboot.

ZhangHuangbin wrote:

Try commands below:

cd /etc/mysql/
mv debian.cnf debian.cnf.bak
ln -sf /root/.my.cnf debian.cnf

I tested it for two days, and it works perfectly, thanks so much, dear

4

Re: Logrotate.service always failed everyday after reboot.

This fix will be available in next iRedMail release too:
https://github.com/iredmail/iRedMail/co … 364559b2f0