Not from my normal range of topics, but I ran unto a problem and Google couldn’t provide the answer because it appears no-one else has this problem. That seems unlikely, so I’ll post it here. If you don’t administer a Debian server, please move along.
When upgrading my server from Debian 7 (Wheezy) to 8 (Jessie), I started getting this error from cron:
/etc/cron.daily/logrotate:
error: rsyslog:8 extra arguments for create
error: found error in /var/log/syslog
, skipping
error: rsyslog:22 extra arguments for create
error: found error in /var/log/mail.info
/var/log/mail.warn
/var/log/mail.err
/var/log/mail.log
/var/log/daemon.log
/var/log/kern.log
/var/log/auth.log
/var/log/user.log
/var/log/lpr.log
/var/log/cron.log
/var/log/debug
/var/log/messages
, skipping
And the logs noted in the error message were not rotating, which is bad.
I (with the help of our trusty sys-admin) tracked it down to the system installed file for rsyslog at /etc/logrotate.d/rsyslog
.
The configuration includes this:
/var/log/syslog {
rotate 7
daily
missingok
notifempty
delaycompress
compress
create #640 syslog adm
postrotate
invoke-rc.d rsyslog rotate > /dev/null
endscript
}
The problem is that the #
makes it a comment (I assume) and thus you get the ‘arguments’ error.
Taking that out didn’t quite solve it as the syslog user doesn’t exist, so the updated (and working) version is:
create 640 root adm
I hope that helps someone save a couple of hours.