Printable Version of Topic
Click here to view this topic in its original format
Scientific Linux Forum.org > System administration > [WORKING but not solved] Logrotate not working after recent update?


Posted by: JPruenteAtRA Nov 17 2017, 05:30 PM
Logrotate is skipping some of my logs during it's rotate schedule. I can't tell if this is due to logrotate, rsyslog, or something else. Before I get too far into spelunking this, is anyone else noticing some logs getting skipped after updating logrotate/rsyslog recently?

Posted by: tux99 Nov 19 2017, 01:12 AM
Which logs aren't being rotated?
Which version of SL are you using?

Posted by: JPruenteAtRA Nov 22 2017, 03:50 PM
Basically any log I had configured in my /etc/logrotate.d/rsyslog.conf file wasn't rotating. The system is running SL 7.4 and was fully updated on Nov 05, and rebooted to run the kernel update. I noticed many files weren't rotating on the 15th. I messed with the logrotate configs for a few days and manually rotated the largest ones (+1G/day each) when they got unwieldy. The only significant change I did was to change the postrotate command from
CODE
/bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true

to
CODE
systemctl restart rsyslog

and restarted rsyslog and manually ran logrotate with the regular options as in /etc/cron.daily/logrotate and also as a forced rotate run. It still didn't rotate all of the files in the rsyslog.conf. This sat for a few days over the weekend and still did not rotate the files with cron runs.

Yesterday I had an opportunity to reboot the server and took it. Last night the rotate worked on all files as expected. I'm not sure what would have changed in the running system just from a reboot that wouldn't have already been refreshed when restarting the rsyslog service.

I'd like to edit the topic to WORKING but not SOLVED, but I don't see where I can do that.

Posted by: burakkucat Nov 22 2017, 03:58 PM
QUOTE (JPruenteAtRA @ Nov 22 2017, 03:50 PM)

I'd like to edit the topic to WORKING but not SOLVED, but I don't see where I can do that.

Just catch the eye of a moderator or administrator . . . as you have so done. wink.gif

Posted by: inittux Dec 16 2017, 10:17 AM
Have you tried running a logrotate file in debug mode, I've had that provide some useful output this last week when I had a problem with logrotate.

logrotate -d /etc/logrotate.d/httpd

'
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)