iDebugAll / nextbox-ui-plugin

Next-Gen Topology Visualization Plugin for NetBox Powered by topoSphere SDK
MIT License
551 stars 64 forks source link

netbox-docker failed to install plugin #128

Closed hhcatv closed 1 year ago

hhcatv commented 1 year ago

Sorry, I am a newcomer and I did not successfully install the plugin according to the documentation. I can't speak English either. The following contents are all machine translation. Please forgive me if there are any mistakes! Reference 1: https://github.com/netbox-community/netbox-docker/wiki/Using-Netbox-Plugins The error prompt is as follows:

redis-cache uses an image, skipping
redis uses an image, skipping
postgres uses an image, skipping
Building netbox
Step 1/5 : FROM netboxcommunity/netbox:latest
latest: Pulling from netboxcommunity/netbox
97518928ae5f: Pull complete
f6e372df6c29: Pull complete
4f4fb700ef54: Pull complete
77f6a7c75562: Pull complete
a2f49570de15: Pull complete
2fc918483baf: Pull complete
11ef614fd58b: Pull complete
855f56ed13a7: Pull complete
4dd0b8eed143: Pull complete
64f924094f6b: Pull complete
ab29079b2f9a: Pull complete
b79c658d36e5: Pull complete
e3979ab56f5e: Pull complete
c5d9072de936: Pull complete
406057f50721: Pull complete
06ae806e7c3a: Pull complete
cf494ceac708: Pull complete
Digest: sha256:3424036884717a0e13fc37ed87e91cef310407be015e630ce0f549dc8da66159
Status: Downloaded newer image for netboxcommunity/netbox:latest
 ---> 5f1cbbbb7ff0
Step 2/5 : COPY ./plugin_requirements.txt /
 ---> ece35fc2e1ab
Step 3/5 : RUN /opt/netbox/venv/bin/pip install  --no-warn-script-location -r /plugin_requirements.txt
 ---> Running in 0323637cb84a
Collecting nextbox_ui_plugin
  Downloading nextbox_ui_plugin-0.11.0.tar.gz (1.1 MB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Building wheels for collected packages: nextbox-ui-plugin
  Building wheel for nextbox-ui-plugin (setup.py): started
  Building wheel for nextbox-ui-plugin (setup.py): finished with status 'done'
  Created wheel for nextbox-ui-plugin: filename=nextbox_ui_plugin-0.11.0-py3-none-any.whl size=1256535 sha256=78a03ca7e2d96ecaa03be849f7ae8a282dfa729e03fc5a883e72fd430c3c3157
  Stored in directory: /root/.cache/pip/wheels/66/1a/7f/1704bbf55c88fa9f41d3428ec3b5278ed68e2f9c3f4249c4b5
Successfully built nextbox-ui-plugin
Installing collected packages: nextbox-ui-plugin
Successfully installed nextbox-ui-plugin-0.11.0
WARNING: You are using pip version 21.3.1; however, version 23.1 is available.
You should consider upgrading via the '/opt/netbox/venv/bin/python3 -m pip install --upgrade pip' command.
Removing intermediate container 0323637cb84a
 ---> 9ecb19a93f9a
Step 4/5 : COPY configuration/configuration.py /etc/netbox/config/configuration.py
 ---> 35c30cc2a87c
Step 5/5 : RUN SECRET_KEY="dummy" /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py collectstatic --no-input
 ---> Running in 3b9fabdbe05e
Traceback (most recent call last):
  File "/opt/netbox/netbox/manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/opt/netbox/venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/opt/netbox/venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 363, in execute
    settings.INSTALLED_APPS
  File "/opt/netbox/venv/lib/python3.9/site-packages/django/conf/__init__.py", line 82, in __getattr__
    self._setup(name)
  File "/opt/netbox/venv/lib/python3.9/site-packages/django/conf/__init__.py", line 69, in _setup
    self._wrapped = Settings(settings_module)
  File "/opt/netbox/venv/lib/python3.9/site-packages/django/conf/__init__.py", line 170, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 855, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/opt/netbox/netbox/netbox/settings.py", line 47, in <module>
    from netbox import configuration
  File "/opt/netbox/netbox/netbox/configuration.py", line 71, in <module>
    _loaded_configurations = read_configurations(
  File "/opt/netbox/netbox/netbox/configuration.py", line 33, in read_configurations
    _import(f"{config_module}.{main_config}", main_config_path, loaded_configurations)
  File "/opt/netbox/netbox/netbox/configuration.py", line 20, in _import
    spec.loader.exec_module(module)
  File "/etc/netbox/config/configuration.py", line 20, in <module>
    def _read_secret(secret_name: str, default: str | None = None) -> str | None:
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
ERROR: Service 'netbox' failed to build : The command '/bin/sh -c SECRET_KEY="dummy" /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py collectstatic --no-input' returned a non-zero code: 1

Reference 2: https://github.com/iDebugAll/nextbox-ui-plugin The error prompt is as follows:

Creating netbox-docker_redis-cache_1 ... done
Creating netbox-docker_postgres_1    ... done
Creating netbox-docker_redis_1       ... done
Creating netbox-docker_netbox_1      ... error

ERROR: for netbox-docker_netbox_1  Cannot start service netbox: unable to find user unit: no matching entries in passwd file

ERROR: for netbox  Cannot start service netbox: unable to find user unit: no matching entries in passwd file
ERROR: Encountered errors while bringing up the project.

Can you tell me the specific installation steps? The more detailed the better, thank you! Because I am too ignorant, I am truly sorry.

hhcatv commented 1 year ago

Step 1/5 : FROM netboxcommunity/netbox:latest The downloaded version seems incorrect Modify to:netboxcommunity/netbox:v3.4-2.5.3 installed successfully