Anecdotes from a Linux Systems Administrator. /root

Home About Books Blog Portfolio Archive
12 September 2015

Setting up Graphite on CentOS 6.x gotcha

by Alpha01

I installed graphite-web via the EPEL repo, and I was getting an 500 error when accessing the Graphite web interface.


[Sat Sep 12 00:56:27 2015] [error] [client] mod_wsgi (pid=17318): Exception occurred processing WSGI script '/usr/share/graphite/graphite-web.wsgi'.
[Sat Sep 12 00:56:27 2015] [error] [client]   File "/usr/lib/python2.6/site-packages/django/db/backends/sqlite3/", line 344, in execute
[Sat Sep 12 00:56:27 2015] [error] [client]     return Database.Cursor.execute(self, query, params)
[Sat Sep 12 00:56:27 2015] [error] [client] DatabaseError: attempt to write a readonly database


It turns out the sqlite3 database file Graphite write’s too, was owned by root. So it was simply a matter of updating the ownership to what ever user Apache is running under, in my case it’s apache.

chown -R apache.apache /var/lib/graphite-web/
Tags: [ centos monitoring ]