$ 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.
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.
Did that init.d script change again??