Unable to install Fail2ban: the installation is hanged on Running rpm_check_debug stage

Created:

2016-11-16 13:17:16 UTC

Modified:

2017-08-08 13:17:17 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to install Fail2ban: the installation is hanged on Running rpm_check_debug stage

Symptoms

Unable to install Fail2Ban using Plesk installer, the installation got frozen on the following step:

(1/2): fail2ban-0.9.2-centos6.15103017.noarch.rpm        | 412 kB     00:00     
(2/2): plesk-fail2ban-configurator-12.5.30-cos6.build120 | 182 kB 00:00
Running rpm_check_debug

The following error is found in /tmp/autoinstaller3.log:

WARNING!
Some problems are found during attempt to status service fail2ban - control script doesn't exist or isn't executable(see log file: /var/log/plesk/install/plesk_17.5.3_installation.log)
Trying to upgrade Fail2Ban configuration (bootstrapper-post stage)... Unable to upgrade 'fail2ban' to the latest version, since its configuration is in broken state. Run bootstrapper repair to fix.
Unable to upgrade 'fail2ban' to the latest version, since its configuration is in broken state.
Run bootstrapper repair to fix.

There is fail2ban package already present on a server:

# rpm -qa | grep fail2ban
fail2ban-0.9.2-centos6.15103017.noarch

There are several hanged Fail2Ban processes:

# ps aux | grep fail2
root 2573 0.0 0.7 198036 7932 ? S 12:29 0:00 /usr/bin/python /usr/bin/fail2ban-server -s /var/run/fail2ban/fail2ban.sock -p /var/run/fail2ban/fail2ban.pid -x -b
root 872 0.0 0.3 204192 7128 ? S 0:00 /usr/bin/python /usr/bin/fail2ban-client flushlogs
root 4422 0.0 0.3 204192 6940 ? S 0:00 /usr/bin/python /usr/bin/fail2ban-client flushlogs

Cause

Corrupted Fail2ban installation

Resolution

1. Connect to the server using SSH/RDP.

2. Create a backup of Fail2ban configuration:

# mkdir fail2ban_backup
# mv /etc/fail2ban/ fail2ban_backup
# mv /var/log/fail2ban.log fail2ban_backup

3. Disable any third-party repositories on a server, if any:

# grep -r enabled /etc/yum.repos.d/
/etc/yum.repos.d/CentOS-Vault.repo:enabled=0
/etc/yum.repos.d/atomic.repo:enabled = 1

Any output for third-party repositories with option "enabled=1" should be changed to "enabled=0" using any text editor, for example:

# vi /etc/yum.repos.d/atomic.repo

Now make sure it is disabled:

# grep -r enabled /etc/yum.repos.d/atomic.repo
enabled = 0

4. Kill all Fail2ban processes:

# kill -9 872 2573 4422

5. Remove fail2ban package that is already installed on a server:

# rpm -qa | grep fail2ban
fail2ban-0.9.2-centos6.15103017.noarch
# rpm -e --nodeps fail2ban-0.9.2-centos6.15103017.noarch

6. Clear yum cache to be sure that installation does not get interrupted the next time:

# rm -rf /var/lib/rpm/__db.*
# rpm --rebuilddb
# yum clean all
# yum makecache

7. Run Plesk installer to install Fail2ban:

# plesk installer

If removal cannot be done with "error reading information on service fail2ban: No such file or directory" error, follow instructions here:

Unable to activate or remove Fail2ban: error reading information on service fail2ban: No such file or directory

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