0

I'm installing graphite 0.9.15 on Ubuntu Server 16.04 LTS. During configuration step

cd /opt/graphite/webapp/graphite sudo cp local_settings.py.example local_settings.py

Then using the command in the official installation instruction:

sudo PYTHONPATH=/opt/graphite/webapp/ python manage.py migrate --settings=local_settings

Gave information

Operations to perform:
Apply all migrations: (none)
Running migrations:
No migrations to apply.

Then I went to check the graphite.db

sqlite3 graphite.db
SELECT name FROM sqlite_master WHERE type='table';

Only two tables created, django_migrations and sqlite_sequence, no account relevant tables. And inside apache error log, /opt/graphite/storage/log/webapp/error.log, OperationalError: no such talbe: auth_user. It's because of missing those account tables.

Some info: ubuntu 16.04 LTS
python2.7.11
django 1.9.6
django-tagging 0.4.3
whisper, carbon, graphite 0.9.15

Please who know the reason and how to solve this? Thanks a lot!

2 Answers2

0

Actually my issue is that when I run "sudo python manage.py migrate" each time only partial tables are created and several tables name starts with account_, dashboard_, events, always miss.
Finally found the reason, don't use that command I used and which mentioned in official doc. It does not work on Django 1.9 and above. And graphite official document have not been updated for long time ....


What you need is

sudo PYTHONPATH=/opt/graphite/webapp django-admin.py migrate --settings=graphite.settings --run-syncdb

  • You can successfully install graphite on Django 1.9.x, but graphite-web does not work. Because come primary API of django had been changed.... For django 1.8.x and 1.7.x graphite also possibly get issues when running, and it could be cause by some version of mod_wsgi. – Neo.Wangbo Jun 02 '16 at 01:31
  • By my testing, the stable combination should be django 1.6.x latest version, djang-tagging 0.3.x latest version. Now my graphite is working fine. – Neo.Wangbo Jun 02 '16 at 01:34
-1

You have to include graphite in the INSTALLED_APPS in the Django settings.py file.

Fabian Fagerholm
  • 4,099
  • 1
  • 35
  • 45
Rahul Pandey
  • 129
  • 6