dropbox / nsot

Network Source of Truth is an open source IPAM and network inventory database
https://nsot.readthedocs.io
Other
399 stars 66 forks source link

nsot Demo failing to run #268

Open srthorat opened 7 years ago

srthorat commented 7 years ago
./run_demo.sh
Database not found; creating database...
Traceback (most recent call last):
  File "/usr/local/bin/nsot-server", line 11, in <module>
    load_entry_point('nsot==1.1.3', 'console_scripts', 'nsot-server')()
  File "/usr/local/lib/python2.7/dist-packages/nsot-1.1.3-py2.7.egg/nsot/util/core.py", line 302, in main
    initializer=initialize_app,
  File "/usr/local/lib/python2.7/dist-packages/logan/runner.py", line 193, in run_app
    management.execute_from_command_line([runner_name, command] + command_args)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 341, in execute
    django.setup()
  File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 27, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 108, in populate
    app_config.import_models(all_models)
  File "/usr/local/lib/python2.7/dist-packages/django/apps/config.py", line 199, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/usr/local/lib/python2.7/dist-packages/nsot-1.1.3-py2.7.egg/nsot/models.py", line 21, in <module>
    from . import fields
  File "/usr/local/lib/python2.7/dist-packages/nsot-1.1.3-py2.7.egg/nsot/fields.py", line 45, in <module>
    class BinaryIPAddressField(models.Field):
  File "/usr/local/lib/python2.7/dist-packages/nsot-1.1.3-py2.7.egg/nsot/fields.py", line 47, in BinaryIPAddressField
    __metaclass__ = models.SubfieldBase
AttributeError: 'module' object has no attribute 'SubfieldBase'

Loading demo data fixtures...
Traceback (most recent call last):
  File "/usr/local/bin/nsot-server", line 11, in <module>
    load_entry_point('nsot==1.1.3', 'console_scripts', 'nsot-server')()
  File "/usr/local/lib/python2.7/dist-packages/nsot-1.1.3-py2.7.egg/nsot/util/core.py", line 302, in main
    initializer=initialize_app,
  File "/usr/local/lib/python2.7/dist-packages/logan/runner.py", line 193, in run_app
    management.execute_from_command_line([runner_name, command] + command_args)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 341, in execute
    django.setup()
  File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 27, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 108, in populate
    app_config.import_models(all_models)
  File "/usr/local/lib/python2.7/dist-packages/django/apps/config.py", line 199, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/usr/local/lib/python2.7/dist-packages/nsot-1.1.3-py2.7.egg/nsot/models.py", line 21, in <module>
    from . import fields
  File "/usr/local/lib/python2.7/dist-packages/nsot-1.1.3-py2.7.egg/nsot/fields.py", line 45, in <module>
    class BinaryIPAddressField(models.Field):
  File "/usr/local/lib/python2.7/dist-packages/nsot-1.1.3-py2.7.egg/nsot/fields.py", line 47, in BinaryIPAddressField
    __metaclass__ = models.SubfieldBase
AttributeError: 'module' object has no attribute 'SubfieldBase'
Starting web service...
Traceback (most recent call last):
  File "/usr/local/bin/nsot-server", line 11, in <module>
    load_entry_point('nsot==1.1.3', 'console_scripts', 'nsot-server')()
  File "/usr/local/lib/python2.7/dist-packages/nsot-1.1.3-py2.7.egg/nsot/util/core.py", line 302, in main
    initializer=initialize_app,
  File "/usr/local/lib/python2.7/dist-packages/logan/runner.py", line 193, in run_app
    management.execute_from_command_line([runner_name, command] + command_args)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 341, in execute
    django.setup()
  File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 27, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 108, in populate
    app_config.import_models(all_models)
  File "/usr/local/lib/python2.7/dist-packages/django/apps/config.py", line 199, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/usr/local/lib/python2.7/dist-packages/nsot-1.1.3-py2.7.egg/nsot/models.py", line 21, in <module>
    from . import fields
  File "/usr/local/lib/python2.7/dist-packages/nsot-1.1.3-py2.7.egg/nsot/fields.py", line 45, in <module>
    class BinaryIPAddressField(models.Field):
  File "/usr/local/lib/python2.7/dist-packages/nsot-1.1.3-py2.7.egg/nsot/fields.py", line 47, in BinaryIPAddressField
    __metaclass__ = models.SubfieldBase
AttributeError: 'module' object has no attribute 'SubfieldBase'
jathanism commented 7 years ago

Whoa that looks un-fun. Let me see if I can reproduce this! Thanks for reporting!

jathanism commented 7 years ago

There's definitely a problem with the demo because we forgot to update it in the last couple of releases. The error you're seeing, however, is not one I can reproduce.

Can you please tell me what version of Python you're using?

srthorat commented 7 years ago

2.7

meanwhile i will try to reinstall again, note down the steps and let u know.

Best Regards, Sakharam Thorat.


