Git Product home page Git Product logo

Comments (5)

martydingo avatar martydingo commented on June 29, 2024 1

Thanks very much, that's sorted it.

from netbox-virtual-circuit-plugin.

marcoceppi avatar marcoceppi commented on June 29, 2024

Thanks for the issue. This is still a pretty early version of the plugin I'll see if @hoanhan101 can help get you sorted

from netbox-virtual-circuit-plugin.

hoanhan101 avatar hoanhan101 commented on June 29, 2024

@martydingo Thanks for the issue. Happy to assist this. Is it possible for you to provide some more information so that I can replicate your issue myself?

Which operation system were you using, Netbox version as well as the plugin version?
Were you using Docker?

After installing the latest version of the plugin via pip

pip install netbox-virtual-circuit-plugin

did you update the configuration.py like so?

PLUGINS = ['netbox_virtual_circuit_plugin'] # Note that the name here use underscore, not hyphen.

If after adding netbox_virtual_circuit_plugin to local_requirements.txt and running /opt/netbox/upgrade.sh did not work, can you try applying the migration directly like so

python3 /opt/netbox/netbox/manage.py migrate
python3 /opt/netbox/netbox/manage.py collectstatic --no-input

then restart netbox?

Let me know if this works.

from netbox-virtual-circuit-plugin.

martydingo avatar martydingo commented on June 29, 2024

I'm using Netbox 2.8.4 with netbox-virtual-circuit-plugin 0.1.2. It's not dockerized, it's a standard install on a VM running Debian 10, the only thing different then from the tutorial is the location (I like to put applications that serve content in /srv, whereas Netbox references /opt as default)

I'm using the Git method from the master repo of Netbox.

I've updated the configuration as such, and the error stops Netbox from loading whenever enabled in the configuration.py file as you've listed, which is no different then from what I'm attempting.

Configuration is like so.

PLUGINS = [
  'netbox_topology_views',
  'netbox-virtual-circuit-plugin',
]

So, my flow would be,

  1. source /srv/netbox/venv/bin/activate

  2. pip install netbox-virtual-circuit-plugin (whereis pip results in pip: /srv/netbox/venv/bin/pip /srv/netbox/venv/bin/pip3.7). In this case I've already installed it. (Requirement already satisfied: netbox-virtual-circuit-plugin in ./venv/lib/python3.7/site-packages (0.1.2))

  3. /srv/netbox/upgrade.sh -- With the entry in configuration.py, it fails with the error (LookupError: No installed app with label 'netbox-virtual-circuit-plugin'.), otherwise this runs successfully with the netbox-virtual-circuit-plugin commented.

  4. If I run the manage.py migrate command (python3 /srv/netbox/netbox/manage.py migrate) with the correct entry in configuration.py, it results in the same error above.
    LookupError: No installed app with label 'netbox-virtual-circuit-plugin'.
    This error does not appear with the netbox-virtual-circuit-plugin commented.

