長い間、私は次のようなメールを受け取りました。
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が実行したいのと同じ操作を実行できることを確認してください。