So. Der Fehler tritt immer noch auf. Die Logrotation findet wie geplant Sonntags um kurz nach 0 Uhr statt. So steht das auch in der /var/lib/logrotate/status. Nach der Rotation existieren folgende auth.logs:
Code:
*****@*********:/var/log# ls -l auth.log*
-rw-r----- 1 root adm 0 Okt 19 00:14 /var/log/auth.log
-rw-r----- 1 root adm 580K Okt 19 12:52 /var/log/auth.log.1
-rw-r----- 1 root adm 149K Okt 14 22:32 /var/log/auth.log.2.gz
-rw-r----- 1 root adm 172K Okt 9 20:56 /var/log/auth.log.3.gz
-rw-r----- 1 root adm 16K Sep 28 00:13 /var/log/auth.log.4.gz
Direkt nach der Rotation bleibt die auth.log leer.
Snippet aus der auth.log.1 zum Rotationszeitpunkt:
Code:
Oct 18 23:57:37 lvps176-28-19-69 sshd[31277]: Failed password for invalid user test from 213.25.50.248 port 37903 ssh2
Oct 18 23:57:37 lvps176-28-19-69 sshd[31277]: Connection closed by 213.25.50.248 [preauth]
Oct 19 00:03:01 lvps176-28-19-69 CRON[31285]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct 19 00:03:01 lvps176-28-19-69 CRON[31285]: pam_unix(cron:session): session closed for user root
Oct 19 00:09:01 lvps176-28-19-69 CRON[31296]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct 19 00:09:01 lvps176-28-19-69 CRON[31296]: pam_unix(cron:session): session closed for user root
Oct 19 00:13:01 lvps176-28-19-69 CRON[31309]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct 19 00:17:01 lvps176-28-19-69 CRON[482]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct 19 00:17:01 lvps176-28-19-69 CRON[482]: pam_unix(cron:session): session closed for user root
Oct 19 00:20:24 lvps176-28-19-69 sshd[488]: Did not receive identification string from 193.104.41.10
Oct 19 00:20:25 lvps176-28-19-69 sshd[489]: Invalid user admin from 193.104.41.10
Oct 19 00:20:25 lvps176-28-19-69 sshd[489]: input_userauth_request: invalid user admin [preauth]
Oct 19 00:20:25 lvps176-28-19-69 sshd[489]: pam_unix(sshd:auth): check pass; user unknown
Oct 19 00:20:25 lvps176-28-19-69 sshd[489]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=193.104.41.10
Oct 19 00:20:27 lvps176-28-19-69 sshd[489]: Failed password for invalid user admin from 193.104.41.10 port 64635 ssh2
Oct 19 00:20:28 lvps176-28-19-69 sshd[489]: fatal: Read from socket failed: Connection reset by peer [preauth]
Oct 19 00:20:28 lvps176-28-19-69 sshd[491]: Invalid user admin from 193.104.41.10
Oct 19 00:20:28 lvps176-28-19-69 sshd[491]: input_userauth_request: invalid user admin [preauth]
Oct 19 00:20:28 lvps176-28-19-69 sshd[491]: pam_unix(sshd:auth): check pass; user unknown
Oct 19 00:20:28 lvps176-28-19-69 sshd[491]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=193.104.41.10
Oct 19 00:20:30 lvps176-28-19-69 sshd[491]: Failed password for invalid user admin from 193.104.41.10 port 52759 ssh2
Oct 19 00:20:30 lvps176-28-19-69 sshd[491]: fatal: Read from socket failed: Connection reset by peer [preauth]
Oct 19 00:20:32 lvps176-28-19-69 sshd[493]: Invalid user admin from 193.104.41.10
Oct 19 00:20:32 lvps176-28-19-69 sshd[493]: input_userauth_request: invalid user admin [preauth]
Oct 19 00:20:32 lvps176-28-19-69 sshd[493]: pam_unix(sshd:auth): check pass; user unknown
Oct 19 00:20:32 lvps176-28-19-69 sshd[493]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=193.104.41.10
Oct 19 00:20:34 lvps176-28-19-69 sshd[493]: Failed password for invalid user admin from 193.104.41.10 port 55588 ssh2
Oct 19 00:20:34 lvps176-28-19-69 sshd[493]: fatal: Read from socket failed: Connection reset by peer [preauth]
Oct 19 00:20:35 lvps176-28-19-69 sshd[495]: Invalid user admin from 193.104.41.10
Oct 19 00:20:35 lvps176-28-19-69 sshd[495]: input_userauth_request: invalid user admin [preauth]
Oct 19 00:20:35 lvps176-28-19-69 sshd[495]: pam_unix(sshd:auth): check pass; user unknown
Oct 19 00:20:35 lvps176-28-19-69 sshd[495]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=193.104.41.10
Oct 19 00:20:38 lvps176-28-19-69 sshd[495]: Failed password for invalid user admin from 193.104.41.10 port 61153 ssh2
Oct 19 00:20:38 lvps176-28-19-69 sshd[495]: fatal: Read from socket failed: Connection reset by peer [preauth]
Oct 19 00:20:40 lvps176-28-19-69 sshd[497]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=193.104.41.10 user=root
Oct 19 00:20:41 lvps176-28-19-69 sshd[497]: Failed password for root from 193.104.41.10 port 49805 ssh2
Oct 19 00:20:41 lvps176-28-19-69 sshd[497]: fatal: Read from socket failed: Connection reset by peer [preauth]
Oct 19 00:20:43 lvps176-28-19-69 sshd[499]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=193.104.41.10 user=root
Oct 19 00:20:45 lvps176-28-19-69 sshd[499]: Failed password for root from 193.104.41.10 port 53624 ssh2
Oct 19 00:20:45 lvps176-28-19-69 sshd[499]: fatal: Read from socket failed: Connection reset by peer [preauth]
Oct 19 00:20:46 lvps176-28-19-69 sshd[501]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=193.104.41.10 user=root
Oct 19 00:20:48 lvps176-28-19-69 sshd[501]: Failed password for root from 193.104.41.10 port 58052 ssh2
Oct 19 00:20:48 lvps176-28-19-69 sshd[501]: fatal: Read from socket failed: Connection reset by peer [preauth]
Oct 19 00:20:50 lvps176-28-19-69 sshd[503]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=193.104.41.10 user=root
Auffällig sind hauptsächlich die Einträge "fatal: Read from socket failed: Connection reset by peer [preauth]", da bin ich grad auf der Suche, woran das liegen könnte. Immerhin werden die Enträge geloggt, aber halt in die falsche Datei...
EDIT: Oha! Bei genauerem Hinsehen passiert das auch bei allen anderen Logs die von Logrotate rotiert werden...
Da scheint was größeres im kaputt zu sein....
EDIT #2:
Da das Problem auch beim /var/log/syslog auftritt habe ich da mal versucht zu analysieren:
Code:
****@************:/var/log# lsof syslog
****@************:/var/log# lsof syslog.1
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
rsyslogd 1766 root 1w REG 182,1033697 3777784 393248 syslog.1
Wenn ich den rsyslog neu starten will kommt folgende Ausgabe:
Code:
****@************:/var/log# service rsyslog restart
[ ok ] Stopping enhanced syslogd: rsyslogd already stopped.
[....] Starting enhanced syslogd: rsyslogd Already running. If you want to run multiple instances, you need to specify different pid files (use -i option)
[ ok ady started.
Dasselbe passiert bei /etc/init.d/rsyslog force-reload.
EDIT #3:
OK. Neustarten des rsyslogd klappt jetzt, nachdem ich aus /var/run ein rsyslogd.pid vom 05.09.2014 gelöscht habe.
DAS war das Problem. Seit dem wird wieder in die richtigen logfiles geschrieben...
Woher können denn solche PID-Leichen kommen?