Install Issue: createsuperuser Fails #87

Closed
opened 2025-12-29 15:32:11 +01:00 by adam · 6 comments
Owner

Originally created by @vcsalex on GitHub (Jun 29, 2016).

Hello,

I am trying to install and run netbox on Ubuntu 16.04. I followed the instructions in "getting-started.md" up to the point where I need to create the first user. Here is the output of running ./manage.py createsuperuser:

/opt/netbox/netbox# ./manage.py createsuperuser
Couldn't import dot_parser, loading of dot files will not be possible.
Traceback (most recent call last):
File "./manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/init.py", line 353, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/init.py", line 345, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 348, in run_from_argv
self.execute(_args, *_cmd_options)
File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/management/commands/createsuperuser.py", line 52, in execute
return super(Command, self).execute(_args, *_options)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 399, in execute
output = self.handle(_args, *_options)
File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/management/commands/createsuperuser.py", line 86, in handle
default_username = get_default_username()
File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/management/init.py", line 189, in get_default_username
auth_app.User._default_manager.get(username=default_username)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/manager.py", line 122, in manager_method
return getattr(self.get_queryset(), name)(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 381, in get
num = len(clone)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 240, in len
self._fetch_all()
File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 1074, in _fetch_all
self._result_cache = list(self.iterator())
File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 52, in iter
results = compiler.execute_sql()
File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 848, in execute_sql
cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/django/db/utils.py", line 95, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: relation "auth_user" does not exist
LINE 1: ...user"."is_active", "auth_user"."date_joined" FROM "auth_user...

Have I incorrectly configured something? Is there an issue using 16.04?

Any assistance would be greatly appreciated.

Originally created by @vcsalex on GitHub (Jun 29, 2016). Hello, I am trying to install and run netbox on Ubuntu 16.04. I followed the instructions in "getting-started.md" up to the point where I need to create the first user. Here is the output of running `./manage.py createsuperuser`: /opt/netbox/netbox# ./manage.py createsuperuser Couldn't import dot_parser, loading of dot files will not be possible. Traceback (most recent call last): File "./manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/usr/local/lib/python2.7/dist-packages/django/core/management/**init**.py", line 353, in execute_from_command_line utility.execute() File "/usr/local/lib/python2.7/dist-packages/django/core/management/**init**.py", line 345, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 348, in run_from_argv self.execute(_args, *_cmd_options) File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/management/commands/createsuperuser.py", line 52, in execute return super(Command, self).execute(_args, *_options) File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 399, in execute output = self.handle(_args, *_options) File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/management/commands/createsuperuser.py", line 86, in handle default_username = get_default_username() File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/management/**init**.py", line 189, in get_default_username auth_app.User._default_manager.get(username=default_username) File "/usr/local/lib/python2.7/dist-packages/django/db/models/manager.py", line 122, in manager_method return getattr(self.get_queryset(), name)(_args, *_kwargs) File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 381, in get num = len(clone) File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 240, in __len__ self._fetch_all() File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 1074, in _fetch_all self._result_cache = list(self.iterator()) File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 52, in __iter__ results = compiler.execute_sql() File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 848, in execute_sql cursor.execute(sql, params) File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 64, in execute return self.cursor.execute(sql, params) File "/usr/local/lib/python2.7/dist-packages/django/db/utils.py", line 95, in **exit** six.reraise(dj_exc_type, dj_exc_value, traceback) File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 64, in execute return self.cursor.execute(sql, params) django.db.utils.ProgrammingError: relation "auth_user" does not exist LINE 1: ...user"."is_active", "auth_user"."date_joined" FROM "auth_user... Have I incorrectly configured something? Is there an issue using 16.04? Any assistance would be greatly appreciated.
adam closed this issue 2025-12-29 15:32:11 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jun 29, 2016):

Looks like your database hasn't been created yet. Did you run

./manage.py migrate

before trying to create the superuser?

@jeremystretch commented on GitHub (Jun 29, 2016): Looks like your database hasn't been created yet. Did you run ``` ./manage.py migrate ``` before trying to create the superuser?
Author
Owner

@vcsalex commented on GitHub (Jun 29, 2016):

Thanks for the quick response. Yes, I ran that just a few minutes ago. I ran it from my user with sudo; however, I noticed that the instructions in "getting-started.md" all use the root prompt. I will try running ./manage.py migrate as root.

@vcsalex commented on GitHub (Jun 29, 2016): Thanks for the quick response. Yes, I ran that just a few minutes ago. I ran it from my user with sudo; however, I noticed that the instructions in "getting-started.md" all use the root prompt. I will try running `./manage.py migrate` as root.
Author
Owner

@vcsalex commented on GitHub (Jun 29, 2016):

Okay, that worked. However, I am still receiving the following error:

Couldn't import dot_parser, loading of dot files will not be possible.

@vcsalex commented on GitHub (Jun 29, 2016): Okay, that worked. However, I am still receiving the following error: > Couldn't import dot_parser, loading of dot files will not be possible.
Author
Owner

@bellwood commented on GitHub (Jun 29, 2016):

@vcsalex those dot_parser warnings are OK to ignore for now unless something has changed @jeremystretch?

EDIT: It's related to graphviz needing to be installed by PIP but not being required as of yet

@bellwood commented on GitHub (Jun 29, 2016): @vcsalex those dot_parser warnings are OK to ignore for now unless something has changed @jeremystretch? EDIT: It's related to graphviz needing to be installed by PIP but not being required as of yet
Author
Owner

@vcsalex commented on GitHub (Jun 29, 2016):

Okay, thank you for your assistance.

@vcsalex commented on GitHub (Jun 29, 2016): Okay, thank you for your assistance.
Author
Owner

@jeremystretch commented on GitHub (Jun 29, 2016):

FYI I've removed the note in the "getting started" doc about graphviz being optional.

@jeremystretch commented on GitHub (Jun 29, 2016): FYI I've removed the note in the "getting started" doc about graphviz being optional.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#87