Can you please provide the outputs of the tests I asked you to do so I can 
check for myself and look for anything strange.

Thus the output from ldd (ensuring LD_LIBRARY_PATH is not set), sys.prefix and 
sys.version etc.

Also provide the WSGI directives from Apache configuration file as asked.

Provide the actual detail and you may get a quick answer. If you can't then it 
may take a long time as going on holiday in less than a day from now and 
replies will be very much delayed.

Graham


On 29/07/2013, at 11:28 PM, virgil.balibanu <[email protected]> wrote:

> There is something verry strange here. I print te python version in the 
> django.wsgi file and it;s always python2.7 and I import newrelic and 
> sometimes it works and sometimes it fails:
> [Mon Jul 29 16:24:13 2013] [error] (2, 7, 2, 'final', 0)
> [Mon Jul 29 16:24:13 2013] [error] [client 83.103.170.100] mod_wsgi 
> (pid=24337): Target WSGI script '/home/projects/sbo/django.wsgi' cannot be$
> [Mon Jul 29 16:24:13 2013] [error] [client 83.103.170.100] mod_wsgi 
> (pid=24337): Exception occurred processing WSGI script '/home/projects/sbo$
> [Mon Jul 29 16:24:13 2013] [error] [client 83.103.170.100] Traceback (most 
> recent call last):
> [Mon Jul 29 16:24:13 2013] [error] [client 83.103.170.100]   File 
> "/home/projects/sbo/django.wsgi", line 6, in <module>
> [Mon Jul 29 16:24:13 2013] [error] [client 83.103.170.100]     import newrelic
> [Mon Jul 29 16:24:13 2013] [error] [client 83.103.170.100] ImportError: No 
> module named newrelic
> 
> If I add the next line after the import newrelic it always fails saying it 
> can not import newrelic.
> 
> The version of python mod_wsgi call is good and new relic is installed using 
> pip-2.7 so it is installed for python2.7
> 
> Thanks,
> Virgil
> 
> On Monday, July 29, 2013 11:30:32 AM UTC+3, virgil.balibanu wrote:
> Hi,
> 
> I'm trying to install new relic on my demo server. It runs python+django on 
> mod_wsgi on centos. In my djnago.wsgi file I try to do this:
> 
> import newrelic.agent
> newrelic.agent.initialize('newrelic.ini')
> 
> import os
> import sys
> 
> sys.path.append('/home/projects')
> sys.path.append('/home/projects/sbo')
> 
> os.environ['DJANGO_SETTINGS_MODULE'] = 'sbo.settings'
> 
> import django.core.handlers.wsgi
> application = django.core.handlers.wsgi.WSGIHandler()
> 
> But it keep failing. Internal server error. It fails even if a leave only the 
> import. But newrelic is installed and in python2.7 which I use I can use the 
> import.
> 
> Any ideea why it might fail?
> 
> Thanks,
> Virgil Balibanu
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/modwsgi.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to