← Back to team overview

graphite-dev team mailing list archive

[Question #274019]: UWSGI+Graphite+Ubuntu issues.

 

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

I am trying to configure uwsgi to manage graphite. 

Graphite was installed via the graphite-web package in ubuntu 14.04 by following this tutorial: 
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-graphite-on-an-ubuntu-14-04-server


Here is my uwsgi config for graphite(I have tried many iterations of this):

[uwsgi]
uid = _graphite
gid = _graphite
logto = /var/log/uwsgi/graphite.log
plugins = python ; have also tried python27
wsgi-file = /usr/share/graphite-web/graphite.wsgi
http-socket = :8080


I get the following error when trying to start the app:
Traceback (most recent call last):
  File "/usr/share/graphite-web/graphite.wsgi", line 13, in <module>
    from graphite.logger import log
ImportError: No module named graphite.logger


Here are the contents of /usr/share/graphite-web/graphite.wsgi:
import os, sys
os.environ['DJANGO_SETTINGS_MODULE'] = 'graphite.settings'

import django.core.handlers.wsgi

application = django.core.handlers.wsgi.WSGIHandler()

# READ THIS
# Initializing the search index can be very expensive, please include
# the WSGIScriptImport directive pointing to this script in your vhost
# config to ensure the index is preloaded before any requests are handed
# to the process.
from graphite.logger import log
log.info("graphite.wsgi - pid %d - reloading search index" % os.getpid())
import graphite.metrics.search


I have tried altering the above file only to surface more errors regarding the django configuration file. Since this was included in the distro packaging, I am assuming that I'm missing something in my uwsgi config file. google has not been very helpful.


Anyone use graphite behind uwsgi? Any tips for debugging further?

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