Logrotate.service fails on the Raspberry Pi 4B

Does anyone know what’s up with logrotate.service? It always seems to fail. I get loads of entries resembling the following when running journalctl -u logrotate:

Oct 13 00:00:07 Paarthurnax systemd[1]: Starting Rotate log files...
Oct 13 00:00:07 Paarthurnax logrotate[789]: error: state file /var/lib/logrotate.status is already locked
Oct 13 00:00:07 Paarthurnax logrotate[789]: logrotate does not support parallel execution on the same set of logfiles.
Oct 13 00:00:07 Paarthurnax systemd[1]: logrotate.service: Main process exited, code=exited, status=3/NOTIMPLEMENTED
Oct 13 00:00:07 Paarthurnax systemd[1]: logrotate.service: Failed with result 'exit-code'.
Oct 13 00:00:07 Paarthurnax systemd[1]: Failed to start Rotate log files.

sudo systemctl restart logrotate.service seems to temporarily resolve the issue.

Whats the output of systemctl status logrotate?

We don’t install logrotate by default…

This, since I restarted the service:

● logrotate.service - Rotate log files
     Loaded: loaded (/usr/lib/systemd/system/logrotate.service; static)
     Active: inactive (dead) since Wed 2020-11-18 10:42:10 GMT; 19min ago
TriggeredBy: ● logrotate.timer
       Docs: man:logrotate(8)
             man:logrotate.conf(5)
    Process: 42811 ExecStart=/usr/sbin/logrotate /etc/logrotate.conf (code=exited, status=0/SUCCESS)
   Main PID: 42811 (code=exited, status=0/SUCCESS)

Nov 18 10:42:10 Paarthurnax systemd[1]: Starting Rotate log files...
Nov 18 10:42:10 Paarthurnax systemd[1]: logrotate.service: Succeeded.
Nov 18 10:42:10 Paarthurnax systemd[1]: Finished Rotate log files.

I don’t recall installing it unless it came bundled with something. How can I find out what installed it? I have a pretty minimal setup. It’s pretty much just a minimal ARM install + ddclient, syncthing and minecraft-server.

EDIT: Ah… it came bundled with pi-hole-server.

EDIT2: Uninstalled pi-hole-server. Problem solved. Apologies. Assumed it was part of the base installation.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.