Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 618138 - net-analyzer/fail2ban-0.9.6 init script should use --retry XX in start-stop-daemon --stop
Summary: net-analyzer/fail2ban-0.9.6 init script should use --retry XX in start-stop-d...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-10 18:58 UTC by Christophe PEREZ
Modified: 2019-03-27 10:29 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christophe PEREZ 2017-05-10 18:58:36 UTC
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"
}
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2017-05-14 09:06:24 UTC
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
Comment 2 Romain Riviere 2017-12-17 10:04:12 UTC
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.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2019-03-27 10:29:13 UTC
(In reply to Romain Riviere from comment #2)
> The issue was fixed upstream