Debian 12 - LFD doesn't read logs
Posted: 27 Jun 2023, 23:57
Hi,
I see that Debian 12 isn't yet listed on the working distros, but not sure where to report this from my testing. Following my test server being updated to Deb 12 (Bookworm), CSF appears to work, but LFD fails to read logs. I get the failed SYSLOG email warnings - although it is writing the check code to SYSLOG, it's not able to read it. Looking at the debug log under debug level 2 every log file it scans comes back with 0 lines, even though the log files are being added to.
Jun 28 08:23:37 vroster lfd[642990]: debug: Tick: 5 [5]
Jun 28 08:23:37 vroster lfd[642990]: debug: Parsing /var/log/apache2/error.log (0 lines)
Jun 28 08:23:37 vroster lfd[642990]: debug: Parsing /var/log/messages (0 lines)
Jun 28 08:23:37 vroster lfd[642990]: debug: Parsing /var/log/customlog (0 lines)
Jun 28 08:23:37 vroster lfd[642990]: debug: Parsing /var/log/auth.log (0 lines)
Jun 28 08:23:37 vroster lfd[642990]: debug: Parsing /var/log/mail.log (0 lines)
Jun 28 08:23:37 vroster lfd[642990]: debug: Parsing /var/log/secure (0 lines)
(Note - syslog isn't in the above because I'd turned the syslog check back off to prevent me being overloaded with warning emails, as I'm aware it's not working)
A snippet of strace gives this
newfstatat(AT_FDCWD, "/var/log/syslog", {st_mode=S_IFREG|0640, st_size=8543894, ...}, 0) = 0
newfstatat(AT_FDCWD, "/etc/localtime", {st_mode=S_IFREG|0644, st_size=419, ...}, 0) = 0
getuid() = 0
openat(AT_FDCWD, "/var/log/lfd.log", O_WRONLY|O_CREAT|O_APPEND|O_CLOEXEC, 0666) = 9
lseek(9, 0, SEEK_END) = 61531240
ioctl(9, TCGETS, 0x7ffd86991c10) = -1 ENOTTY (Inappropriate ioctl for device)
lseek(9, 0, SEEK_CUR) = 61531240
newfstatat(9, "", {st_mode=S_IFREG|0600, st_size=61531240, ...}, AT_EMPTY_PATH) = 0
flock(9, LOCK_EX) = 0
getpid() = 641384
write(9, "Jun 28 07:37:34 vroster lfd[6413"..., 78) = 78
close(9) = 0
perl -v
This is perl 5, version 36, subversion 0 (v5.36.0) built for x86_64-linux-gnu-thread-multi
(with 52 registered patches, see perl -V for more detail)
Any ideas how I can troubleshoot this further?
Thanks
I see that Debian 12 isn't yet listed on the working distros, but not sure where to report this from my testing. Following my test server being updated to Deb 12 (Bookworm), CSF appears to work, but LFD fails to read logs. I get the failed SYSLOG email warnings - although it is writing the check code to SYSLOG, it's not able to read it. Looking at the debug log under debug level 2 every log file it scans comes back with 0 lines, even though the log files are being added to.
Jun 28 08:23:37 vroster lfd[642990]: debug: Tick: 5 [5]
Jun 28 08:23:37 vroster lfd[642990]: debug: Parsing /var/log/apache2/error.log (0 lines)
Jun 28 08:23:37 vroster lfd[642990]: debug: Parsing /var/log/messages (0 lines)
Jun 28 08:23:37 vroster lfd[642990]: debug: Parsing /var/log/customlog (0 lines)
Jun 28 08:23:37 vroster lfd[642990]: debug: Parsing /var/log/auth.log (0 lines)
Jun 28 08:23:37 vroster lfd[642990]: debug: Parsing /var/log/mail.log (0 lines)
Jun 28 08:23:37 vroster lfd[642990]: debug: Parsing /var/log/secure (0 lines)
(Note - syslog isn't in the above because I'd turned the syslog check back off to prevent me being overloaded with warning emails, as I'm aware it's not working)
A snippet of strace gives this
newfstatat(AT_FDCWD, "/var/log/syslog", {st_mode=S_IFREG|0640, st_size=8543894, ...}, 0) = 0
newfstatat(AT_FDCWD, "/etc/localtime", {st_mode=S_IFREG|0644, st_size=419, ...}, 0) = 0
getuid() = 0
openat(AT_FDCWD, "/var/log/lfd.log", O_WRONLY|O_CREAT|O_APPEND|O_CLOEXEC, 0666) = 9
lseek(9, 0, SEEK_END) = 61531240
ioctl(9, TCGETS, 0x7ffd86991c10) = -1 ENOTTY (Inappropriate ioctl for device)
lseek(9, 0, SEEK_CUR) = 61531240
newfstatat(9, "", {st_mode=S_IFREG|0600, st_size=61531240, ...}, AT_EMPTY_PATH) = 0
flock(9, LOCK_EX) = 0
getpid() = 641384
write(9, "Jun 28 07:37:34 vroster lfd[6413"..., 78) = 78
close(9) = 0
perl -v
This is perl 5, version 36, subversion 0 (v5.36.0) built for x86_64-linux-gnu-thread-multi
(with 52 registered patches, see perl -V for more detail)
Any ideas how I can troubleshoot this further?
Thanks