Service fails with 203 error #18019
Replies: 3 comments
-
Doing some further investigation, Gunicorn is not in this folder; /opt/netbox/venv/bin But seems to be installed globally. How can I install it here? I did a pip install with the requirements.txt file. |
Beta Was this translation helpful? Give feedback.
-
IIRC, neither gunicorn or uwsgi are configured by default to be part of netbox's current installation; you should add either one to your local_requirements.txt |
Beta Was this translation helpful? Give feedback.
-
Sadly, all of the information given above is wrong :-( @a084ed22: gunicorn is in requirements.txt
Therefore, gunicorn is installed in the virtualenv if you follow the standard installation instructions (i.e. run
(The above is my Netbox 4.1.6). @GurdipS5: If gunicorn isn't there, then you didn't follow the installation instructions properly.
You should not do that. Furthermore, if you didn't have the virtualenv activated at that point, then you will have installed the packages in the wrong place (globally, at system level) which will pollute your system. The installation instructions tell you to run a script called Code 203 from systemd simply means "unable to exec". Either |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have installed Netbox on Ubuntu 22. I try to start the service, but get this error:
netbox.service - NetBox WSGI Service Loaded: loaded (/etc/systemd/system/netbox.service; enabled; vendor preset: enabled) Active: activating (auto-restart) (Result: exit-code) since Fri 2024-11-15 01:10:31 UTC; 20s> Docs: https://docs.netbox.dev/ Process: 3154 ExecStart=/opt/netbox/venv/bin/gunicorn --pid /var/tmp/netbox.pid --pythonpath > Main PID: 3154 (code=exited, status=203/EXEC) CPU: 7ms
My netbox service file is as follows:
[Unit]
Description=NetBox WSGI Service
Documentation=https://docs.netbox.dev/
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=netbox
Group=netbox
PIDFile=/var/tmp/netbox.pid
WorkingDirectory=/opt/netbox
Remove the following line if using uWSGI instead of Gunicorn
ExecStart=/opt/netbox/venv/bin/gunicorn --pid /var/tmp/netbox.pid --pythonpath /opt/netbox/netbox --config /opt/netbox/gunicorn.py netbox.wsgi
Uncomment the following line if using uWSGI instead of Gunicorn
#ExecStart=/opt/netbox/venv/bin/uwsgi --ini /opt/netbox/uwsgi.ini
Restart=on-failure
RestartSec=30
PrivateTmp=true
[Install]
WantedBy=multi-user.target
Am I mising anything?
Beta Was this translation helpful? Give feedback.
All reactions