graphite-manage syncdb error

Bug #1648828 reported by Fabien COMBERNOUS on 2016-12-09
This bug affects 2 people
Affects Status Importance Assigned to Milestone
graphite-web (Ubuntu)

Bug Description

# on ubuntu 16.04 Graphite Carbon / Graphite Web
  apt-get install graphite-web graphite-carbon

Installed versions are graphite-carbon 0.9.15-1 and graphite-web 0.9.15+debian-1

# Install a database for Django backend
   apt-get install postgresql libpq-dev python-psycopg2

# Create a Database User and a Database
   sudo -u postgres psql

   postgres =# CREATE USER graphite WITH PASSWORD 'mypassword';
   postgres =# CREATE DATABASE graphite WITH OWNER graphite;
   postgres =# \q

# Configure Graphite Web Application
vi /etc/graphite/
      # Change the default secret key ...
      => SECRET_KEY = 'mysecretkey'
      # Change the default Time Zone (set to your time zone)
      => TIME_ZONE = 'Europe/Paris'
      # Remote user authentication
      # Configure the database access
      DATABASES = {
         'default': {
            'NAME': 'graphite',
            'ENGINE': 'django.db.backends.postgresql_psycopg2',
            'USER': 'graphite',
            'PASSWORD': 'mypassword',
            'HOST': '',
            'PORT': '5432'
 Save the file

# Sync the Database
graphite-manage syncdb
Operations to perform:
  Synchronize unmigrated apps: account, cli, render, whitelist, metrics, url_shortener, dashboard, composer, events, browser
  Apply all migrations: admin, contenttypes, tagging, auth, sessions
Synchronizing apps without migrations:
  Creating tables...
    Creating table account_profile
    Creating table account_variable
    Creating table account_view
    Creating table account_window
    Creating table account_mygraph
    Creating table dashboard_dashboard
    Creating table events_event
    Creating table url_shortener_link
    Running deferred SQL...
Traceback (most recent call last):
  File "/usr/bin/graphite-manage", line 15, in <module>
  File "/usr/lib/python2.7/dist-packages/django/core/management/", line 354, in execute_from_command_line
  File "/usr/lib/python2.7/dist-packages/django/core/management/", line 346, in execute
  File "/usr/lib/python2.7/dist-packages/django/core/management/", line 394, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/lib/python2.7/dist-packages/django/core/management/", line 445, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/python2.7/dist-packages/django/core/management/commands/", line 25, in handle
    call_command("migrate", **options)
  File "/usr/lib/python2.7/dist-packages/django/core/management/", line 120, in call_command
    return command.execute(*args, **defaults)
  File "/usr/lib/python2.7/dist-packages/django/core/management/", line 445, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/python2.7/dist-packages/django/core/management/commands/", line 179, in handle
    created_models = self.sync_apps(connection, executor.loader.unmigrated_apps)
  File "/usr/lib/python2.7/dist-packages/django/core/management/commands/", line 318, in sync_apps
  File "/usr/lib/python2.7/dist-packages/django/db/backends/", line 64, in execute
    return self.cursor.execute(sql, params)
  File "/usr/lib/python2.7/dist-packages/django/db/", line 98, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/usr/lib/python2.7/dist-packages/django/db/backends/", line 62, in execute
    return self.cursor.execute(sql)
django.db.utils.ProgrammingError: relation "auth_user" does not exist

Manish Yadav (myadav) wrote :

I am also getting the same error

Viorel Anghel (vang-u) wrote :

run first
    python /usr/lib/python2.7/dist-packages/graphite/ migrate auth
    graphite-manage syncdb

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in graphite-web (Ubuntu):
status: New → Confirmed
ozhan (ozhankaraman) wrote :

@vang-u the supposed workaround does not work on our 16.04.3 environment, bug still exists. Any news for bugfix?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers