#44 v0.8.3 on openSUSE 11.1/64 fails on a lock

open-fixed
None
5
2009-09-01
2009-04-19
No

Fail2ban v0.8.3 on openSUSE 11.1 x86_64.
Log file shows communication errors, lock file is not dealt with.
Upon shutting down fail2ban the log shows this traceback:

Exiting Fail2ban
cannot release un-aquired lock
Traceback (most recent call last):
File "/usr/local/bin/fail2ban-server", line 126, in start
self.__server.start(self.__conf["socket"], self.__conf["force"])
File "/usr/share/fail2ban/server/server.py", line 98, in start
logSys.info("Exiting Fail2ban")
File "/usr/lib64/python2.6/logging/__init__.py", line 1021, in info
self._log(INFO, msg, args, **kwargs)
File "/usr/lib64/python2.6/logging/__init__.py", line 1129, in _log
self.handle(record)
File "/usr/lib64/python2.6/logging/__init__.py", line 1139, in handle
self.callHandlers(record)
File "/usr/lib64/python2.6/logging/__init__.py", line 1176, in callHandlers
hdlr.handle(record)
File "/usr/lib64/python2.6/logging/__init__.py", line 664, in handle
self.release()
File "/usr/lib64/python2.6/logging/__init__.py", line 618, in release
self.lock.release()
File "/usr/lib64/python2.6/threading.py", line 136, in release
raise RuntimeError("cannot release un-aquired lock")
RuntimeError: cannot release un-aquired lock

When starting fail2ban the log shows this kind of material:

2009-04-19 14:16:54,569 fail2ban.server : ERROR Unexpected communication error
2009-04-19 14:16:54,569 fail2ban.jail : INFO Creating new jail 'ssh-iptables'
2009-04-19 14:16:54,570 fail2ban.jail : INFO Jail 'ssh-iptables' uses poller
2009-04-19 14:16:54,580 fail2ban.server : ERROR Unexpected communication error
2009-04-19 14:16:54,580 fail2ban.filter : INFO Added logfile = /var/log/messages
2009-04-19 14:16:54,580 fail2ban.server : ERROR Unexpected communication error
2009-04-19 14:16:54,580 fail2ban.filter : INFO Set maxRetry = 3
2009-04-19 14:16:54,581 fail2ban.server : ERROR Unexpected communication error
2009-04-19 14:16:54,581 fail2ban.server : ERROR Unexpected communication error
2009-04-19 14:16:54,581 fail2ban.filter : INFO Set findtime = 3600
2009-04-19 14:16:54,582 fail2ban.server : ERROR Unexpected communication error
2009-04-19 14:16:54,582 fail2ban.actions: INFO Set banTime = 600
2009-04-19 14:16:54,582 fail2ban.server : ERROR Unexpected communication error
2009-04-19 14:16:54,585 fail2ban.server : ERROR Unexpected communication error
2009-04-19 14:16:54,588 fail2ban.server : ERROR Unexpected communication error
2009-04-19 14:16:54,590 fail2ban.server : ERROR Unexpected communication error
2009-04-19 14:16:54,594 fail2ban.server : ERROR Unexpected communication error

When running we have:

# cd /var/run
# ls -lR fail2ban
fail2ban:
total 4
-rw------- 1 root root 6 Apr 19 14:16 fail2ban.pid
srwx------ 1 root root 0 Apr 19 14:16 fail2ban.sock
#
which is proper to my eye.

I run fail2ban on various SLES systems without this problem.
Joe Doupnik
jrd@netlab1.oucs.ox.ac.uk

Discussion

  • Nobody/Anonymous

    Hi.

    Got exactly the same problem on up to date arch linux (2009-04-24, Fail2ban v0.8.3).

    The start and stop commands tells that all is ok, but brute-force attacks are not jailed.

    my Python default version is 2.6.1 compiled with gcc 4.3.2 (python 3.0 is installed but needs a specific call)

    miq75

     
  • Nobody/Anonymous

    Same problem on Fedora 11 with Fail2ban v0.8.3.

    This seems to be a problem with python 2.6. On Fedora 10 (with python 2.5) everything is working fine. Therefore all current releases of various distributions (Fedora, SuSE, Ubuntu, ...) will be affected due to the version of python (they all use python 2.6, and in the near future probably python 3.x).

    Thus the priority of this bug report should be higher I think ... it would be nice if someone could fix it ;-)

    Here are some interesting links:
    https://bugzilla.redhat.com/show_bug.cgi?id=508171
    https://bugs.launchpad.net/ubuntu/+source/fail2ban/+bug/372304

    Regards,
    Leo

     
  • Arturo Alberto Busleiman

    I'm now working on this bug. Please contact me if you can assist in testing/debugging.

     
  • Arturo Alberto Busleiman

    • assigned_to: nobody --> buanzo
     
  • Nobody/Anonymous

    I have successfully tested the nightly build [01-Sep-2009 03:01] of fail2ban with the patches for python 2.6 on

    - Fedora 11
    - CentOS 5.3
    - Debian 5.0 "lenny"
    - openSUSE 11.1

    (all four systems up-to-date, i.e. with the most recent updates installed)

    Everything is working fine with all of them :-) You can get the latest nightly build from http://www.fail2ban.org/nightly/

    Thank you very much for your great work, Buanzo!

    Regards,
    Leo

     
  • Arturo Alberto Busleiman

    • status: open --> open-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks