On Sun, Apr 5, 2015 at 7:49 PM, Alex Corkwell <i.am.the.mem...@gmail.com> wrote:
> On Sun, Apr 05, 2015 at 06:31:43PM +0300, Alexander Kapshuk wrote: > > On Sun, Apr 5, 2015 at 5:36 PM, Mick <michaelkintz...@gmail.com> wrote: > > > > On Sunday 05 Apr 2015 14:19:16 Alexander Kapshuk wrote: > > > On Sun, Apr 5, 2015 at 10:50 AM, Mick <michaelkintz...@gmail.com> > wrote: > > > An observation I've made, is that my log rotation seems to have > effected > > > all other logs in /var/log as well. It seems to have stopped > working > > around > > > January this year. > > > > > > ls -lt /var/log/messages* > > > -rw------- 1 root root 9986127 Apr 5 16:10 /var/log/messages > > > -rw------- 1 root root 173843 Jan 12 10:20 > /var/log/messages-20150112.gz > > > -rw------- 1 root root 277867 Jan 4 22:00 > /var/log/messages-20150104.gz > > > -rw------- 1 root root 132157 Dec 28 20:30 > /var/log/messages-20141228.gz > > > -rw------- 1 root root 142911 Dec 22 19:30 > /var/log/messages-20141222.gz > > > > It seems to me that logrotate stopped rotating your logs back in > Jan. Did > > you > > change something in its configuration back then? > > > > This is what I have in /etc/cron.daily/logrotate: > > ================================================ > > #!/bin/sh > > > > /usr/sbin/logrotate /etc/logrotate.conf > > EXITVALUE=$? > > if [ $EXITVALUE != 0 ]; then > > /usr/bin/logger -t logrotate "ALERT exited abnormally with > [$EXITVALUE] > > " > > fi > > exit 0 > > ================================================= > > I then went ahead and ran logrotate by hand, which resulted in the > following > > output: > > > > /usr/sbin/logrotate /etc/logrotate.conf > > 501 Not authorised --- Reply not authenticated > > 501 Not authorised --- Reply not authenticated > > # echo $? > > 0 > > > > I guess I have to figure out what the error message shown below is all > about: > > 501 Not authorised --- Reply not authenticated > > > > > > I don't know about the "501 Not authorised", but I remember having a > similar issue with logrotate not running beginning around the same time > (the last rotated log was the week of 20141221). I can't remember > exactly what I did, but I believe around then Gentoo (and my system) > switched from vixie-cron to cronie as default. If I remember correctly, > it was anacron that caused the problem. > > Take a look at these lines from the default (at least, on my system) for > /etc/crontab: > > # check scripts in cron.hourly, cron.daily, cron.weekly and cron.monthly > # if anacron is not present > 59 * * * * root [ ! -x /etc/cron.hourly/0anacron ] && rm -f > /var/spool/cron/lastrun/cron.hourly > 9 3 * * * root [ ! -x /etc/cron.hourly/0anacron ] && rm -f > /var/spool/cron/lastrun/cron.daily > 19 4 * * 6 root [ ! -x /etc/cron.hourly/0anacron ] && rm -f > /var/spool/cron/lastrun/cron.weekly > 29 5 1 * * root [ ! -x /etc/cron.hourly/0anacron ] && rm -f > /var/spool/cron/lastrun/cron.monthly > */10 * * * * root [ ! -x /etc/cron.hourly/0anacron ] && { test -x > /usr/sbin/run-crons && /usr/sbin/run-crons ; } > > Essentially, cron.{hourly,daily,weekly,monthly} only get run if > /etc/cron.hourly/0anacron is not executable. On my system, if I remember > correctly, /etc/cron.hourly/0anacron had the executable bit set after I > emerged cronie, but I never set up anacron. I don't know if it properly > runs all the cron.* scripts regularly by default, but after a quick > "chmod -x /etc/cron.hourly/0anacron" logrotate returned to running > regularly. > > I really don't know what's going on with the 501, but I hope that helps > with getting it to run regularly (at least, unless you actually know how > to use anacron, in which you probably know whether or not this makes > some sense). > That was it. Thanks a lot for the tip.