(Rolling 1.4.220305) Logrotate service failing on startup

I’m seeing the logrotate service fail on boot. A look at systemctl status logrotate tells me something has failed.

Starting Rotate log files...
logrotate[802]: error: rsyslog: 1 duplicate log entry for /var/log/auth.log
logrotate[802]: error: found error in file rsyslog,skipping
logrotate[802]: error: vyos-rsyslog:1 duplicate log entry for /var/log/messages
logrotate[802]: error: found error in file vyos-rsyslog, skipping
systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: logrotate.service: failed with result 'exit-code'.
systemd[1]: Failed to start Rotate log files

I see this was an issue (T220) and was marked as Finished… but it’s happening with this version.

The /etc/logrotate.d/auth file contains:

/var/log/auth.log
{
rotate 6
size 10M
missingok
notifempty
compress
delaycompress
sharedscripts
postrotate
     invoke-rc.d rsyslog rotate > /dev/null
endscript
}

and /etc/logrotate.d/vyos-rsyslog

/var/log/messages {
missingok
notifempty
create
rotate 5
size=256k
postrotate
    invoke-rc.d rsyslog rotate > /dev/null
endscript
}

Any suggestions on fixing this? I’m not sure what is causing the duplicate file error to occur

thanks

Jim

Already fixed in the ⚓ T4250 Organize logrotate settings to avoid duplicates / https://github.com/vyos/vyos-1x/pull/1241

Looks like that fix (which is in a later rolling update) causes T4305 Global log facility does not have consistent default settings, and doesn’t change when modified , so not really completely fixed yet .

I took the /var/log/messages and /var/log/auth.log entries out of /etc/logrotate.d/rsyslog and restarted the system and it seems to behave better, but I guess I’ll watch for T4305 to be fixed in the 1.4 rolling release.

Thanks