Plesk

Unable to activate Fail2Ban jails in Plesk: Backend ‘systemd’ failed to initialize due to No module named systemd

Symptoms

Cause

systemd is set as default backend in jail.local file:

grep -r 'backend' /etc/fail2ban/jail.local
backend = systemd

Resolution

  1. Connect to the Plesk server via SSH.

  2. Open the file /etc/fail2ban/jail.local in a text editor. In this example, we are using the vi editor:

    # vi /etc/fail2ban/jail.local

  3. Remove or comment the following line:

    backend = systemd

  4. Save the changes and close the file.

  5. Restart the Fail2Ban service:

    # systemctl restart fail2ban.service