When I try to stop, or restart fail2ban (or when I restart shorewall), fail2ban init script tells that fail2ban couldn't be stopped, even if it is really stopped, but seems too late : # service fail2ban stop * Caching service dependencies ... [ ok ] * Stopping fail2ban ... * start-stop-daemon: 1 process refused to stop * Failed to stop fail2ban [ !! ] * ERROR: fail2ban failed to stop I have no error in /var/log/fail2ban.log, juste fail2ban which takes too much time to stop. Just 1 or 2 seconds more than waited by start-stop-daemon. And I haven't any more problem if I add --retry 20 in /etc/init.d/fail2ban : stop() { ebegin "Stopping fail2ban" start-stop-daemon --stop --retry 20 --pidfile /run/fail2ban/fail2ban.pid \ -- ${FAIL2BAN} stop eend $? "Failed to stop fail2ban" }
We don't maintain the init.d script ourselves, and upstream would probably want to know about your change, so please report this at [1]. [1] https://github.com/fail2ban/fail2ban/issues
The issue was fixed upstream (see https://github.com/fail2ban/fail2ban/commit/9fbf713d7dc662ca6707682a676f4964b15e61ac) in december 2016. However, for some reason, this change didn't make it into 0.9.7 (may 2017), so we're left with the manual fix for now.
(In reply to Romain Riviere from comment #2) > The issue was fixed upstream