Debian

Cron 守護程序 - LibClamAV 錯誤

  • July 22, 2018

很長一段時間以來,我一直在收到以下郵件:

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

/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。

您需要解決該電子郵件底部的密碼問題。該腳本無法訪問您的 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 嘗試執行的操作。

引用自:https://unix.stackexchange.com/questions/456565