Fail2ban Fails to Start at Boot Can't Be Started

OS type and version Ubuntu 20.04
Webmin version 1.984
Virtualmin version 6.17-3 Pro
Related packages Fail2ban

Hi all,

Fail2ban is failing to start at boot and can’t be started. Here is the status message:

# service fail2ban status
● fail2ban.service - Fail2Ban Service
     Loaded: loaded (/etc/systemd/system/fail2ban.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Sun 2022-01-30 20:02:39 CST; 39s ago
       Docs: man:fail2ban(1)
    Process: 8663 ExecStartPre=/bin/mkdir -p /run/fail2ban (code=exited, status=0/SUCCESS)
    Process: 8678 ExecStart=/usr/bin/fail2ban-server -xf start (code=exited, status=255/EXCEPTION)
   Main PID: 8678 (code=exited, status=255/EXCEPTION)

Jan 30 20:02:39 systemd[1]: Starting Fail2Ban Service...
Jan 30 20:02:39 systemd[1]: Started Fail2Ban Service.
Jan 30 20:02:39 fail2ban-server[8678]: 2022-01-30 20:02:39,772 fail2ban                [8678]: ERROR   Failed during configuration: Have not found >
Jan 30 20:02:39 fail2ban-server[8678]: 2022-01-30 20:02:39,774 fail2ban                [8678]: ERROR   Async configuration of server failed
Jan 30 20:02:39 systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION
Jan 30 20:02:39 systemd[1]: fail2ban.service: Failed with result 'exit-code'.
lines 1-14/14 (END)

These are my current enabled jails, all with default settings:
sshd Yes
apache-auth Yes
apache-badbots Yes
apache-noscript Yes
apache-overflows Yes
apache-nohome Yes
apache-botsearch Yes
apache-fakegooglebot Yes
apache-modsecurity Yes
apache-shellshock Yes
roundcube-auth Yes
drupal-auth Yes
webmin-auth Yes
proftpd Yes
postfix Yes
dovecot Yes
postfix-sasl Yes postfix[mode=auth]
mysqld-auth Yes
pam-generic Yes
phpmyadmin-syslog Yes
sshd Yes

How can I get fail2ban running again?


I figured out that I had to disable the fails for:
roundcube - not installed, not configured
drupal - not installed, not configured
vsftpd - not installed, not configured
mysqld ← I have a passwd problem for root, that I am troubleshooting now.

Fail2ban doesn’t seem to like jails for not yet installed and/or not functioning services. Would have caught the problem earlier, but the status message error was cut-off by terminal window placement. whoops.

However, I do have another Fail2ban concern. Although, I went to System and Server Status and manually created a monitor for Fail2ban to alert me if the server is not working… On the Webmin dashboard the Fail2ban server does -not- appear under Server Status as being monitored.

Is this by design? Or do I need to update something else for fail2ban to appear?

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.