Forums

Home / Forums

You need to log in to create posts and topics. Login · Register

logrotate.service won't start

On all 3 nodes I found falied service:

systemctl status logrotate.service
● logrotate.service - Rotate log files
     Loaded: loaded (/lib/systemd/system/logrotate.service; static; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2023-06-29 00:00:00 CEST; 46min ago
TriggeredBy: ● logrotate.timer
       Docs: man:logrotate(8)
             man:logrotate.conf(5)
   Main PID: 351419 (code=exited, status=1/FAILURE)

Jun 29 00:00:00 ceph02 systemd[1]: Starting Rotate log files...
Jun 29 00:00:00 ceph02 logrotate[351419]: error: syslog:1 duplicate log entry for /var/log/syslog
Jun 29 00:00:00 ceph02 logrotate[351419]: error: found error in file syslog, skipping
Jun 29 00:00:00 ceph02 systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE
Jun 29 00:00:00 ceph02 systemd[1]: logrotate.service: Failed with result 'exit-code'.
Jun 29 00:00:00 ceph02 systemd[1]: Failed to start Rotate log files.

It's caused by "syslog:1 duplicate log entry for /var/log/syslog"

Removing syslog file:
rm /etc/logrotate.d/syslog

systemctl restart logrotate.service

Resolves problem.

Thanks for the feedback 🙂

i would recommend fixing with

dpkg -r rsyslog