Symptoms
-
After Plesk upgrade, subscription creation fails:
PLESK_ERROR: hosting update is failed: f2bmng failed: ERROR:__main__:Command ‘[‘/bin/rpm’, ‘-qf’, ‘–queryformat’, ‘%{NAME}n’, ‘/etc/fail2ban/jail.conf’, ‘/etc/fail2ban/jail.d/plesk.conf’, ‘/etc/fail2ban/jail.local’]’ returned non-zero exit status 1″ error occurred.
PLESK_ERROR: Error: Unable to get the list of jails: f2bmng failed: ERROR:__main__:Command ‘[‘/bin/rpm’, ‘-qf’, ‘–queryformat’, ‘%{NAME}n’, ‘/etc/fail2ban/jail.conf’, ‘/etc/fail2ban/jail.d/plesk.conf’, ‘/etc/fail2ban/jail.local’]’ returned non-zero exit status 1.
The same error appears when accessing Tools & Settings > Fail2ban > Jails tab.
-
Creating or deleting customers fails with the following error:
PLESK_ERROR: Unable to remove customer: f2bmng failed: ERROR:__main__:Failed to get packages by files: package manager returned 6 lines instead of expected 4. Command was [‘/bin/rpm’, ‘-qf’, ‘–queryformat’, ‘%{NAME}n’, ‘/etc/fail2ban/jail.conf’, ‘/etc/fail2ban/jail.d/plesk.conf’, ‘/etc/fail2ban/jail.d/wordpress-xmlrpc.conf’, ‘/etc/fail2ban/jail.local’] and returned exit status 2. Your package system might be inconsistent. Please check it for issues with ‘plesk sbin pum –check –full’.
Cause
Duplicated packages in the RPM database:
# rpm -qa | grep fail2ban
fail2ban-0.10.3.1-2.centos.7+p18.0.29.1+t200807.1333.noarch
fail2ban-0.10.3.1-2.centos.7+p18.0.23.0+t191224.1303.noarch
plesk-fail2ban-configurator-18.0-2.centos.7+p18.0.29.1+t200807.1333.noarch
plesk-fail2ban-configurator-18.0-2.centos.7+p18.0.26.0+t200410.1427.noarch
Resolution
Remove duplicate packages using a solution from Yum fails to resolve dependencies: package is a duplicate with.