Guest Posted December 27, 2020 Posted December 27, 2020 Armbianmonitor: http://ix.io/2K1p Hi, I've got since several days an issue with armbian-truncate-logs. I received mail alerts from cron as this one, error: error running shared postrotate script for '/var/log.hdd/mysql/mysql.log /var/log.hdd/mysql/mysql-slow.log +/var/log.hdd/mysql/mariadb-slow.log /var/log.hdd/mysql/error.log ' error: error running shared postrotate script for '/var/log.hdd/nginx/*.log ' How to debug that? Laurent
Werner Posted December 27, 2020 Posted December 27, 2020 Check the definition of the postrotate command. Start your research here: /etc/logrotate.d/
Guest Posted December 28, 2020 Posted December 28, 2020 In /etc/logrotate.d/mysql-server I've got a mysql-server script: /var/log.hdd/mysql/mysql.log /var/log.hdd/mysql/mysql-slow.log /var/log.hdd/mysql/mariadb-slow.log /var/log.hdd/mysql/error.log { daily rotate 7 missingok create 640 mysql adm compress sharedscripts postrotate test -x /usr/bin/mysqladmin || exit 0 if [ -f `my_print_defaults --mysqld | grep -m 1 -oP "pid-file=\K.+$"` ]; then # If this fails, check debian.conf! mysqladmin --defaults-file=/etc/mysql/debian.cnf --local flush-error-log \ flush-engine-log flush-general-log flush-slow-log fi endscript } I don't know where to start... Thank you for help.
Solution Guest Posted January 1, 2021 Solution Posted January 1, 2021 Solved by updating /usr/lib/armbian/armbian-ramlog file and creating /etc/systemd/system/logrotate.service file according to https://github.com/armbian/build/issues/1582.
Recommended Posts