Page 1 of 1

Update won't start Fail2ban if roundcube log is missing.

Posted: Sat 16. Jul 2022, 16:11
by BasHeijermans
Problem found after the update.

First: Fail2ban won't start. The reason is this:

Code: Select all

root@sprintweb:/etc/fail2ban# /usr/bin/fail2ban-server -xf start
2022-07-16 15:56:14,052 fail2ban                [9476]: ERROR   Failed during configuration: Have not found any log file for keyhelp-roundcube jail
2022-07-16 15:56:14,087 fail2ban                [9476]: ERROR   Async configuration of server failed
Simply put, the log is missing, unless you access webmail, it won't find the log and it won't start.

The keyhelp server should check if the file is present, if not, create an empty one else Fail2ban will not start.

Re: Update won't start Fail2ban if roundcube log is missing.

Posted: Mon 18. Jul 2022, 08:57
by Alexander
There is a reason, why the additional jails defined in /etc/fail2ban/jail.d/keyhelp.local are disable by default.
For example this one.

Only keyhelp-phpmyadmin and ssh are enabled by default, an a fresh system.

Re: Update won't start Fail2ban if roundcube log is missing.

Posted: Mon 18. Jul 2022, 09:37
by BasHeijermans
I set them back to original.

Re: Update won't start Fail2ban if roundcube log is missing.

Posted: Mon 18. Jul 2022, 09:40
by Alexander
You can keep the "keyhelp-recidive" enabled. This is should only be dangerous, if fail2ban is running in debug mode ;).

Re: Update won't start Fail2ban if roundcube log is missing.  [SOLVED]

Posted: Wed 19. Jul 2023, 15:15
by Alexander
Found a link to this old thread in my ToDo list, and have some new info on it.

Due to Debian 12 and the changes introduced by the OS vendor, I switched completely (within the KeyHelp code) to journalctl wherever possible, instead of relying on "real" log files. This will be the case on all supported OS.

As part of the necessary work on this issue, I also updated "/etc/fail2ban/jail.d/keyhelp.local" to use the system backend instead of the log file path. So the reason for the problem (missing log file) will not be possible at all with the upcoming KeyHelp version, because 'a missing log file' will not be possible anymore.

-> marked as solved.