Articles in this section

Unable to enable the Fail2ban jail: Failed to reload following jails due to errors in configuration

Plesk for Linux kb: technical ext: migrator ABT: Group B

Applicable to:

  • Plesk for Linux

Symptoms

  • The following errors have been encountered when attempting to enable the Fail2ban jail:

    # plesk bin ip_ban --enable-jails plesk-roundcube
    .....
    ERROR Found no accessible config files for 'action.d/iptables-multiport' under /etc/fail2ban
    ERROR Error in action definition iptables-multiport[name="plesk-roundcube", port="http,https,7080,7081"]
    ERROR Errors in jail 'plesk-roundcube'. Skipping...
    ERROR:f2bmng:Command '['/usr/bin/fail2ban-client', 'reload', 'plesk-roundcube']' returned non-zero exit status 255
    ERROR:f2bmng:Failed to reload following jails due to errors in configuration: plesk-roundcube

  • Unable to start a Plesk migration, the following error is shown in the migration logs:

    CONFIG_TEXT: =|2020-06-28_17:11:46,741|D|MT|core.runners.base|||stderr: [2020-06-28 17:11:46.522] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/f2bmng' '--reload'] with exit code [1]
    =|2020-06-28_17:11:46,741|D|MT|core.runners.base|||PHP Fatal error: Uncaught PleskUtilException: f2bmng failed: 2020-06-28 17:11:46,413 fail2ban.configreader [30092]: ERROR Found no accessible config files for 'filter.d/dropbear' under /etc/fail2ban
    =|2020-06-28_17:11:46,741|D|MT|core.runners.base|||2020-06-28 17:11:46,413 fail2ban.jailreader [30092]: ERROR Unable to read the filter 'dropbear'
    =|2020-06-28_17:11:46,741|D|MT|core.runners.base|||2020-06-28 17:11:46,413 fail2ban.jailsreader [30092]: ERROR Errors in jail 'dropbear'. Skipping...
    ...

Cause

The installation of Fail2ban was corrupted.

Resolution

  1. Connect to the server via SSH
  2. Create a backup for the Fail2ban jail rules:

    # cp /etc/fail2ban/jail.local /root/jail.local

  3. Remove the Fail2ban component with the command:

    # plesk installer --select-release-current --remove-component fail2ban

  4. Rename Fail2ban directory:

    # mv /etc/fail2ban /etc/fail2ban_old

  5. Install Fail2ban component back:

    # plesk installer --select-release-current --install-component fail2ban

  6. Move jail.local file back:

    # mv /root/jail.local /etc/fail2ban/

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.