WSGI troubles
Tom Ekberg <[email protected]>
| Newsgroups | gmane.comp.bug-tracking.roundup.user |
|---|---|
| Message-ID | <DM6PR08MB4778440D692C7A77F742C7BACAF50@DM6PR08MB4778.namprd08.prod.outlook.com> |
I using the master branch of roundup and am having trouble getting the WSGI code to work. I have built roundup using python 3.6 in a virtualenv and have initialized (via roundup-admin) a demo tracker. I'm using Ubuntu 18.04 and the stock wsgi apache module that comes with that. After setting up apache I did these steps:
1. ran local firefox with this URL: http://localhost/demo
2. Http 500 error page displayed: Internal Server Error
3. Looked at the new lines in the apache error.log:
[Tue Oct 23 14:52:44.479894 2018] [wsgi:error] [pid 2010:tid 139680028804864] [client ::1:59862] mod_wsgi (pid=2010): Exception occurred processing WSGI script '/opt/roundup/trackers/demo/apache/demo_wsgi.py'.
[Tue Oct 23 14:52:44.480096 2018] [wsgi:error] [pid 2010:tid 139680028804864] [client ::1:59862] RuntimeError: response has not been started
The demo_wsgi.py file looks like this:
import sys
# Fix sys.path to contain the VENV path
sys.path.append('/usr/local/share/virtualenvs/tracker-env/lib/python3.6/site-packages')
from roundup.cgi.wsgi_handler import RequestDispatcher
tracker_home = '/opt/roundup/trackers/demo'
application = RequestDispatcher(tracker_home)
I had to do the path trick since to get it to pull roundup from the venv. The demo.conf file looks like this:
WSGIDaemonProcess tracker_demo_pg user=www-data \
maximum-requests=10000 processes=5 threads=1 \
home=/opt/roundup/trackers/demo python-home=/usr/local/share/virtualenvs/tracker-env
WSGIScriptAlias /demo /opt/roundup/trackers/demo/apache/demo_wsgi.py
<location /demo>
AuthType None
Order deny,allow
Require all granted
</location>
The demo.conf file was copied to apache's site directory and enabled. The permissions for demo_wsgi.py and demo.conf are 755 and 744, respectively, with owner/group www-data.
The apache logs weren't very illuminating saying only that there was a 'RuntimeError: response has not been started'. Is there a way to capture more data? Does anyone have a working WSGI setup?
[cid:d37d735f-4d97-4f07-bed0-8e79a4d5d394]
_______________________________________________
Roundup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/roundup-users
Outlook-unc4lz0e.jpg
(image/jpeg, 14.3 KB) - not displayed