Plesk

Unable to activate Fail2Ban jails or start Fail2Ban: No file(s) found for glob /var/log/maillog

Symptoms

Cause

The jail mentioned in the Fail2Ban status is enabled in Fail2Ban configuration, but the logfile for this jail is absent.

Note: If this is a new server with AlmaLinux OS, check this KB article.

Resolution

 

Solution I: Create required logfiles/directories

 

  1. Connect to the Plesk server via SSH.

  2. Create the missing logfiles manually and assign required ownership for them:

    # touch /var/log/maillog && chmod 640 /var/log/maillog

    # mkdir /var/log/psa-horde && touch /var/log/psa-horde/psa-horde.log && chown horde_sysuser:horde_sysgroup /var/log/psa-horde/psa-horde.log

    # touch /var/log/plesk-roundcube/errors && chown roundcube_sysuser:roundcube_sysgroup /var/log/plesk-roundcube/errors && chmod 640 /var/log/plesk-roundcube/errors

    # touch /var/log/secure && chmod 600 /var/log/secure

  3. Start Fail2Ban:

    # service fail2ban start

 

Solution II: Disable the jail

 

  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. Find the component mentioned in the error message (in this example, the component is psa-horde) and remove it from the file:

    [plesk-horde]
    enabled = true

  4. Save the changes and close the file.

  5. Start Fail2Ban:

    # service fail2ban start