View Single Post
  #1   (View Single Post)  
Old 26th August 2009
deadeyes deadeyes is offline
Port Guard
 
Join Date: Jun 2008
Posts: 19
Default apache with python

Hi all,

In the past I had the following running:
Apache, with mod_python and python.

On this apache there was a webapp running called torrentflux.

This uses some python scripts.
In the past this did work.

However, after I upgraded from 7.0 to 7.2 it failed running to fix some security issues.

The off the failing program is:
Quote:
[2009/08/26 - 17:18:40] executing command :
cd '/usr/local/torrentflux/user/'; HOME='/usr/local/torrentflux/'; export HOME; nohup /usr/local/bin/python -OO '/usr/local/www/data-dist/nonssl/torrentflux/bin/clients/tornado/tftornado.py' 'True' '147' 'user' '/usr/local/torrentflux/.transfers/atorrent.torrent' --responsefile '/usr/local/torrentflux/.transfers/atorrent.torrent' --display_interval 1 --max_download_rate '0' --max_upload_rate '10' --max_uploads '4' --minport '49160' --maxport '49300' --rerequest_interval '1800' --super_seeder '0' --max_connections '40' 1>> '/usr/local/torrentflux/.transfers/atorrent.torrent.log' 2>> '/usr/local/torrentflux/.transfers/atorrent.torrent.log' &
Traceback (most recent call last):
File "/usr/local/www/data-dist/nonssl/torrentflux/bin/clients/tornado/tftornado.py", line 25, in <module>
from BitTornado.download_bt1 import BT1Download, defaults, parse_params, get_usage, get_response
File "/usr/local/www/data-dist/torrentflux/bin/clients/tornado/BitTornado/download_bt1.py", line 8, in <module>
File "/usr/local/www/data-dist/torrentflux/bin/clients/tornado/BitTornado/BT1/Storage.py", line 4, in <module>
File "/usr/local/www/data-dist/torrentflux/bin/clients/tornado/BitTornado/piecebuffer.py", line 5, in <module>
File "/usr/local/lib/python2.5/threading.py", line 6, in <module>
import thread
ImportError: No module named thread
As you can see the thread module cannot be found.

I had some problems using the mod_python with apache(apache crashed while starting) and after compiling it without thread support did work again.

However, now this webapplication is failing.
Does anyone knows what I do wrong? Or why this python script doesn't run anymore but previously it did. (On a freebsd)

I didn't change anything on the settings of the webapp itself.

Maybe there is a special combination I should use to get this working.

Maybe I was using another version of apache... I am not sure.
I have read that thread support is not recommended, however, as it worked before, I never had any problems with it.
Reply With Quote