On 2019-09-19 11:03:36 +0200, Vincent Lefevre wrote:
> On 2019-09-18 12:52:32 +0200, Christian Göttsche wrote:
> >     If yes, please share 'systemctl status logrotate.timer' and
> > 'journalctl -u logrotate' (the most recent part of it).
> 
> ● logrotate.timer - Daily rotation of log files
>    Loaded: loaded (/lib/systemd/system/logrotate.timer; enabled; vendor 
> preset: enabled)
>    Active: active (waiting) since Thu 2019-09-19 10:25:10 CEST; 32min ago
>   Trigger: Fri 2019-09-20 00:00:00 CEST; 13h left
>      Docs: man:logrotate(8)
>            man:logrotate.conf(5)
> 
> Sep 19 10:25:10 cventin systemd[1]: Started Daily rotation of log files.
> 
> [...]
> Sep 16 00:00:01 cventin systemd[1]: Starting Rotate log files...
> Sep 16 00:00:02 cventin systemd[1]: logrotate.service: Succeeded.
> Sep 16 00:00:02 cventin systemd[1]: Started Rotate log files.
> Sep 17 00:00:01 cventin systemd[1]: Starting Rotate log files...
> Sep 17 00:00:03 cventin systemd[1]: logrotate.service: Succeeded.
> Sep 17 00:00:03 cventin systemd[1]: Started Rotate log files.
> Sep 18 00:00:01 cventin systemd[1]: Starting Rotate log files...
> Sep 18 00:00:01 cventin logrotate[16206]: error: Compressing program wrote 
> following message to stderr when compressing log /var/log/apache2/error.log.1:
> Sep 18 00:00:01 cventin logrotate[16206]: gzip: stdin: warning: file 
> timestamp out of range for gzip format
> Sep 18 00:00:01 cventin logrotate[16206]: error: failed to compress log 
> /var/log/apache2/error.log.1
> Sep 18 00:00:02 cventin systemd[1]: logrotate.service: Main process exited, 
> code=exited, status=1/FAILURE
> Sep 18 00:00:02 cventin systemd[1]: logrotate.service: Failed with result 
> 'exit-code'.
> Sep 18 00:00:02 cventin systemd[1]: Failed to start Rotate log files.
> Sep 19 00:00:01 cventin systemd[1]: Starting Rotate log files...
> Sep 19 00:00:02 cventin logrotate[19728]: error: Compressing program wrote 
> following message to stderr when compressing log /var/log/apache2/error.log.1:
> Sep 19 00:00:02 cventin logrotate[19728]: gzip: stdin: warning: file 
> timestamp out of range for gzip format
> Sep 19 00:00:02 cventin logrotate[19728]: error: failed to compress log 
> /var/log/apache2/error.log.1
> Sep 19 00:00:02 cventin systemd[1]: logrotate.service: Main process exited, 
> code=exited, status=1/FAILURE
> Sep 19 00:00:02 cventin systemd[1]: logrotate.service: Failed with result 
> 'exit-code'.
> Sep 19 00:00:02 cventin systemd[1]: Failed to start Rotate log files.

So, the rotation occurs at midnight, according to the systemd timer.
This conflicts with the crontab configuration.

-- 
Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Reply via email to