← Back to team overview

graphite-dev team mailing list archive

[Question #280624]: Excetion loading graphite.wsgi

 

New question #280624 on Graphite:
https://answers.launchpad.net/graphite/+question/280624

Hi to all,

I am despairing!

I try to install graphite (0.9.14  due to python version 2.6)in on RHEL 6.7.  I did all necessary step during installation (I believe that I did it). If I start appache or call http://hostname:8080 I'm still getting this error:

AttributeError: 'NoneType' object has no attribute 'find'
 mod_wsgi (pid=2809): Target WSGI script '/opt/graphite/conf/graphite.wsgi' cannot be loaded as Python module.
mod_wsgi (pid=2809): Target WSGI script '/opt/graphite/conf/graphite.wsgi' cannot be loaded as Python module.
mod_wsgi (pid=2809): Exception occurred processing WSGI script '/opt/graphite/conf/graphite.wsgi'.
Traceback (most recent call last):
File "/opt/graphite/conf/graphite.wsgi", line 31, in <module>
 application = DjangoWhiteNoise(application)
File "/usr/lib/python2.6/site-packages/whitenoise/django.py", line 46, in __init__
self.configure_from_settings(settings)
File "/usr/lib/python2.6/site-packages/whitenoise/django.py", line 68, in configure_from_settings
getattr(settings, 'STATIC_URL', ''))
File "/usr/lib/python2.6/site-packages/whitenoise/django.py", line 36, in get_prefix_from_url
return format_prefix(urlparse.urlparse(url).path)
File "/usr/lib64/python2.6/urlparse.py", line 132, in urlparse
tuple = urlsplit(url, scheme, allow_fragments)
File "/usr/lib64/python2.6/urlparse.py", line 171, in urlsplit
i = url.find(':')
AttributeError: 'NoneType' object has no attribute 'find'

I have running test box with RHEL 6.5 and graphite 0.9.13. with an identical configuration.

Any suggestions?

graphite.wsgi:
Listen 8080


<IfModule !wsgi_module.c>
    LoadModule wsgi_module modules/mod_wsgi.so
</IfModule>

# XXX You need to set this up!
# Read http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGISocketPrefix
WSGISocketPrefix run/wsgi

<VirtualHost *:8080>
        ServerName my.server.net
        DocumentRoot "/opt/graphite/webapp"
        ErrorLog /var/log/graphite-web/error.log
        CustomLog /var/log/graphite-web/access.log common

        # I've found that an equal number of processes & threads tends
        # to show the best performance for Graphite (ymmv).
        WSGIDaemonProcess graphite processes=5 threads=5 display-name='%{GROUP}' inactivity-timeout=120
        WSGIProcessGroup graphite
        WSGIApplicationGroup %{GLOBAL}
        WSGIImportScript /opt/graphite/conf/graphite.wsgi process-group=graphite application-group=%{GLOBAL}

        # XXX You will need to create this file! There is a graphite.wsgi.example
        # file in this directory that you can safely use, just copy it to graphite.wgsi
        WSGIScriptAlias / /opt/graphite/conf/graphite.wsgi

        Alias /content/ /opt/graphite/webapp/content/
        <Location "/content/">
                SetHandler None
        </Location>

        # XXX In order for the django admin site media to work you
        # must change @DJANGO_ROOT@ to be the path to your django
        # installation, which is probably something like:
        # /usr/lib/python2.6/site-packages/django
        # Alias /media/ "@DJANGO_ROOT@/contrib/admin/media/"
        Alias /media/ "/usr/lib/python2.6/site-packages/django/contrib/admin/media/"
        <Location "/media/">
                SetHandler None
        </Location>

        # The graphite.wsgi file has to be accessible by apache. It won't
        # be visible to clients because of the DocumentRoot though.
        <Directory /opt/graphite/conf/>
                Order deny,allow
                Allow from all
        </Directory>

</VirtualHost>


Regards
Ralph

-- 
You received this question notification because your team graphite-dev
is an answer contact for Graphite.