Onemind-Services-LLC / netbox-metatype-importer

Easy import Device and Module types from GitHub repo
Apache License 2.0
43 stars 7 forks source link

[Bug]: Application labels aren't unique, duplicates: netbox_metatype_importer #13

Closed deku-m closed 1 year ago

deku-m commented 1 year ago

NetBox plugin version

v0.0.4

NetBox version

v3.4.4

Steps to Reproduce

Running on windows / docker desktop. Start the docker container from netbox. Netbox isnt starting and exiting.

2023-02-13 10:20:09 django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: netbox_metatype_importer
2023-02-13 10:20:09 [ Use DB_WAIT_DEBUG=1 in netbox.env to print full traceback for errors here ]
2023-02-13 10:20:09 ⏳ Waiting on DB... (21s / 30s)
2023-02-13 10:20:12 django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: netbox_metatype_importer
2023-02-13 10:20:12 [ Use DB_WAIT_DEBUG=1 in netbox.env to print full traceback for errors here ]
2023-02-13 10:20:12 ⏳ Waiting on DB... (24s / 30s)
2023-02-13 10:20:16 django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: netbox_metatype_importer
2023-02-13 10:20:16 [ Use DB_WAIT_DEBUG=1 in netbox.env to print full traceback for errors here ]
2023-02-13 10:20:16 ⏳ Waiting on DB... (27s / 30s)
2023-02-13 10:20:19 ❌ Waited 30s or more for the DB to become ready.

Expected Behavior

Application netbox starts and provide environment.

Observed Behavior

2023-02-13 10:20:09 django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: netbox_metatype_importer 2023-02-13 10:20:09 [ Use DB_WAIT_DEBUG=1 in netbox.env to print full traceback for errors here ] 2023-02-13 10:20:09 ⏳ Waiting on DB... (21s / 30s) 2023-02-13 10:20:12 django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: netbox_metatype_importer 2023-02-13 10:20:12 [ Use DB_WAIT_DEBUG=1 in netbox.env to print full traceback for errors here ] 2023-02-13 10:20:12 ⏳ Waiting on DB... (24s / 30s) 2023-02-13 10:20:16 django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: netbox_metatype_importer 2023-02-13 10:20:16 [ Use DB_WAIT_DEBUG=1 in netbox.env to print full traceback for errors here ] 2023-02-13 10:20:16 ⏳ Waiting on DB... (27s / 30s) 2023-02-13 10:20:19 ❌ Waited 30s or more for the DB to become ready.

deku-m commented 1 year ago

I dont know how to perform a stack trace on docker container yet. Trying to figure that out sorry

abhi1693 commented 1 year ago

Have you configured the plugin twice in PLUGINS? Because this seems like a user error rather than the plugin itself. If not, can you also share your PLUGINS value?

deku-m commented 1 year ago

Not that i know of. I checked my files: plugins_requirements: netbox-metatype-importer netbox-documents netbox-qrcode netbox-ipcalculator

plugins.py: PLUGINS = [ 'netbox_metatype_importer', 'netbox_documents', 'netbox_qrcode', 'netbox_cisco_support',

PLUGINS_CONFIG = { 'netbox_ipcalculator': {}, 'netbox_metatype_importer': { 'github_token': '' },

I will try to remove the whole docker and re-create it again perhaps some error got into it somehow.

abhi1693 commented 1 year ago

I'll try to reproduce it but without a full stack trace log, it'd be difficult

abhi1693 commented 1 year ago

Can you add DB_WAIT_DEBUG=1 to your docker env and paste the full traceback? I'm unable to reproduce the issue

deku-m commented 1 year ago

Result:

2023-02-14 09:49:39 🧬 loaded config '/etc/netbox/config/plugins.py'
2023-02-14 09:49:39 Traceback (most recent call last):
2023-02-14 09:49:39   File "/opt/netbox/netbox/./manage.py", line 10, in <module>
2023-02-14 09:49:39     execute_from_command_line(sys.argv)
2023-02-14 09:49:39   File "/opt/netbox/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
2023-02-14 09:49:39     utility.execute()
2023-02-14 09:49:39   File "/opt/netbox/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 420, in execute
2023-02-14 09:49:39     django.setup()
2023-02-14 09:49:39   File "/opt/netbox/venv/lib/python3.10/site-packages/django/__init__.py", line 24, in setup
2023-02-14 09:49:39     apps.populate(settings.INSTALLED_APPS)
2023-02-14 09:49:39   File "/opt/netbox/venv/lib/python3.10/site-packages/django/apps/registry.py", line 93, in populate
2023-02-14 09:49:39     raise ImproperlyConfigured(
2023-02-14 09:49:39 django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: netbox_metatype_importer

Looks like i have a global issue with my docker environment. Didnt figure out what it is yet. But doesnt look like issue with plugin indeed