Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 574804 - net-analyzer/fail2ban - version updates have awkward flow
Summary: net-analyzer/fail2ban - version updates have awkward flow
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-15 16:36 UTC by Doug Goldstein (RETIRED)
Modified: 2016-07-21 06:41 UTC (History)
0 users

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 Doug Goldstein (RETIRED) gentoo-dev 2016-02-15 16:36:55 UTC
$ sudo /etc/init.d/fail2ban stop
Password:
 * Caching service dependencies ...                                       [ ok ]
 * Stopping fail2ban ...
Shutdown successful
Traceback (most recent call last):
  File "/usr/bin/fail2ban-client", line 470, in <module>
    if client.start(sys.argv):
  File "/usr/bin/fail2ban-client", line 440, in start
    return self.__processCommand(args)
  File "/usr/bin/fail2ban-client", line 281, in __processCommand
    return self.__processCmd([cmd])
  File "/usr/bin/fail2ban-client", line 185, in __processCmd
    client.close()
  File "/usr/lib64/python2.7/site-packages/fail2ban/client/csocket.py", line 55, in close
    self.__csock.sendall(CSPROTO.CLOSE + CSPROTO.END)
  File "/usr/lib64/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 32] Broken pipe
 * Failed to stop fail2ban                                                [ !! ]
 * ERROR: fail2ban failed to stop


At this point you must:
$ sudo /etc/init.d/fail2ban zap

To be able to start it again. The init script should handle this a little bit more gracefully for the user.
Comment 1 Jack Suter 2016-02-16 05:38:52 UTC
This is due to the init script not using start-stop-daemon to track the daemon status. A patch has been submitted upstream:

https://github.com/fail2ban/fail2ban/pull/1322

I've tested this just now by upgrading from =fail2ban-0.9.2 to =fail2ban-0.9.3-r1 and confirmed the service was able to restart as normal when using the patched init script.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2016-02-16 07:50:32 UTC
Did that init.d script change again??