• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

fail2ban does not start: Unable to remove PID file

Tommy10

Basic Pleskian
I am not able to start fail2ban anymore. It always crashes while it starts.

Error:
Code:
Unable to remove PID file: [Errno 2] No such file or directory: '/var/run/fail2ban/fail2ban.pid'

The directory /var/run/fail2ban/ exists. The PID file does not exist. If I create it it will be deleted but the error still occurs. This is crazy.

I also tried to reinstall fail2ban over the Plesk Installer - the issue still occurs.

My system: Debian 8.4, Plesk 12.5.30 Update #32


$ ls -al /var/run/fail2ban/
Code:
total 0
drwxr-x---  2 root root  40 May 23 02:59 .
drwxr-xr-x 26 root root 1080 May 23 02:25 ..

/var/log/fail2ban.log
Code:
2016-05-23 02:41:59,874 fail2ban.server  [24474]: DEBUG  Caught signal 15. Exiting
2016-05-23 02:41:59,874 fail2ban.asyncserver  [24474]: DEBUG  Removed socket file /var/run/fail2ban/fail2ban.sock
2016-05-23 02:41:59,874 fail2ban.asyncserver  [24474]: DEBUG  Socket shutdown
2016-05-23 02:41:59,874 fail2ban.server  [24474]: INFO  Stopping all jails
2016-05-23 02:41:59,875 fail2ban.server  [24474]: DEBUG  Stopping jail plesk-apache-badbot
2016-05-23 02:41:59,875 fail2ban.server  [24474]: DEBUG  Stopping jail plesk-roundcube
2016-05-23 02:41:59,875 fail2ban.server  [24474]: DEBUG  Stopping jail plesk-panel
2016-05-23 02:41:59,875 fail2ban.server  [24474]: DEBUG  Stopping jail plesk-apache
2016-05-23 02:41:59,875 fail2ban.server  [24474]: DEBUG  Stopping jail plesk-dovecot
2016-05-23 02:41:59,875 fail2ban.server  [24474]: DEBUG  Stopping jail ssh
2016-05-23 02:41:59,875 fail2ban.server  [24474]: DEBUG  Stopping jail plesk-postfix
2016-05-23 02:41:59,875 fail2ban.server  [24474]: DEBUG  Stopping jail plesk-horde
2016-05-23 02:41:59,875 fail2ban.server  [24474]: DEBUG  Stopping jail plesk-proftpd
2016-05-23 02:41:59,875 fail2ban.server  [24474]: DEBUG  Stopping jail plesk-wordpress
2016-05-23 02:41:59,876 fail2ban.datedetector  [24474]: DEBUG  Sorting the template list
2016-05-23 02:41:59,876 fail2ban.datedetector  [24474]: DEBUG  Winning template: (?:DAY )?MON Day 24hour:Minute:Second(?:\.Microseconds)?(?: Year)? with 0 hits
2016-05-23 02:41:59,876 fail2ban.server  [24474]: DEBUG  Remove PID file /var/run/fail2ban/fail2ban.pid
2016-05-23 02:41:59,876 fail2ban.server  [24474]: ERROR  Unable to remove PID file: [Errno 2] No such file or directory: '/var/run/fail2ban/fail2ban.pid'
2016-05-23 02:41:59,876 fail2ban.server  [24474]: INFO  Exiting Fail2ban
 
I have fixed it the hard way:
$ apt-get purge fail2ban

You need to run "purge" to fully delete all configuration files of `fail2ban`. The Plesk Installer will only remove the `fail2ban` application and not it's configuration files.

Warning: Your fail2ban configurations will be lost.
 
I used this

https://kb.plesk.com/en/122407

with same errors as above, for me the solution was to disable all apache-badbot jails created wit the hipelink guide and got started fail2ban with no problem, later little by little, (in six times), enabled the apache-badbot jails again.

Now i can make modifications in fail2ban configuration and is working so fine apache-badbot, apache, courier-imap and postfix jails enabled
 
Back
Top