I have been having issues with Netbox since the introduction of the
VENV.
I attempted an upgrade at first, and my install did not like it. Worked through troubleshooting, then big dumb me eventually deleted our 'configuration.py' file, with no backup. It took me a while to finally get a successful way to back up our database, but once I had that I started from scratch. Fresh install of Ubuntu 18.04, fresh install of (at the time Netbox 2.7.11 following the Netbox install here:
https://netbox.readthedocs.io/en/stable/installation/3-netbox/ ) but during the DJANGO installs I ran into the same issues that Adam Batey did here (
https://groups.google.com/forum/#!topic/netbox-discuss/SGEfbCHDpzc), with errors during the 'building wheels' processes of various parts.
I
get a '502 bad gateway' when I go my netbox URL, and my netbox services fail
# systemctl status netbox*
● netbox-rq.service - NetBox Request Queue Worker
Loaded: loaded (/etc/systemd/system/netbox-rq.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Mon 2020-04-20 13:27:41 UTC; 3s ago
Docs:
https://netbox.readthedocs.io/en/stable/ Process: 132100 ExecStart=/opt/netbox/venv/bin/python3 /opt/netbox/netbox/manage.py rqworker (code=exited, status=1/FAILURE)
Main PID: 132100 (code=exited, status=1/FAILURE)
Apr 20 13:27:41 netbox systemd[1]: netbox-rq.service: Main process exited, code=exited, status=1/FAILURE
Apr 20 13:27:41 netbox systemd[1]: netbox-rq.service: Failed with result 'exit-code'.
● netbox.service - NetBox WSGI Service
Loaded: loaded (/etc/systemd/system/netbox.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Mon 2020-04-20 13:27:26 UTC; 22s ago
Docs:
https://netbox.readthedocs.io/en/stable/
Process: 132071 ExecStart=/opt/netbox/venv/bin/gunicorn --pid
/var/tmp/netbox.pid --pythonpath /opt/netbox/netbox --config
/opt/netbox/gunicorn.py netbox.wsgi (code=exited, status=1/FAILURE)
Main PID: 132071 (code=exited, status=1/FAILURE)
journalctl -eu netbox shows:
Apr 20 13:48:16 netbox gunicorn[134549]: File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
Apr 20 13:48:16 netbox gunicorn[134549]: File "<frozen importlib._bootstrap_external>", line 678, in exec_module
Apr 20 13:48:16 netbox gunicorn[134549]: File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
Apr 20 13:48:16 netbox gunicorn[134549]: File "/opt/netbox/netbox/netbox/wsgi.py", line 7, in <module>
Apr 20 13:48:16 netbox gunicorn[134549]: application = get_wsgi_application()
Apr 20 13:48:16 netbox gunicorn[134549]: File "/opt/netbox/venv/lib/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
Apr 20 13:48:16 netbox gunicorn[134549]: django.setup(set_prefix=False)
Apr 20 13:48:16 netbox gunicorn[134549]: File "/opt/netbox/venv/lib/python3.6/site-packages/django/__init__.py", line 19, in setup
Apr 20 13:48:16 netbox gunicorn[134549]: configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
Apr 20 13:48:16 netbox gunicorn[134549]: File "/opt/netbox/venv/lib/python3.6/site-packages/django/conf/__init__.py", line 79, in __getattr__
Apr 20 13:48:16 netbox gunicorn[134549]: self._setup(name)
Apr 20 13:48:16 netbox gunicorn[134549]: File "/opt/netbox/venv/lib/python3.6/site-packages/django/conf/__init__.py", line 66, in _setup
Apr 20 13:48:16 netbox gunicorn[134549]: self._wrapped = Settings(settings_module)
Apr 20 13:48:16 netbox gunicorn[134549]: File "/opt/netbox/venv/lib/python3.6/site-packages/django/conf/__init__.py", line 157, in __init__
Apr 20 13:48:16 netbox gunicorn[134549]: mod = importlib.import_module(self.SETTINGS_MODULE)
Apr 20 13:48:16 netbox gunicorn[134549]: File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
Apr 20 13:48:16 netbox gunicorn[134549]: return _bootstrap._gcd_import(name[level:], package, level)
Apr 20 13:48:16 netbox gunicorn[134549]: File "<frozen importlib._bootstrap>", line 994, in _gcd_import
Apr 20 13:48:16 netbox gunicorn[134549]: File "<frozen importlib._bootstrap>", line 971, in _find_and_load
Apr 20 13:48:16 netbox gunicorn[134549]: File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
Apr 20 13:48:16 netbox gunicorn[134549]: File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
Apr 20 13:48:16 netbox gunicorn[134549]: File "<frozen importlib._bootstrap_external>", line 678, in exec_module
Apr 20 13:48:16 netbox gunicorn[134549]: File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
Apr 20 13:48:16 netbox gunicorn[134549]: File "/opt/netbox/netbox/netbox/settings.py", line 394, in <module>
Apr 20 13:48:16 netbox gunicorn[134549]: "Required parameter AUTH_LDAP_SERVER_URI is missing from ldap_config.py."
Apr 20 13:48:16 netbox gunicorn[134549]: django.core.exceptions.ImproperlyConfigured: Required parameter AUTH_LDAP_SERVER_URI is missing from ldap_config.py.
Apr 20 13:48:16 netbox gunicorn[134549]: [2020-04-20 13:48:16 +0000] [134571] [INFO] Worker exiting (pid: 134571)
Apr 20 13:48:16 netbox gunicorn[134549]: Traceback (most recent call last):
Apr 20 13:48:16 netbox gunicorn[134549]: File "/opt/netbox/venv/lib/python3.6/site-packages/gunicorn/arbiter.py", line 209, in run
Apr 20 13:48:16 netbox gunicorn[134549]: self.sleep()
Apr 20 13:48:16 netbox gunicorn[134549]: File "/opt/netbox/venv/lib/python3.6/site-packages/gunicorn/arbiter.py", line 357, in sleep
Apr 20 13:48:16 netbox gunicorn[134549]: ready = select.select([self.PIPE[0]], [], [], 1.0)
Apr 20 13:48:16 netbox gunicorn[134549]: File "/opt/netbox/venv/lib/python3.6/site-packages/gunicorn/arbiter.py", line 242, in handle_chld
Apr 20 13:48:16 netbox gunicorn[134549]: self.reap_workers()
Apr 20 13:48:16 netbox gunicorn[134549]: File "/opt/netbox/venv/lib/python3.6/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
Apr 20 13:48:16 netbox gunicorn[134549]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
Apr 20 13:48:16 netbox gunicorn[134549]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
Apr 20 13:48:16 netbox gunicorn[134549]: During handling of the above exception, another exception occurred:
Apr 20 13:48:16 netbox gunicorn[134549]: Traceback (most recent call last):
Apr 20 13:48:16 netbox gunicorn[134549]: File "/opt/netbox/venv/bin/gunicorn", line 11, in <module>
Apr 20 13:48:16 netbox gunicorn[134549]: sys.exit(run())
Apr 20 13:48:16 netbox gunicorn[134549]: File "/opt/netbox/venv/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 58, in run
Apr 20 13:48:16 netbox gunicorn[134549]: WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
Apr 20 13:48:16 netbox gunicorn[134549]: File "/opt/netbox/venv/lib/python3.6/site-packages/gunicorn/app/base.py", line 228, in run
Apr 20 13:48:16 netbox gunicorn[134549]: super().run()
Apr 20 13:48:16 netbox gunicorn[134549]: File "/opt/netbox/venv/lib/python3.6/site-packages/gunicorn/app/base.py", line 72, in run
Apr 20 13:48:16 netbox gunicorn[134549]: Arbiter(self).run()
Apr 20 13:48:16 netbox gunicorn[134549]: File "/opt/netbox/venv/lib/python3.6/site-packages/gunicorn/arbiter.py", line 229, in run
Apr 20 13:48:16 netbox gunicorn[134549]: self.halt(reason=inst.reason, exit_status=inst.exit_status)
Apr 20 13:48:16 netbox gunicorn[134549]: File "/opt/netbox/venv/lib/python3.6/site-packages/gunicorn/arbiter.py", line 342, in halt
Apr 20 13:48:16 netbox gunicorn[134549]: self.stop()
Apr 20 13:48:16 netbox gunicorn[134549]: File "/opt/netbox/venv/lib/python3.6/site-packages/gunicorn/arbiter.py", line 393, in stop
Apr 20 13:48:16 netbox gunicorn[134549]: time.sleep(0.1)
Apr 20 13:48:16 netbox gunicorn[134549]: File "/opt/netbox/venv/lib/python3.6/site-packages/gunicorn/arbiter.py", line 242, in handle_chld
Apr 20 13:48:16 netbox gunicorn[134549]: self.reap_workers()
Apr 20 13:48:16 netbox gunicorn[134549]: File "/opt/netbox/venv/lib/python3.6/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
Apr 20 13:48:16 netbox gunicorn[134549]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
Apr 20 13:48:16 netbox gunicorn[134549]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
Apr 20 13:48:16 netbox systemd[1]: netbox.service: Main process exited, code=exited, status=1/FAILURE
Apr 20 13:48:16 netbox systemd[1]: netbox.service: Failed with result 'exit-code'.
Does this give anyone clues as to what I am missing? What do I need to do to get this back up and running? Then is it safe to import my database?
Thanks,
Dirk