graphite-manage syncdb error

Bug #1648828 reported by Fabien COMBERNOUS
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
graphite-web (Ubuntu)
Confirmed
Undecided
Unassigned

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/local_settings.py
```
      # 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
      => USE_REMOTE_USER_AUTHENTICATION = True
      # Configure the database access
      DATABASES = {
         'default': {
            'NAME': 'graphite',
            'ENGINE': 'django.db.backends.postgresql_psycopg2',
            'USER': 'graphite',
            'PASSWORD': 'mypassword',
            'HOST': '127.0.0.1',
            '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>
    execute_from_command_line(sys.argv)
  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 346, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 394, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 445, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/python2.7/dist-packages/django/core/management/commands/syncdb.py", line 25, in handle
    call_command("migrate", **options)
  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 120, in call_command
    return command.execute(*args, **defaults)
  File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 445, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/python2.7/dist-packages/django/core/management/commands/migrate.py", 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/migrate.py", line 318, in sync_apps
    cursor.execute(statement)
  File "/usr/lib/python2.7/dist-packages/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "/usr/lib/python2.7/dist-packages/django/db/utils.py", line 98, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/usr/lib/python2.7/dist-packages/django/db/backends/utils.py", line 62, in execute
    return self.cursor.execute(sql)
django.db.utils.ProgrammingError: relation "auth_user" does not exist
```

Revision history for this message
Manish Yadav (myadav) wrote :

I am also getting the same error

Revision history for this message
Viorel Anghel (vang-u) wrote :

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

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in graphite-web (Ubuntu):
status: New → Confirmed
Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.