Now, if I install the plugin (So via PIP, and then an entry in configuration.py, no other configuration needed since we're not needing to configure the plugin further), and then restart the netbox service, I get the following.

May 17 11:43:39 ipam gunicorn[2019]:   File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
May 17 11:43:39 ipam gunicorn[2019]:   File "<frozen importlib._bootstrap>", line 983, in _find_and_load
May 17 11:43:39 ipam gunicorn[2019]:   File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
May 17 11:43:39 ipam gunicorn[2019]:   File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
May 17 11:43:39 ipam gunicorn[2019]:   File "<frozen importlib._bootstrap_external>", line 728, in exec_module
May 17 11:43:39 ipam gunicorn[2019]:   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
May 17 11:43:39 ipam gunicorn[2019]:   File "/srv/netbox/netbox/netbox/wsgi.py", line 7, in <module>
May 17 11:43:39 ipam gunicorn[2019]:     application = get_wsgi_application()
May 17 11:43:39 ipam gunicorn[2019]:   File "/srv/netbox/venv/lib/python3.7/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
May 17 11:43:39 ipam gunicorn[2019]:     django.setup(set_prefix=False)
May 17 11:43:39 ipam gunicorn[2019]:   File "/srv/netbox/venv/lib/python3.7/site-packages/django/__init__.py", line 19, in setup
May 17 11:43:39 ipam gunicorn[2019]:     configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
May 17 11:43:39 ipam gunicorn[2019]:   File "/srv/netbox/venv/lib/python3.7/site-packages/django/conf/__init__.py", line 76, in __getattr__
May 17 11:43:39 ipam gunicorn[2019]:     self._setup(name)
May 17 11:43:39 ipam gunicorn[2019]:   File "/srv/netbox/venv/lib/python3.7/site-packages/django/conf/__init__.py", line 63, in _setup
May 17 11:43:39 ipam gunicorn[2019]:     self._wrapped = Settings(settings_module)
May 17 11:43:39 ipam gunicorn[2019]:   File "/srv/netbox/venv/lib/python3.7/site-packages/django/conf/__init__.py", line 142, in __init__
May 17 11:43:39 ipam gunicorn[2019]:     mod = importlib.import_module(self.SETTINGS_MODULE)
May 17 11:43:39 ipam gunicorn[2019]:   File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
May 17 11:43:39 ipam gunicorn[2019]:     return _bootstrap._gcd_import(name[level:], package, level)
May 17 11:43:39 ipam gunicorn[2019]:   File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
May 17 11:43:39 ipam gunicorn[2019]:   File "<frozen importlib._bootstrap>", line 983, in _find_and_load
May 17 11:43:39 ipam gunicorn[2019]:   File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
May 17 11:43:39 ipam gunicorn[2019]:   File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
May 17 11:43:39 ipam gunicorn[2019]:   File "<frozen importlib._bootstrap_external>", line 728, in exec_module
May 17 11:43:39 ipam gunicorn[2019]:   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
May 17 11:43:39 ipam gunicorn[2019]:   File "/srv/netbox/netbox/netbox/settings.py", line 666, in <module>
May 17 11:43:39 ipam gunicorn[2019]:     "and point to the PluginConfig subclass.".format(plugin_name)
May 17 11:43:39 ipam gunicorn[2019]: django.core.exceptions.ImproperlyConfigured: Plugin netbox-virtual-circuit-plugin does not provide a 'config' variable. This should be defined in the plugin's __init__.py file and point to the PluginConfig
May 17 11:43:39 ipam gunicorn[2019]: [2020-05-17 10:43:39 +0000] [2023] [INFO] Worker exiting (pid: 2023)
May 17 11:43:39 ipam gunicorn[2019]: Traceback (most recent call last):
May 17 11:43:39 ipam gunicorn[2019]:   File "/srv/netbox/venv/lib/python3.7/site-packages/gunicorn/arbiter.py", line 202, in run
May 17 11:43:39 ipam gunicorn[2019]:     self.manage_workers()
May 17 11:43:39 ipam gunicorn[2019]:   File "/srv/netbox/venv/lib/python3.7/site-packages/gunicorn/arbiter.py", line 545, in manage_workers
May 17 11:43:39 ipam gunicorn[2019]:     self.spawn_workers()
May 17 11:43:39 ipam gunicorn[2019]:   File "/srv/netbox/venv/lib/python3.7/site-packages/gunicorn/arbiter.py", line 617, in spawn_workers
May 17 11:43:39 ipam gunicorn[2019]:     time.sleep(0.1 * random.random())
May 17 11:43:39 ipam gunicorn[2019]:   File "/srv/netbox/venv/lib/python3.7/site-packages/gunicorn/arbiter.py", line 242, in handle_chld
May 17 11:43:39 ipam gunicorn[2019]:     self.reap_workers()
May 17 11:43:39 ipam gunicorn[2019]:   File "/srv/netbox/venv/lib/python3.7/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
May 17 11:43:39 ipam gunicorn[2019]:     raise HaltServer(reason, self.WORKER_BOOT_ERROR)
May 17 11:43:39 ipam gunicorn[2019]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
May 17 11:43:39 ipam gunicorn[2019]: During handling of the above exception, another exception occurred:
May 17 11:43:39 ipam gunicorn[2019]: Traceback (most recent call last):
May 17 11:43:39 ipam gunicorn[2019]:   File "/srv/netbox/venv/bin/gunicorn", line 10, in <module>
May 17 11:43:39 ipam gunicorn[2019]:     sys.exit(run())
May 17 11:43:39 ipam gunicorn[2019]:   File "/srv/netbox/venv/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 58, in run
May 17 11:43:39 ipam gunicorn[2019]:     WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
May 17 11:43:39 ipam gunicorn[2019]:   File "/srv/netbox/venv/lib/python3.7/site-packages/gunicorn/app/base.py", line 228, in run
May 17 11:43:39 ipam gunicorn[2019]:     super().run()
May 17 11:43:39 ipam gunicorn[2019]:   File "/srv/netbox/venv/lib/python3.7/site-packages/gunicorn/app/base.py", line 72, in run
May 17 11:43:39 ipam gunicorn[2019]:     Arbiter(self).run()
May 17 11:43:39 ipam gunicorn[2019]:   File "/srv/netbox/venv/lib/python3.7/site-packages/gunicorn/arbiter.py", line 229, in run
May 17 11:43:39 ipam gunicorn[2019]:     self.halt(reason=inst.reason, exit_status=inst.exit_status)
May 17 11:43:39 ipam gunicorn[2019]:   File "/srv/netbox/venv/lib/python3.7/site-packages/gunicorn/arbiter.py", line 342, in halt
May 17 11:43:39 ipam gunicorn[2019]:     self.stop()
May 17 11:43:39 ipam gunicorn[2019]:   File "/srv/netbox/venv/lib/python3.7/site-packages/gunicorn/arbiter.py", line 393, in stop
May 17 11:43:39 ipam gunicorn[2019]:     time.sleep(0.1)
May 17 11:43:39 ipam gunicorn[2019]:   File "/srv/netbox/venv/lib/python3.7/site-packages/gunicorn/arbiter.py", line 242, in handle_chld
May 17 11:43:39 ipam gunicorn[2019]:     self.reap_workers()
May 17 11:43:39 ipam gunicorn[2019]:   File "/srv/netbox/venv/lib/python3.7/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
May 17 11:43:39 ipam gunicorn[2019]:     raise HaltServer(reason, self.WORKER_BOOT_ERROR)
May 17 11:43:39 ipam gunicorn[2019]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
May 17 11:43:39 ipam systemd[1]: netbox.service: Main process exited, code=exited, status=1/FAILURE

from netbox-virtual-circuit-plugin.

hoanhan101 avatar hoanhan101 commented on June 29, 2024

As I mentioned above, your configuration.py should like like this instead:

PLUGINS = ['netbox_virtual_circuit_plugin'] # Note that the name here use underscore, not hyphen.

If you take a look at other plugins, you”ll see the same naming pattern as they use underscores for their Django app that is to be included in the configuration file, and hyphen for their package name that is to be published on pypi.

Let me know if that fixes it.

from netbox-virtual-circuit-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.