this was the useful bit. For some reason, on this server, my
tracebacks are in the main log. WHEW!
They shouldn't be though.
If using embedded mode and you were to print messages direct to
sys.stderr they would go to main error log instead of VirtualHost, but
the tracebacks logged by mod_wsgi itself along with that lead in error
message should go to the VirtualHost error log.
yeah, that's what i've seen in my other wsgi apps. Not sure why this
one is different...
anyway, now that i can actually debug, i see that my sys.path isn't
correct. Thank you, thank you. I'm going to plow ahead and i'll
chirp again if i get stuck.
What were you doing to your sys.path to cause import of the socket
module to fail?
well, it gets a bit hairy, i think. The long story is that this is a
CentOS machine and the stock python is 2.4. My django app needs some
things in python2.6, so I compiled my own version to /usr/local/bin. I
then compiled mod_wsgi against that. However, i had also been dabbling
with virtualenv. For some reason that i cannot yet decipher, the
sys.path that was being reported in wsgi was from the "BASELINE"
virtualenv python2.6, which was not what i was expecting. In the
absence of any other configs, i guess i'm not sure where/how apache
+wsgi get sys.path populated...
You aren't trying to point at a Python installation different to what
mod_wsgi was compiled against are you, you shouldn't do that by
fiddling with sys.path.
this is what i originally thought was going on. However, running "ldd /
path/to/mod_wsgi.so" seemed to indicate the correct path/files.
I still want to see your configuration. I also want to see what
CustomLog is set to in main Apache error log and what it is set to in
VirtualHost, plus any other configuration related to debugging.
in httpd.conf i have:
CustomLog logs/access_log combined
where ServerRoot is "/etc/httpd" and "/etc/httpd/logs" is a symlink
over to /var/log/httpd
This is the VirtualHost config:
<VirtualHost *:80>
ServerName myapp.mydomain.com
Alias /assets/ "/data/vhosts/myapp.mydomain.com/plaid_cor/assets/"
Alias /media/ "/usr/local/lib/python2.6/site-packages/django/contrib/
admin/media/"
Alias /favicon.ico "/data/vhosts/myapp.mydomain.com/plaid_cor/assets/
img/favicon.ico"
<Directory "/data/vhosts/myapp.mydomain.com/plaid_cor/assets">
Order allow,deny
Options Indexes
Allow from all
IndexOptions FancyIndexing
</Directory>
WSGIScriptAlias / "/data/vhosts/myapp.mydomain.com/plaid_cor/
plaid_cor.wsgi"
CustomLog /data/vhosts/myapp.mydomain.com/access_log common
ErrorLog /data/vhosts/myapp.mydomain.com/error_log
</VirtualHost>
I have seen a couple of comments on Django irc logs about seeing the
'exception occurred processing' but no traceback before, but because
the people have never actually come here and asked about it, I have
absolutely no information about it. Thus would appreciate it that you
don't just wander off. Give me the configuration and I will then give
you some tests scripts to run and have you describe the result. This
will help me work out what causes this issue.
yeah, as you point out, one of those is me. This was really blocking
me yesterday, without that traceback, it was impossible to debug. I
won't wander off; just let me know specifics of what you need, and
I'll try to supply.
regards,
michael
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/modwsgi?hl=en.