Bug 193510 - www/py-graphite-web: Stopped working after upgrade to Django 1.7
Summary: www/py-graphite-web: Stopped working after upgrade to Django 1.7
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Steve Wills
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-10 06:49 UTC by Karli Sjöberg
Modified: 2014-10-09 02:32 UTC (History)
2 users (show)

See Also:


Attachments
Broken graph screenshot (5.04 KB, image/png)
2014-09-10 06:59 UTC, Karli Sjöberg
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Karli Sjöberg 2014-09-10 06:49:40 UTC

    
Comment 1 Karli Sjöberg 2014-09-10 06:59:42 UTC
Created attachment 147155 [details]
Broken graph screenshot
Comment 2 Karli Sjöberg 2014-09-10 07:00:16 UTC
First of all, had to change in "/usr/local/etc/graphite/graphite.wsgi":
-import django.core.handlers.wsgi
-application = django.core.handlers.wsgi.WSGIHandler()
+from django.core.wsgi import get_wsgi_application
+application = get_wsgi_application()

For Apache (and mod_wsgi) to start OK. But there seems to be tinkering to be done to graphite as well:
https://github.com/caffeinehit/django-oauth2-provider/issues/77

Tried:
/usr/local/lib/python2.7/site-packages/graphite # for i in $(find . -type f -exec egrep -H 'mimetype="[a-z]+\/[a-z]+"' {} \; | awk -F ':' '{print $1}'); do sed -i '' 's#mimetype="#content_type="#' $i; done

But get only broken graph windows, sample attached. No direct errors in logs, except for:
[Wed Sep 10 08:40:56 2014] [error] No handlers could be found for logger "cache"

# pkg info | awk '/apache|django|graphite-web|wsgi/{print$1}'
ap22-mod_wsgi3-3.5
apache22-2.2.29
py27-django-1.7
py27-django-tagging-0.3.2
py27-graphite-web-0.9.12_1
uwsgi-2.0.7
Comment 3 Tilman Keskinoz freebsd_committer freebsd_triage 2014-09-11 15:35:21 UTC
over to maintainer
Comment 4 Steve Wills freebsd_committer freebsd_triage 2014-09-20 21:18:41 UTC
I think this was fixed in r368157. Could you verify?
Comment 5 Karli Sjöberg 2014-09-22 11:35:57 UTC
Yepp, confirmed. I checked changes in "graphite.wsgi.example" that solved it for me, thanks!

/Karli
Comment 6 Steve Wills freebsd_committer freebsd_triage 2014-10-09 02:32:16 UTC
Thanks!