Ich betreibe einen Homeserver auf einem Igel Thin Clienten mit C7 CPU.
Vor ein paar Tagen habe ich ein Upgrade von Debian Spueeze 6.0.7 auf Wheezy 7.0 gemacht, alles lief soweit ohne Fehler, doch mein Logrotate möchte einfach nicht korrekt Arbeiten! Das ganze hat bis zu dem Upgrade auf Wheezy wunderbar funktioniert!
Und zwar ist mir aufgefallen das die Logdatei "syslog" auf über 10 MB anwächst, obwohl ich angegeben habe das sie nicht mehr als 8 MB haben sollte. Das ganze geht mit fast allen Logdateien so. Die Logdateien vom Apache2 werden wie sie sollten Rotiert und laufen dann in eine apache2_error.log.1 über und es wird eine neue apache2_error.log erstellt in der weiter geschrieben wird.
Bei der syslog ist es so das zwar bei 8 MB größe eine neue syslog erstellt wird, doch wird einfach weiter in die syslog.1 weiter geschrieben so das sie immer weiter anwächst.
Natürlich habe ich mich selbst schon auf Fehlersuche begeben. Da wollte ich mal Logrotate neu Installieren, doch es war garnicht Installiert! Also habe ich es Installiert mit dem Dienst anachron. Doch keinerlei Abhilfe!
Ganz Schalu daraus werde ich einfach nicht. Im CRON sind auch einige Einträge doch ob die so richtig sind kann ich nicht sagen. Ich Poste hier mal so ziemlich alles von dem ich denke das es Helfen könnte.
Die CRON.Hourly
Code: Alles auswählen
#!/bin/sh
test -x /usr/sbin/logrotate || exit 0
/usr/sbin/logrotate /etc/logrotate.conf
Code: Alles auswählen
reading config file /etc/logrotate.conf
including /etc/logrotate.d
reading config file apache2
reading config file apt
reading config file aptitude
reading config file dpkg
reading config file exim4-base
reading config file exim4-paniclog
reading config file fail2ban
reading config file rsyslog
Handling 14 logs
rotating pattern: /var/log/apache2/*.log weekly (2 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/apache2/access.log
log does not need rotating
considering log /var/log/apache2/error.log
log does not need rotating
considering log /var/log/apache2/other_vhosts_access.log
log does not need rotating
not running prerotate script, since no logs will be rotated
not running postrotate script, since no logs were rotated
rotating pattern: /var/log/apt/term.log monthly (2 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/apt/term.log
log does not need rotating
rotating pattern: /var/log/apt/history.log monthly (2 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/apt/history.log
log does not need rotating
rotating pattern: /var/log/aptitude monthly (2 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/aptitude
log /var/log/aptitude does not exist -- skipping
rotating pattern: /var/log/dpkg.log monthly (2 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/dpkg.log
log does not need rotating
rotating pattern: /var/log/alternatives.log monthly (2 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/alternatives.log
log does not need rotating
rotating pattern: /var/log/exim4/mainlog /var/log/exim4/rejectlog after 1 days (1 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/exim4/mainlog
considering log /var/log/exim4/rejectlog
rotating pattern: /var/log/exim4/paniclog 1048576 bytes (1 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/exim4/paniclog
rotating pattern: /var/log/fail2ban.log weekly (3 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/fail2ban.log
log does not need rotating
not running postrotate script, since no logs were rotated
rotating pattern: /var/log/syslog
1048576 bytes (1 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/syslog
log does not need rotating
not running postrotate script, since no logs were rotated
rotating pattern: /var/log/rsyslog
/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/cronauth.log
/var/log/messages
1048576 bytes (1 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/rsyslog
log /var/log/rsyslog does not exist -- skipping
considering log /var/log/mail.info
log does not need rotating
considering log /var/log/mail.warn
log does not need rotating
considering log /var/log/mail.err
log does not need rotating
considering log /var/log/mail.log
log /var/log/mail.log does not exist -- skipping
considering log /var/log/daemon.log
log /var/log/daemon.log does not exist -- skipping
considering log /var/log/kern.log
log /var/log/kern.log does not exist -- skipping
considering log /var/log/auth.log
log does not need rotating
considering log /var/log/user.log
log /var/log/user.log does not exist -- skipping
considering log /var/log/lpr.log
log /var/log/lpr.log does not exist -- skipping
considering log /var/log/cron.log
log /var/log/cron.log does not exist -- skipping
considering log /var/log/debug
log /var/log/debug does not exist -- skipping
considering log /var/log/cronauth.log
log does not need rotating
considering log /var/log/messages
log does not need rotating
not running postrotate script, since no logs were rotated
not running postrotate script, since no logs were rotated
not running postrotate script, since no logs were rotated
not running postrotate script, since no logs were rotated
rotating pattern: /var/log/wtmp monthly (1 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/wtmp
log does not need rotating
rotating pattern: /var/log/btmp monthly (1 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/btmp
log /var/log/btmp does not exist -- skipping
Code: Alles auswählen
/var/log/syslog
{
rotate 1
size 1M
missingok
notifempty
delaycompress
compress
postrotate
invoke-rc.d rsyslog reload > /dev/null
endscript
}
/var/log/rsyslog
/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/cronauth.log
/var/log/messages
{
rotate 1
size 1M
missingok
notifempty
compress
delaycompress
sharedscripts
postrotate
invoke-rc.d rsyslog reload > /dev/null
endscript
}
Es scheint mir das ich wenn ich per Hand einen Logrotate anstoße alles läuft. Doch will es einfach nicht über den Crontab laufen.
Leider bin ich "noch" nicht so bewandert in Linux Systemen, (deshalb nur der Homeserver) aber ich will es werden. Ich habe dieses Betriebssystem lieben gelernt. Doch das hier Nervt mich obwohl es auch eine herrausvorderung für mich ist da ich den Fehler ja wunderbar selbst suchen sollte.
Aber ich komme einfach nicht mehr weiter, ich vermute der Fehler liegt irgendwo im CRON. Habt ihr eine Idee was da los ist?
Liebe Grüße!
P.S.
Hier noch ein Log aus messeges:
Code: Alles auswählen
May 9 21:40:59 server rsyslogd: [origin software="rsyslogd" swVersion="5.8.11" x-pid="29460" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
May 10 10:06:30 server rsyslogd: [origin software="rsyslogd" swVersion="5.8.11" x-pid="29460" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
Die crontab: (auszug)
Code: Alles auswählen
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
Die Ausgabe von: logrotate -f /etc/logrotate.d/rsyslog
Code: Alles auswählen
Usage: /etc/init.d/rsyslog {start|stop|rotate|restart|force-reload|status}
invoke-rc.d: initscript rsyslog, action "reload" failed.
error: error running non-shared postrotate script for /var/log/syslog of '/var/log/syslog
'
Usage: /etc/init.d/rsyslog {start|stop|rotate|restart|force-reload|status}
invoke-rc.d: initscript rsyslog, action "reload" failed.
error: error running shared postrotate script for '/var/log/rsyslog
/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/cronauth.log
/var/log/messages
'