Red Hat Bugzilla – Bug 844911
Fail2ban takes a very long amount of time to stop
Last modified: 2013-07-31 14:34:53 EDT
Description of problem:
Fail2ban takes a very long amount of time to stop.
Version-Release number of selected component (if applicable):
Install fail2ban and enable it at boot time through systemctl. Then reboot. At subsequent reboot/shutdown of the system, you should experience a very long amount of time before this action completes.
Steps to Reproduce:
1.sudo yum install fail2ban
2.sudo systemctl enable fail2ban.service; sudo systemctl start fail2ban.service
System reboot/shutdown takes a very long amount of time to complete.
This delay can also be experienced if you stop fail2ban with systemctl.
As in Fedora 16, I expect fail2ban takes a very short time to stop.
I use fail2ban to block SSH attacks.
To do so, I've added the following jail.local file in /etc/fail2ban
--- [jail.local] ---
bantime = 43200
enabled = true
filter = sshd
action = iptables[name=SSH, port=ssh, protocol=tcp]
sendmail-whois[name=SSH, dest=root, sender=fail2ban@localhost]
logpath = /var/log/secure
maxretry = 3
--- [/jail.local] ---
I think I've found a workaround/solution for this problem.
Firstly, I've installed a more recent version of fail2ban (i.e., ver. 0.8.7.1), along with patches (that I slightly modified) coming from the RPM packaged with Fedora 17 (if you (or the package maintainer) are interested, I can send you the files).
But maybe this step is useless, since alone it did not solve my problem...
Then, I add my host name in /etc/hosts, which only contained these entries:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
After this, I'm able to poweroff/restart in a very short time :)
Don't know which between fail2ban and F17 (and maybe, sendmail?) is wrong. I mean:
* Should F17 has filled my /etc/hosts during installation time when one specifies the hostname?
* Should fail2ban or sendmail use localhost instead of the host name?
same problem here.
Adding host name to /etc/hosts fixed the problem
I was hitting the same problem. I'm pretty sure this is sendmail's fault. Does 'sudo service sendmail restart' take a long time as well?
Do a google search for 'my unqualified hostname unknown' and you'll see this is a long standing sendmail thing.
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora
'version' of '17'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version prior to Fedora 17's end of life.
Bug Reporter: Thank you for reporting this issue and we are sorry that
we may not be able to fix it before Fedora 17 is end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged change the
'version' to a later Fedora version prior to Fedora 17's end of life.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
This still happens on Fedora 19. Marco's fix of adding my host name to /etc/hosts fixed the problem. This may only effect people that change their host name.
Could this bug please be changed to fedora version 19 so that it is not automatically closed? Thanks
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version.
Thank you for reporting this bug and we are sorry it could not be fixed.