Logrotate funktioniert nicht mehr.


King-S

Registered User
Hallo,

wenn ich einen manuellen Log-Rotate der Mail-Logs machen möchte, kommt folgende Fehlermeldung im Webmin:

Forcing the immediate rotation of one log file ..

Reload syslog service..done

.. failed! See the output above for the reason why.

In messages steht nur folgendes drin:

Dec 23 16:35:45 sXXXXXXXX syslog-ng[3785]: SIGHUP received, restarting syslog-ng
Dec 23 16:35:45 sXXXXXXXX syslog-ng[3785]: new configuration initialized

Mehr an Logeinträgen habe ich nicht - jedenfalls nicht zu diesem Thema.

Gestern hat es aber funktioniert. Zwischendurch (zwischen gestern und heute), aber ich eigentlich nur Daemontools installiert und dann aber wieder gelöscht.

Danke im Voraus
 
Diesen Befehl kennt er nicht.

Allerdings kennt er /etc/init.d/syslog restart.

Hab ihn mal ausgeführt. Scheint alles ok zu sein

ähm.. jetzt habe ich nochmal ein Logrotate machen wollen:

Forcing the immediate rotation of one log file ..

Reload syslog service..failed
error: error running postrotate script for /var/log/mail /var/log/mail.info /var/log/mail.warn /var/log/mail.err

.. failed! See the output above for the reason why.

Sieht wohl doch net so dolle aus.
 
Dann führ das auch mal in der Console aus:
/etc/init.d/syslog reload

Das sind zu wenig Informationen was da falsch läuft. Steht irgendwas in den Logs, warum der Syslog nicht mag?
 
Dann scheint irgendwas an der Konfiguration von Logrotate falsch zu sein.
Poste doch mal die Konfig für die Mails
 
So, also eine Config-Datei für qmail gibt es nicht. Das scheint wahrscheinlich auch der Fehler zu sein.

Ich poste trotzdem syslog / syslog-ng (aus den gleichen Verzeichnis)

Zuerst syslog

Code:
#
# Please note, that changing of log file permissions in this
# file is not sufficient if syslog-ng is used as log daemon.
# It is required to specify the permissions in the syslog-ng
# configuration /etc/syslog-ng/syslog-ng.conf.in as well.
#

/var/log/warn /var/log/messages /var/log/allmessages /var/log/localmessages /var/log/firewall {
    compress
    dateext
    maxage 365
    rotate 99
    missingok
    notifempty
    size +4096k
    create 640 root root
    sharedscripts
    postrotate
        /etc/init.d/syslog reload
    endscript
}

/var/log/mail /var/log/mail.info /var/log/mail.warn /var/log/mail.err {
    compress
    dateext
    maxage 365
    rotate 99
    missingok
    notifempty
    size +4096k
    create 640 root root
    sharedscripts
    postrotate
        /etc/init.d/syslog reload
    endscript
}

/var/log/news/news.crit /var/log/news/news.err /var/log/news/news.notice {
    compress
    dateext
    maxage 365
    rotate 99
    missingok
    notifempty
    size +4096k
    create 640 news news
    sharedscripts
    postrotate
        /etc/init.d/syslog reload
    endscript
}

Und nun die Syslog-ng

#
# Please note, that changing of log file permissions in this
# file is not sufficient if syslog-ng is used as log daemon.
# It is required to specify the permissions in the syslog-ng
# configuration /etc/syslog-ng/syslog-ng.conf.in as well.
#

#
# The following files are used in syslog-ng config:
#
/var/log/acpid /var/log/NetworkManager {
compress
dateext
maxage 365
rotate 99
missingok
notifempty
size +4096k
create 640 root root
sharedscripts
postrotate
/etc/init.d/syslog reload
endscript
}

Hoffe, das Hilft bei der Fehlersuche
 

Back
Top