[DUPLICATE OF #61181] 504 Gateway Time-out nginx error while accessing fail2ban

Refers to:

  • Plesk 12.5 for Linux
  • Plesk 12.0 for Linux

Created:

2016-11-16 13:01:44 UTC

Modified:

2016-12-21 19:47:11 UTC

0

Was this article helpful?


Have more questions?

Submit a request

[DUPLICATE OF #61181] 504 Gateway Time-out nginx error while accessing fail2ban

Symptoms

Access to Plesk > Tools & Settings > IP Address banning (fail2ban) results in time-out error or simply hangs.

504 Gateway Time-out

OR

Unable to enable jails:

Error: 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()
AttributeError: CSocket instance has no attribute 'close'
ERROR:f2bmng:Command '['/usr/bin/fail2ban-client', 'reload']' returned non-zero exit status 1

OR

Plesk shows 504 gateway timeout error on most actions in interface.

Cause

Installed fail2ban package is different from package that shipped with Plesk.

Resolution

  1. Take backup of '/etc/fail2ban' directory as '/usr/local/src/fail2ban/'
  2. Disable all 3rd-party repositories, excluding atomic. For more information see article #117910
  3. Re-install fail2ban using Plesk autoinstaller :

    # /usr/local/psa/admin/sbin/autoinstaller --select-release-current --remove-component fail2ban

    # /usr/local/psa/admin/sbin/autoinstaller --select-release-current --install-component fail2ban
  4. Copy configuration files back if it is required.

Have more questions? Submit a request
Please sign in to leave a comment.