It seems that in the development branch, the directory /var/lib/logrotate
is missing, which prevents the logrotate timer to start:
● logrotate.service - Rotate log files
Loaded: loaded (/lib/systemd/system/logrotate.service; static)
Active: failed (Result: exit-code) since Wed 2021-03-03 08:05:35 CET; 59s ago
TriggeredBy: ● logrotate.timer
Docs: man:logrotate(8)
man:logrotate.conf(5)
Process: 56976 ExecStart=/usr/sbin/logrotate /etc/logrotate.conf (code=exited, status=3)
Main PID: 56976 (code=exited, status=3)
CPU: 29ms
Mar 03 08:05:35 nevermind systemd[1]: Starting Rotate log files...
Mar 03 08:05:35 nevermind logrotate[56976]: error: error creating stub state file /var/lib/logrotate/status: No such file or directory
Mar 03 08:05:35 nevermind systemd[1]: logrotate.service: Main process exited, code=exited, status=3/NOTIMPLEMENTED
Mar 03 08:05:35 nevermind systemd[1]: logrotate.service: Failed with result 'exit-code'.
Mar 03 08:05:35 nevermind systemd[1]: Failed to start Rotate log files.
To fix it, you manually need to create the directory mentioned:
sudo mkdir /var/lib/lograte
Result:
● logrotate.service - Rotate log files
Loaded: loaded (/lib/systemd/system/logrotate.service; static)
Active: inactive (dead) since Wed 2021-03-03 08:06:39 CET; 5s ago
TriggeredBy: ● logrotate.timer
Docs: man:logrotate(8)
man:logrotate.conf(5)
Process: 57049 ExecStart=/usr/sbin/logrotate /etc/logrotate.conf (code=exited, status=0/SUCCESS)
Main PID: 57049 (code=exited, status=0/SUCCESS)
CPU: 44ms
Mar 03 08:06:39 nevermind systemd[1]: Starting Rotate log files...
Mar 03 08:06:39 nevermind systemd[1]: logrotate.service: Succeeded.
Mar 03 08:06:39 nevermind systemd[1]: Finished Rotate log files.