Plesk

Fail2Ban bans the IP address of a website visitor: ModSecurity: collection_store: Failed to access DBM file “/var/lib/mod_security/apache-default_SESSION”: Resource deadlock avoided

Symptoms

Cause

ModSecurity logs all domains relevant records in one only log file, then this does not allow simultaneous log entries because the file is being used and hence locked for concurrent logging. This inconvenience with the ModSecurity design is tied single instance of logs use for all domains instead of using multiple files for separate domains.

Resolution

  1. Connect to the server via SSH.

  2. Navigate to /etc/fail2ban/filter.d/:

    # cd /etc/fail2ban/filter.d/

  3. Make a backup of the plesk-modsecurity jail configuration file for Fail2Ban with:

    # cp -a plesk-modsecurity.conf plesk-modsecurity.conf-bak

  4. Edit the jail configuration file and adjust the ignoreregex section by adding the collection_store and collections_remove_stale entries as follows:

    ignoreregex = ^[.*?]sS*s<HOST>s.*s1
    collection_store
    collections_remove_stale

  5. Save the changes to the file

  6. Go to Plesk > Tools & Settings > IP Address Banning (Fail2Ban) > Jails

  7. Switch the plesk-modsecurity jail Off

  8. Switch the plesk-modsecurity jail On again

Alternatively the plesk-modsecurity jail…

Exit mobile version