> It is only access.log that it doesn't rotate. After last night:
>
> -rw-r----- 1 root adm 308 2019-09-17 16:39:00 access.log
> -rw-r----- 1 root adm 156 2019-09-16 16:31:06 access.log.3.gz
> -rw-r----- 1 root adm 157 2019-09-13 12:36:03 access.log.4.gz
> -rw-r----- 1 root adm 155 2019-09-12 12:25:14 access.log.5.gz
> -rw-r----- 1 root adm 156 2019-09-10 10:33:38 access.log.6.gz

Can you please run 'logrotate --debug /etc/logrotate.conf' and search
for output regarding to access.log


> Now, I still don't understand why the logs are not rotated since
> gzip is actually fine with the date 1904-01-01: this is just a
> warning. Test:
>
> cventin% rm -f test.txt*
> cventin% echo blah > test.txt
> cventin% touch -d 1904-01-01 test.txt
> cventin% ls -l test.txt*
> -rw-r--r-- 1 vlefevre vlefevre 5 1904-01-01 00:00:00 test.txt
> cventin% gzip test.txt
> gzip: test.txt: warning: file timestamp out of range for gzip format
> cventin% ls -l test.txt*
> -rw-r--r-- 1 vlefevre vlefevre 34 1904-01-01 00:00:00 test.txt.gz
>
> i.e. the file got compressed as expected.
>
> Really, this warning does not matter, in particular for log files.
> Thus logrotate should ignore it.
>
> BTW, even if the file could not be compressed, I think that the best
> solution would be to rotate anyway.

gzip may say warning, but it exits with a value of 2, and prints to stderr.
So logrotate has every reason to think somethings wrong and leave this
file as it is.
I do not think that should be changed.

Reply via email to