[Pkg-graphite-maint] Bug#800448: graphite-web: Error "object has no attribute 'raw_post_data'" when posting new events
Jonathan Ballet
jon at multani.info
Tue Sep 29 13:40:18 UTC 2015
Package: graphite-web
Version: 0.9.12+debian-6
Severity: normal
Tags: upstream
Dear Maintainer,
When trying to post events to the events API, I have the following error:
==============================
$ curl -X POST http://graphite.lan/events/ -d '{"what": "Event", "tags": "test", "data": "test"}'
* Hostname was NOT found in DNS cache
* Trying 192.168.101.229...
* Connected to graphite.lan (192.168.101.229) port 80 (#0)
> POST /events/ HTTP/1.1
> User-Agent: curl/7.38.0
> Host: graphite.lan
> Accept: */*
> Content-Length: 119
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 119 out of 119 bytes
< HTTP/1.1 500 INTERNAL SERVER ERROR
< Date: Tue, 29 Sep 2015 13:35:13 GMT
* Server Apache/2.4.10 (Debian) is not blacklisted
< Server: Apache/2.4.10 (Debian)
< Vary: Accept-Encoding
< Connection: close
< Transfer-Encoding: chunked
< Content-Type: text/html; charset=utf-8
<
<body style="background-color: #666666; color: black;">
<center>
<h2 style='font-family: "Arial"'>
<p>Graphite encountered an unexpected error while handling your request.</p>
<p>Please contact your site administrator if the problem persists.</p>
</h2>
<br/>
<div style="width: 50%; text-align: center; font-family: monospace; background-color: black; font-weight: bold; color: #ff4422;">
</div>
<div style="width: 70%; text-align: left; background-color: black; color: #44ff22; border: thin solid gray;">
<pre>
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 111, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python2.7/dist-packages/graphite/events/views.py", line 33, in view_events
return post_event(request)
File "/usr/lib/python2.7/dist-packages/graphite/events/views.py", line 45, in post_event
event = json.loads(request.raw_post_data)
AttributeError: 'WSGIRequest' object has no attribute 'raw_post_data'
</pre>
</div>
</center>
==============================
Nothing gets logged as far as I know. This renders the events API unusable on Jessie.
Upstreams had an issue for this: https://github.com/graphite-project/graphite-web/issues/1216
Would it be possible to have a patch for this so we can use this API on stable?
Thanks,
Jonathan
-- System Information:
Debian Release: 8.2
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=fr_CH.UTF-8, LC_CTYPE=fr_CH.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages graphite-web depends on:
ii adduser 3.113+nmu3
ii libjs-jquery 1.7.2+dfsg-3.2
ii libjs-jquery-flot 0.8.2+dfsg-1
ii libjs-prototype 1.7.1-3
ii libjs-scriptaculous 1.9.0-2
ii python 2.7.9-1
ii python-cairo 1.8.8-1+b2
ii python-django 1.7.7-1+deb8u2
ii python-django-tagging 1:0.3.1-4
ii python-pyparsing 2.0.3+dfsg1-1
ii python-simplejson 3.6.5-1
ii python-tz 2012c+dfsg-0.1
ii python-whisper 0.9.12-1
graphite-web recommends no packages.
Versions of packages graphite-web suggests:
ii graphite-carbon 0.9.12-3
ii libapache2-mod-wsgi 4.3.0-1
pn python-ldap <none>
pn python-memcache <none>
ii python-mysqldb 1.2.3-2.1
-- Configuration Files:
/etc/graphite/local_settings.py changed [not included]
-- no debconf information
More information about the Pkg-graphite-maint
mailing list