Debian upgrade logrotate issue

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:

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/
, 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
        create #640 syslog adm
                invoke-rc.d rsyslog rotate > /dev/null

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.