Matthias, Chris: Thanks for the suggestions. I have found the
solutions to both. The first is simple and is going to make me look
very stupid. I deserve it and must be punished. The second has had me
stumped for a while...
On Mon, Mar 05, 2001 at 10:17:51AM +0000, Tom Strickland wrote:
> Another problem:
> Recently the computer started freezing at startup unless I did the following:
>
> 1) start as single user
> 2) start syslog:
> # /etc/rc.d/init.d/syslog start
> 3) carry on the startup (ctrl-d)
>
> logrotate isn't working either - it complains:
>
> # logrotate /etc/logrotate.conf
> error: syslog:211 duplicate log entry for /var/log/syslog
>
> The two problems may be separate - logrotate hasn't been working for a while.
Problem 1: syslog was disabled. I must have slipped up somewhere and
switched it off and then been too stupid and too quick posting to the
list to fix it myself.
Problem 2: logrotate problems.
I thought that it meant 'duplicate entries inside the log file for
syslog'. Wrong - it means that the /etc/logrotate.d/syslog file
contains duplicate entries for rotating /var/log/syslog like so:
# WARNING : don't use * wildcard as extension
# (glob in logrotate will try to rotate all files instead of
# only the basenames of the logs, i.e. it will rotate
# already rotated files and recompress them, taking
# exponential time...)
/var/log/auth.log {
rotate 5
weekly
postrotate
/usr/bin/killall -HUP syslogd
endscript
}
/var/log/syslog {
rotate 5
weekly
postrotate
/usr/bin/killall -HUP syslogd
endscript
}
/var/log/user.log {
[snip]
...
#/var/log/syslog {
#
#postrotate
#/usr/bin/killall -HUP syslogd
#endscript
#
#}
... commenting out the second entry solved the error. My syslog file
has been getting alarmingly large as it hadn't rotated since late
november. I have no idea what caused this, as I've never touched this
file. Useful though - now I've had to learn about log rotation rather
than just assume it works.
tom