LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   DenyHosts fails to start after installation of newer python (https://www.linuxquestions.org/questions/linux-server-73/denyhosts-fails-to-start-after-installation-of-newer-python-515659/)

kristof_v 01-02-2007 01:32 PM

DenyHosts fails to start after installation of newer python
 
hi,

i had DenyHosts running smoothly on my Debian server.
Then i decided to install fail2ban to protect Apache.

apt-get install fail2ban installed a newer version of python (python2.4) whereis python2.3 was used bu DenyHosts.

now when i try to start DenyHosts it fails with the follwoing message:

fileserver:/etc/fail2ban# /etc/init.d/denyhosts start
starting DenyHosts: /usr/bin/env python /usr/bin/denyhosts.py --daemon --config=/usr/share/denyhosts/denyhosts.cfg
Traceback (most recent call last):
File "/usr/bin/denyhosts.py", line 5, in ?
import DenyHosts.python_version
ImportError: No module named DenyHosts.python_version


i would like to get DenyHosts running again :)

grtz

kristof_v 01-03-2007 02:39 AM

solved:

Hi,

I'm trying to get DenyHosts 2.4 running on my system. I am running
Python2.4. I have configured everything correctly (I believe), however
when I try to load DenyHosts via daemon-control I receive a series of
trackback messages and then "DenyHosts exited abnormally".

> Whoops. My bad. I just released 2.4b which should fix this problem.

Regards,

Phil

natv 08-14-2007 12:52 PM

fix
 
HI,

I had the same problem and researched it and here is the fix, change this to what I changed:

Edit /usr/share/denyhosts/daemon-control

#PYTHON_BIN = "/usr/bin/env python"
PYTHON_BIN = "/usr/bin/env python2.4"


adding the 2.4 is what fixed it.

Hope this helps.

cronky 08-06-2009 06:24 AM

Fix for Ubuntu is slightly different (different file)
 
Great thread - thanks guys. I sorted the problem on Ubuntu (scary that Denyhosts hasn't been running for sometime - it took someone almost DoS my box through SSH requests to realise - which is not good).

Although I found the file you need to change on Ubuntu is: /usr/share/denyhosts/daemon-control-dist rather than the one mentioned.


All times are GMT -5. The time now is 02:30 PM.