• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Can't enable plesk-modsecurity jail for fail2ban

Oldiesmann

Basic Pleskian
I just moved to a new VPS and am finalizing Plesk configuration. The monitoring thing says that "fail2ban" is switched off. In reality only the "plesk-modsecurity" jail is inactive, but trying to activate it fails with the following message:
Unable to switch on the selected jails: f2bmng failed: 2022-04-02 15:27:49,307 fail2ban [410989]: ERROR NOK: ("Failed to initialize any backend for Jail 'plesk-modsecurity'",)
ERROR:__main__:Command '['/usr/bin/fail2ban-client', 'reload', '--if-exists', 'plesk-modsecurity']' returned non-zero exit status 255.
ERROR:__main__:Failed to reload following jails due to errors in configuration: plesk-modsecurity.
What does this mean and how do I fix it? I did find a link to what appears to be a relevant support article on Google but clicking the link just gives me an error saying I'm not authorized to access that page and I can't find it via the search in the support center
 
I guess this is the article you've found:


But looking at the error you got, this is probably the cause of the problem:

"Failed to reload following jails due to errors in configuration: plesk-modsecurity"

Can you compare these files with the old VPS?

/etc/fail2ban/filter.d/plesk-modsecurity.conf
/etc/fail2ban/jail.d/plesk.conf
 
I deleted that VPS because I no longer needed it, so I can't compare the files. Should I uninstall and reinstall fail2ban and ModSecurity?
 
What OS are you using?
Can you show the versions of mod_security and fail2ban you've installed?
 
Ubuntu 20.04, ModSecurity 2.9. Not sure about fail2ban but I'm assuming it's 0.11.2 since that's the latest version
 
Any suggestions? I get a similar error if I try to add a new jail (for instance one banning IPs for failed login to the mail server)
 
I would suggest you contact Plesk Support Team:


If your license does not include Plesk support, you still can get Plesk Support, it's the free for the first month.

Just follow the link to the store and don't forget to cancel it when the issue has been solved:

Screenshot 2022-04-04 at 15.25.53.png
 
Back
Top