From: Jathan McCollum notifications@github.com Sent: Tuesday, February 28, 2017 12:51:19 AM To: dropbox/nsot Cc: Sakharam Thorat; Author Subject: Re: [dropbox/nsot] nsot Demo failing to run (#268)

There's definitely a problem with the demo because we forgot to update it in the last couple of releases. The error you're seeing, however, is not one I can reproduce.

Can you please tell me what version of Python you're using?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/dropbox/nsot/issues/268#issuecomment-282822482, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGE031W2TZRPrTseJ57gZd66H4HD26Ugks5rgyIvgaJpZM4MM9cb.

bleishangthem commented 7 years ago

Demo is not working. After creating user/password and login, there is no info for any sites or devices. Here are the logs.

vagrant@nsot-dev:~/nsot/demo$ ./run_demo.sh Database not found; creating database... Operations to perform: Synchronize unmigrated apps: django_filters, staticfiles, messages, smart_selects, rest_framework_swagger, django_extensions, rest_framework, custom_user Apply all migrations: admin, contenttypes, nsot, auth, sessions Synchronizing apps without migrations: Creating tables... Running deferred SQL... Installing custom SQL... Running migrations: Rendering model states... DONE Applying contenttypes.0001_initial... OK Applying contenttypes.0002_remove_content_type_name... OK Applying auth.0001_initial... OK Applying auth.0002_alter_permission_name_max_length... OK Applying auth.0003_alter_user_email_max_length... OK Applying auth.0004_alter_user_username_opts... OK Applying auth.0005_alter_user_last_login_null... OK Applying auth.0006_require_contenttypes_0002... OK Applying nsot.0001_initial... OK Applying admin.0001_initial... OK Applying nsot.0002_auto_20150810_1718... OK Applying nsot.0003_auto_20150810_1751... OK Applying nsot.0004_auto_20150810_1806... OK Applying nsot.0005_auto_20150810_1847... OK Applying nsot.0006_auto_20150810_1947... OK Applying nsot.0007_auto_20150811_1201... OK Applying nsot.0008_auto_20150811_1222... OK Applying nsot.0009_auto_20150811_1245... OK Applying nsot.0010_auto_20150921_2120... OK Applying nsot.0011_auto_20150930_1557... OK Applying nsot.0012_auto_20151002_1427... OK Applying nsot.0013_auto_20151002_1443... OK Applying nsot.0014_auto_20151002_1653... OK Applying nsot.0015_move_attribute_fields... OK Applying nsot.0016_move_device_data... OK Applying nsot.0017_move_network_data... OK Applying nsot.0018_move_interface_data... OK Applying nsot.0019_move_assignment_data... OK Applying nsot.0020_move_value_data... OK Applying nsot.0021_remove_resource_object... OK Applying nsot.0022_auto_20151007_1847... OK Applying nsot.0023_auto_20151008_1351... OK Applying nsot.0024_network_state... OK Applying nsot.0025_value_site... OK Applying nsot.0026_model_field_verbose_names... OK Applying nsot.0027_interface_device_hostname... OK Applying nsot.0028_populate_interface_device_hostname... OK Applying nsot.0029_auto__add_circuit... OK Applying nsot.0030_add_circuit_name_slug... OK Applying nsot.0031_populate_circuit_name_slug... OK Applying sessions.0001_initial... OK

Loading demo data fixtures... Traceback (most recent call last): File "/usr/local/bin/nsot-server", line 11, in load_entry_point('nsot==1.1.3', 'console_scripts', 'nsot-server')() File "/usr/local/lib/python2.7/dist-packages/nsot/util/core.py", line 302, in main initializer=initialize_app, File "/usr/local/lib/python2.7/dist-packages/logan/runner.py", line 193, in run_app management.execute_from_command_line([runner_name, command] + command_args) File "/usr/local/lib/python2.7/dist-packages/django/core/management/init.py", line 354, in execute_from_command_line utility.execute() File "/usr/local/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/local/lib/python2.7/dist-packages/django/core/management/base.py", line 394, in run_from_argv self.execute(*args, *cmd_options) File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 445, in execute output = self.handle(args, **options) File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/loaddata.py", line 60, in handle self.loaddata(fixture_labels) File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/loaddata.py", line 100, in loaddata self.load_label(fixture_label) File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/loaddata.py", line 157, in load_label obj.save(using=self.using) File "/usr/local/lib/python2.7/dist-packages/django/core/serializers/base.py", line 173, in save models.Model.save_base(self.object, using=using, raw=True) File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 762, in save_base updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields) File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 827, in _save_table forced_update) File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 877, in _do_update return filtered._update(values) > 0 File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 580, in _update return query.get_compiler(self.db).execute_sql(CURSOR) File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 1062, in execute_sql cursor = super(SQLUpdateCompiler, self).execute_sql(result_type) File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 840, 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 98, 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) File "/usr/local/lib/python2.7/dist-packages/django/db/backends/sqlite3/base.py", line 318, in execute return Database.Cursor.execute(self, query, params) django.db.utils.IntegrityError: Problem installing fixture '/home/vagrant/nsot/demo/demo_fixtures.json.gz': Could not load contenttypes.ContentType(pk=11): columns app_label, model are not unique Starting web service... Performing upgrade before service startup...

You have installed Django's auth system, and don't have any superusers defined. Would you like to create one now? (yes/no):