• 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

Resolved Fail2ban Jails are inactive

Jimlee3

Basic Pleskian
I noticed that a lot of my fail2ban jails are inactive
ufDQc1Q.png

when trying to activate them I get this

Code:
Unable to switch on the selected jails: f2bmng failed: Traceback (most recent call last):
File "/usr/bin/fail2ban-client", line 470, in
if client.start(sys.argv):
File "/usr/bin/fail2ban-client", line 440, in start
return self.__processCommand(args)
File "/usr/bin/fail2ban-client", line 256, in __processCommand
if self.__ping():
File "/usr/bin/fail2ban-client", line 153, in __ping
return self.__processCmd([["ping"]], False)
File "/usr/bin/fail2ban-client", line 185, in __processCmd
client.close()
File "/usr/lib/python2.6/site-packages/fail2ban/client/csocket.py", line 55, in close
self.__csock.sendall(CSPROTO.CLOSE + CSPROTO.END)
File "", line 1, in sendall
socket.error: [Errno 32] Broken pipe
ERROR:f2bmng:Command '['/usr/bin/fail2ban-client', 'reload']' returned non-zero exit status 1
ERROR:f2bmng:Failed to reload following jails due to errors in configuration
 
Could you please show me output of command:

# rpm -qi fail2ban | grep Vendor

?
 
Yes, there is solution for restoring plesk version of fail2ban instead of third-party version.
 
Yes, there is solution for restoring plesk version of fail2ban instead of third-party version.
I didnt have this problem yesterday, did something happened that caused this?

also for this step:
Disable all third-party repositories that are present on the server: specify enabled = 0 in corresponding configuration files in /etc/yum/yum.repos.d/

there is no directory /etc/yum/yum.repos.d/
 
did something happened that caused this?
It's difficult to say without deep logs investigation. Maybe it is result of daily maintenance script execution or updates installation or something else.
Anyway, it is bad idea to use non-Plesk fail2ban version.
 
It's difficult to say without deep logs investigation. Maybe it is result of daily maintenance script execution or updates installation or something else.
Anyway, it is bad idea to use non-Plesk fail2ban version.
okay, thank you.
I am trying to follow the resolution in the article you provided I am stuck here:
  1. Disable all third-party repositories that are present on the server: specify enabled = 0 in corresponding configuration files in /etc/yum/yum.repos.d/
there is no directory with this name
there is this directory :
/etc/yum.repos.d/
with this content
autoinstaller-sources.repo CentOS-Base.repo CentOS-Debuginfo.repo CentOS-fasttrack.repo CentOS-Media.repo CentOS-Vault.repo epel.repo epel-testing.repo
 
I try to enable Fail2ban in services and I get this:

Code:
Error: Unable to make action: Unable to manage service by f2bmng: ERROR Found no accessible config files for 'filter.d/ssh' under /etc/fail2ban
ERROR No section: 'Definition'
ERROR No section: 'Definition'
ERROR Unable to read the filter
ERROR Errors in jail 'ssh'. Skipping...
ERROR:f2bmng:Failed to start fail2ban service
('--start', 'fail2ban')

and
Code:
rpm -qa | grep fail
fail2ban-0.9.4-2.el6.noarch
plesk-fail2ban-configurator-12.0.18-cos6.build1200140526.11.noarch

the vendor is still Fedora,
I dont think I am installing it correctly,
 
Last edited:
okay the problem was with epel package
I removed epe repo and then installed the plesk version
yum remove epel-release
 
Back
Top