Cron 守护进程 - LibClamAV 错误

Cron 守护进程 - LibClamAV 错误

很长一段时间以来,我一直收到以下邮件:

From: Cron Daemon <[email protected]>
Subject: Cron <root@cloud-vps> test -x /usr/sbin/anacron || ( cd / &&
run-parts --report /etc/cron.daily )
To: [email protected]

/etc/cron.daily/clamscan_daily:
Starting a daily scan of / directory.
 Amount of data to be scanned is 4.4G.
LibClamAV Warning: cli_scanxz: decompress file size exceeds limits -
only scanning 27262976 bytes
LibClamAV Warning: cli_scanxz: decompress file size exceeds limits -
only scanning 27262976 bytes
LibClamAV Warning: fmap_readpage: pread fail: asked for 4094 bytes @
offset 2, got 0
LibClamAV Warning: fmap_readpage: pread fail: asked for 4072 bytes @
offset 24, got 0
LibClamAV Warning: fmap_readpage: pread fail: asked for 4094 bytes @
offset 2, got 0
LibClamAV Warning: fmap_readpage: pread fail: asked for 4051 bytes @
offset 45, got 0
LibClamAV Warning: fmap_readpage: pread fail: asked for 4094 bytes @
offset 2, got 0
LibClamAV Warning: fmap_readpage: pread fail: asked for 4073 bytes @
offset 23, got 0
LibClamAV Warning: fmap_readpage: pread fail: asked for 4067 bytes @
offset 29, got 0
LibClamAV Warning: fmap_readpage: pread fail: asked for 4090 bytes @
offset 6, got 0
LibClamAV Warning: fmap_readpage: pread fail: asked for 4091 bytes @
offset 5, got 0
LibClamAV Warning: fmap_readpage: pread fail: asked for 4091 bytes @
offset 5, got 0
LibClamAV Warning: fmap_readpage: pread fail: asked for 4092 bytes @
offset 4, got 0
LibClamAV Warning: fmap_readpage: pread fail: asked for 4094 bytes @
offset 2, got 0
LibClamAV Warning: fmap_readpage: pread fail: asked for 4090 bytes @
offset 6, got 0
LibClamAV Warning: fmap_readpage: pread fail: asked for 4093 bytes @
offset 3, got 0
LibClamAV Warning: fmap_readpage: pread fail: asked for 4094 bytes @
offset 2, got 0
LibClamAV Warning: fmap_readpage: pread fail: asked for 4094 bytes @
offset 2, got 0
LibClamAV Warning: fmap_readpage: pread fail: asked for 4094 bytes @
offset 2, got 0
LibClamAV Warning: fmap_readpage: pread fail: asked for 4092 bytes @
offset 4, got 0
LibClamAV Warning: fmap_readpage: pread fail: asked for 4094 bytes @
offset 2, got 0
LibClamAV Warning: fmap_readpage: pread fail: asked for 4094 bytes @
offset 2, got 0

[...]

WARNING: Can't open file /sys/module/jbd2/uevent: Permission denied
/etc/cron.daily/logrotate:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
error: error running shared postrotate script for
'/var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log
/var/log/mysql/mariadb-slow.log /var/log/mysql/error.log '
run-parts: /etc/cron.daily/logrotate exited with return code 1

你能告诉我如何修复这些错误吗?我禁用了 Apparmor。

答案1

您需要解决该电子邮件底部的密码问题。该脚本无法访问您的 MySQL 服务器。

WARNING: Can't open file /sys/module/jbd2/uevent: Permission denied
/etc/cron.daily/logrotate:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
error: error running shared postrotate script for
'/var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log
/var/log/mysql/mariadb-slow.log /var/log/mysql/error.log '
run-parts: /etc/cron.daily/logrotate exited with return code 1

具体来说是这样的:

mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'

尝试登录到此服务器本地的 MySQL 数据库,并验证用户名/密码是否按预期工作。然后确保您可以执行mysqladmin与此 CRON 尝试执行的操作相同的操作。

相关内容