From: Joey <Joey@Web56.net> - 2008-10-22 02:08:10
|
-----Original Message----- From: Cyril Jaquier [mailto:cyr...@fa...] Sent: Sunday, October 19, 2008 3:21 PM To: Joey Cc: fai...@li... Subject: Re: [Fail2ban-users] script not running > Hi Joey, > This doesn’t make any sense but here it goes. > I was running fail2ban just fine when I got a patch from Cyril, I tried to compile it but in the end it didn’t work. > I backed out my change and re-compiled but it wouldn’t execute properly. > > Btw... Python is an interpreted language so no need to "compile" it ;) > No problem, I untarred a new copy ran the python setup.py install and still no luck. > I then removed anything that said fail2ban on the whole server, un tarred a new copy compiled and still no luck. > It makes no sense and this is what I get when trying to run the client. > > File "/usr/bin/fail2ban-client", line 40, in ? > from client.beautifier import Beautifier > File "/usr/share/fail2ban/client/beautifier.py", line 27, in ? > from server.jails import UnknownJailException > File "/usr/bin/server.py", line 28, in ? > > This file is at the wrong place :/ How did it arrive into /usr/bin? Open this file and if it is a fail2ban's file, remove it. > Check if there are more files in this directory: > # grep -R Fail2Ban /usr/bin > Remove them and install fail2ban again. It should work. > Regards, > Cyril > OK I removed those files, ran the setup again from my download folder. Look at the results: python setup.py install running install running build running build_py creating build creating build/lib creating build/lib/common copying common/protocol.py -build/lib/common copying common/version.py -build/lib/common copying common/__init__.py -build/lib/common creating build/lib/client copying client/configparserinc.py -build/lib/client copying client/filterreader.py -build/lib/client copying client/jailreader.py -build/lib/client copying client/jailsreader.py -build/lib/client copying client/beautifier.py -build/lib/client copying client/configurator.py -build/lib/client copying client/csocket.py -build/lib/client copying client/__init__.py -build/lib/client copying client/actionreader.py -build/lib/client copying client/fail2banreader.py -build/lib/client copying client/configreader.py -build/lib/client creating build/lib/server copying server/jails.py -build/lib/server copying server/transmitter.py -build/lib/server copying server/jail.py -build/lib/server copying server/banmanager.py -build/lib/server copying server/filtergamin.py -build/lib/server copying server/filter.py -build/lib/server copying server/datetemplate.py -build/lib/server copying server/ticket.py -build/lib/server copying server/action.py -build/lib/server copying server/server.py -build/lib/server copying server/actions.py -build/lib/server copying server/filterpoll.py -build/lib/server copying server/faildata.py -build/lib/server copying server/asyncserver.py -build/lib/server copying server/datedetector.py -build/lib/server copying server/__init__.py -build/lib/server copying server/jailthread.py -build/lib/server copying server/iso8601.py -build/lib/server copying server/failmanager.py -build/lib/server copying server/failregex.py -build/lib/server copying server/mytime.py -build/lib/server running build_scripts creating build/scripts-2.4 copying and adjusting fail2ban-client -build/scripts-2.4 copying and adjusting fail2ban-server -build/scripts-2.4 copying and adjusting fail2ban-regex -build/scripts-2.4 changing mode of build/scripts-2.4/fail2ban-client from 644 to 755 changing mode of build/scripts-2.4/fail2ban-server from 644 to 755 changing mode of build/scripts-2.4/fail2ban-regex from 644 to 755 running install_lib creating /usr/share/fail2ban creating /usr/share/fail2ban/common copying build/lib/common/protocol.py -/usr/share/fail2ban/common copying build/lib/common/version.py -/usr/share/fail2ban/common copying build/lib/common/__init__.py -/usr/share/fail2ban/common creating /usr/share/fail2ban/client copying build/lib/client/configparserinc.py -/usr/share/fail2ban/client copying build/lib/client/filterreader.py -/usr/share/fail2ban/client copying build/lib/client/jailreader.py -/usr/share/fail2ban/client copying build/lib/client/jailsreader.py -/usr/share/fail2ban/client copying build/lib/client/beautifier.py -/usr/share/fail2ban/client copying build/lib/client/configurator.py -/usr/share/fail2ban/client copying build/lib/client/csocket.py -/usr/share/fail2ban/client copying build/lib/client/__init__.py -/usr/share/fail2ban/client copying build/lib/client/actionreader.py -/usr/share/fail2ban/client copying build/lib/client/fail2banreader.py -/usr/share/fail2ban/client copying build/lib/client/configreader.py -/usr/share/fail2ban/client creating /usr/share/fail2ban/server copying build/lib/server/jails.py -/usr/share/fail2ban/server copying build/lib/server/transmitter.py -/usr/share/fail2ban/server copying build/lib/server/jail.py -/usr/share/fail2ban/server copying build/lib/server/banmanager.py -/usr/share/fail2ban/server copying build/lib/server/filtergamin.py -/usr/share/fail2ban/server copying build/lib/server/filter.py -/usr/share/fail2ban/server copying build/lib/server/datetemplate.py -/usr/share/fail2ban/server copying build/lib/server/ticket.py -/usr/share/fail2ban/server copying build/lib/server/action.py -/usr/share/fail2ban/server copying build/lib/server/server.py -/usr/share/fail2ban/server copying build/lib/server/actions.py -/usr/share/fail2ban/server copying build/lib/server/filterpoll.py -/usr/share/fail2ban/server copying build/lib/server/faildata.py -/usr/share/fail2ban/server copying build/lib/server/asyncserver.py -/usr/share/fail2ban/server copying build/lib/server/datedetector.py -/usr/share/fail2ban/server copying build/lib/server/__init__.py -/usr/share/fail2ban/server copying build/lib/server/jailthread.py -/usr/share/fail2ban/server copying build/lib/server/iso8601.py -/usr/share/fail2ban/server copying build/lib/server/failmanager.py -/usr/share/fail2ban/server copying build/lib/server/failregex.py -/usr/share/fail2ban/server copying build/lib/server/mytime.py -/usr/share/fail2ban/server byte-compiling /usr/share/fail2ban/common/protocol.py to protocol.pyc byte-compiling /usr/share/fail2ban/common/version.py to version.pyc byte-compiling /usr/share/fail2ban/common/__init__.py to __init__.pyc byte-compiling /usr/share/fail2ban/client/configparserinc.py to configparserinc.pyc byte-compiling /usr/share/fail2ban/client/filterreader.py to filterreader.pyc byte-compiling /usr/share/fail2ban/client/jailreader.py to jailreader.pyc byte-compiling /usr/share/fail2ban/client/jailsreader.py to jailsreader.pyc byte-compiling /usr/share/fail2ban/client/beautifier.py to beautifier.pyc byte-compiling /usr/share/fail2ban/client/configurator.py to configurator.pyc byte-compiling /usr/share/fail2ban/client/csocket.py to csocket.pyc byte-compiling /usr/share/fail2ban/client/__init__.py to __init__.pyc byte-compiling /usr/share/fail2ban/client/actionreader.py to actionreader.pyc byte-compiling /usr/share/fail2ban/client/fail2banreader.py to fail2banreader.pyc byte-compiling /usr/share/fail2ban/client/configreader.py to configreader.pyc byte-compiling /usr/share/fail2ban/server/jails.py to jails.pyc byte-compiling /usr/share/fail2ban/server/transmitter.py to transmitter.pyc byte-compiling /usr/share/fail2ban/server/jail.py to jail.pyc byte-compiling /usr/share/fail2ban/server/banmanager.py to banmanager.pyc byte-compiling /usr/share/fail2ban/server/filtergamin.py to filtergamin.pyc byte-compiling /usr/share/fail2ban/server/filter.py to filter.pyc byte-compiling /usr/share/fail2ban/server/datetemplate.py to datetemplate.pyc byte-compiling /usr/share/fail2ban/server/ticket.py to ticket.pyc byte-compiling /usr/share/fail2ban/server/action.py to action.pyc byte-compiling /usr/share/fail2ban/server/server.py to server.pyc byte-compiling /usr/share/fail2ban/server/actions.py to actions.pyc byte-compiling /usr/share/fail2ban/server/filterpoll.py to filterpoll.pyc byte-compiling /usr/share/fail2ban/server/faildata.py to faildata.pyc byte-compiling /usr/share/fail2ban/server/asyncserver.py to asyncserver.pyc byte-compiling /usr/share/fail2ban/server/datedetector.py to datedetector.pyc byte-compiling /usr/share/fail2ban/server/__init__.py to __init__.pyc byte-compiling /usr/share/fail2ban/server/jailthread.py to jailthread.pyc byte-compiling /usr/share/fail2ban/server/iso8601.py to iso8601.pyc byte-compiling /usr/share/fail2ban/server/failmanager.py to failmanager.pyc byte-compiling /usr/share/fail2ban/server/failregex.py to failregex.pyc byte-compiling /usr/share/fail2ban/server/mytime.py to mytime.pyc running install_scripts copying build/scripts-2.4/fail2ban-client -/usr/bin copying build/scripts-2.4/fail2ban-regex -/usr/bin copying build/scripts-2.4/fail2ban-server -/usr/bin changing mode of /usr/bin/fail2ban-client to 755 changing mode of /usr/bin/fail2ban-regex to 755 changing mode of /usr/bin/fail2ban-server to 755 running install_data creating /var/run/fail2ban Please do not forget to update your configuration files. They are in /etc/fail2ban/. Look at the results from the search: grep -R Fail2Ban /usr/bin /usr/bin/fail2ban-client:# This file is part of Fail2Ban. /usr/bin/fail2ban-client:# Fail2Ban is free software; you can redistribute it and/or modify /usr/bin/fail2ban-client:# Fail2Ban is distributed in the hope that it will be useful, /usr/bin/fail2ban-client:# along with Fail2Ban; if not, write to the Free Software /usr/bin/fail2ban-client: print "Fail2Ban v" + version /usr/bin/fail2ban-client: """ Prints Fail2Ban command line options and exits /usr/bin/fail2ban-client: print "Fail2Ban v" + version + " reads log file that contains password failure report" /usr/bin/fail2ban-client: print "Fail2Ban v" + version + " reads log file that contains password failure report" /usr/bin/fail2ban-client: # Start Fail2Ban server. /usr/bin/server.py:# This file is part of Fail2Ban. /usr/bin/server.py:# Fail2Ban is free software; you can redistribute it and/or modify /usr/bin/server.py:# Fail2Ban is distributed in the hope that it will be useful, /usr/bin/server.py:# along with Fail2Ban; if not, write to the Free Software /usr/bin/fail2ban-regex:# This file is part of Fail2Ban. /usr/bin/fail2ban-regex:# Fail2Ban is free software; you can redistribute it and/or modify /usr/bin/fail2ban-regex:# Fail2Ban is distributed in the hope that it will be useful, /usr/bin/fail2ban-regex:# along with Fail2Ban; if not, write to the Free Software /usr/bin/fail2ban-regex: print "Fail2Ban v" + version /usr/bin/fail2ban-regex: print "Fail2Ban v" + version + " reads log file that contains password failure report" /usr/bin/fail2ban-server:# This file is part of Fail2Ban. /usr/bin/fail2ban-server:# Fail2Ban is free software; you can redistribute it and/or modify /usr/bin/fail2ban-server:# Fail2Ban is distributed in the hope that it will be useful, /usr/bin/fail2ban-server:# along with Fail2Ban; if not, write to the Free Software /usr/bin/fail2ban-server:# \mainpage Fail2Ban /usr/bin/fail2ban-server: print "Fail2Ban v" + version /usr/bin/fail2ban-server: """ Prints Fail2Ban command line options and exits /usr/bin/fail2ban-server: print "Fail2Ban v" + version + " reads log file that contains password failure report" FYI the other 2 servers I have this running on have the files in the same place. /usr/bin/fail2ban-regex /usr/bin/fail2ban-server /usr/bin/fail2ban-client Joey |