New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error renaming logrotate.status.tmp file on every execution from cron #211
Comments
|
This is an ltrace of a successful (non-cron) run, invoked using the same cron script run from the command line, in case it shows anything useful. Just browsing a diff between the two, I don't see anything particularly interesting until the |
|
This looks like there are two processes of logrotate running at the same time. In the failing case,
There is actually one more difference: In the failing case, |
|
Aha, you're right: somehow |
|
No problem. Thanks for confirmation! |
|
Sorry for the necropost, but what is the actual solution to this? I have the same error. |
|
@YouveGotMeowxy Which version of logrotate are you using? State file locking was introduced in |
oh wow. Looks like I'm way behind. Looks like I'm using 1.3(!) lol. I'm using the Where can I get the docker version of the actual latest? Update: Oops, looks like I'm using 3.14.0 |
|
There is |
|
In any case, we as logrotate upstream developers do not maintain the images. Upstream releases of logrotate are available here: https://github.com/logrotate/logrotate/releases |
|
@kdudka ok, ty. Yes, I just tried to rebuild the image, but no luck: Other than that simple change I know nothing about making dockerfiles, so I guess I'll head over to the guy's page who made the container and try nagging him to update it for me, lol |
On a specific set of hosts, logrotate exits with an error code and reports
error renaming temp state file /var/lib/logrotate/logrotate.status.tmpevery time it runs. There are no errors reported by the files being rotated, thelogrotate.status.tmpfile is removed, and thelogrotate.statusfile is updated, so I think the error is spurious.Info
version: logrotate-3.14.0-1.fc28.x86_64
os: Fedora 28
error: error renaming temp state file /var/lib/logrotate.status.tmp
use: A cron job invoked every hour
What I've Tried
Manual execution of
logrotate -v /etc/logrotate.confproduced no errors.Specifying an alternative state file that doesn't initially exist, i.e. using
logrotate -s /tmp/logrotate.status /etc/logrotate.confin the cron job, reported the error on the second and subsequent executions (pointing to/tmp/logrotate.status.tmpinstead of the default). Similarly, removing the default status file/var/lib/logrotate.statusbefore executing the cron job reported the error on the second and subsequent executions.I've attached the output of
ltrace -s 256 -S logrotate -l syslog /etc/logrotate.confas suggested in #197, which looked similar but appears to be unrelated.The text was updated successfully, but these errors were encountered: