Issue
Servers receive daily email notifications from cron:
Subject: Cron <root@mainsra1> flock -w 5 /usr/share/imunify360-wafd/logrotate logrotate /usr/share/imunify360-wafd/logrotate
error: state file /var/lib/logrotate/status is already locked
logrotate does not support parallel execution on the same set of logfiles.
Environment
- Imunify360 v8.5.1-1, v8.5.2-2
- Supported control panels (Plesk, cPanel)
- Supported OS (Debian, CloudLinux)
Solution
Internal Task ID: DEF-34536
Intermediate Update
Our developers have fixed this issue, and the new release with this fix should be available soon:
The patch has been merged. Gonna be released in webshield-1.34.2 or 1.35.0
You can track it here: https://changelog.imunify.com/imunify360
Temporary Workaround
Patch the wafd logrotate script `/etc/cron.d/imunify360-wafd-logrotate` by replacing the line:
*/10 * * * * root flock -w 5 /usr/share/imunify360-wafd/logrotate logrotate /usr/share/imunify360-wafd/logrotate
to this line:
7-57/10 * * * * root logrotate -s /run/wafd-logrotate.lock /usr/share/imunify360-wafd/logrotate
Cause
The message you are encountering typically arises when two separate `logrotate` processes execute simultaneously. Imunify360 rotates logs for wafd every 10 minutes, while the system's default log rotation jobs adhere to their designated schedule.
This situation is generally not a cause for concern, particularly if it occurs infrequently. The likelihood increases when the server manages larger log files that require more time to process, thereby heightening the chance of overlapping jobs.
Comments
0 comments
Please sign in to leave a comment.