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 |
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 |
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. |
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. |