Netbox service is down until I ran the gunicorn manually #4101

Closed
opened 2025-12-29 18:33:08 +01:00 by adam · 1 comment
Owner

Originally created by @nanisyako on GitHub (Sep 13, 2020).

Environment

  • Python version: venv 3.6 in Centos
  • NetBox version: 2.9.3

Steps to Reproduce

sudo systemctl start netbox
  1. it throws 502 bad GW until I ran the exec command manually

Expected Behavior

Observed Behavior

netbox.service - NetBox WSGI Service
   Loaded: loaded (/etc/systemd/system/netbox.service; enabled; vendor preset: disabled)
   Active: activating (auto-restart) (Result: exit-code) since Sun 2020-09-13 01:51:56 PDT; 9s ago
     Docs: https://netbox.readthedocs.io/en/stable/
  Process: 2947 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=255)
 Main PID: 2947 (code=exited, status=255)

but If I ran

sudo /opt/netbox/venv/bin/gunicorn --pid /var/tmp/netbox.pid --pythonpath /opt/netbox/netbox --config /opt/netbox/gunicorn.py netbox.wsgi

I can see expected behavior

● netbox.service - NetBox WSGI Service
   Loaded: loaded (/etc/systemd/system/netbox.service; enabled; vendor preset: disabled)
   Active: active (running) since Sun 2020-09-13 01:52:57 PDT; 36s ago
     Docs: https://netbox.readthedocs.io/en/stable/
 Main PID: 2994 (gunicorn)
   CGroup: /system.slice/netbox.service
           ‣ 2994 /opt/netbox/venv/bin/python3 /opt/netbox/venv/bin/gunicorn --pid /var/tmp/netbox.pid --pythonpath /opt/netbox/netbox --config /opt/netbox/gunicorn.py netbox.wsgi

Sep 13 01:52:58 uls-np-netbox01.wdc.com gunicorn[3013]: [2020-09-13 01:52:58 -0700] [3013] [ERROR] Connection in use: ('127.0.0.1', 8001)
Sep 13 01:52:58 uls-np-netbox01.wdc.com gunicorn[3013]: [2020-09-13 01:52:58 -0700] [3013] [ERROR] Retrying in 1 second.
Sep 13 01:52:59 uls-np-netbox01.wdc.com gunicorn[3013]: [2020-09-13 01:52:59 -0700] [3013] [ERROR] Connection in use: ('127.0.0.1', 8001)
Sep 13 01:52:59 uls-np-netbox01.wdc.com gunicorn[3013]: [2020-09-13 01:52:59 -0700] [3013] [ERROR] Retrying in 1 second.
Sep 13 01:53:00 uls-np-netbox01.wdc.com gunicorn[3013]: [2020-09-13 01:53:00 -0700] [3013] [ERROR] Connection in use: ('127.0.0.1', 8001)
Sep 13 01:53:00 uls-np-netbox01.wdc.com gunicorn[3013]: [2020-09-13 01:53:00 -0700] [3013] [ERROR] Retrying in 1 second.
Sep 13 01:53:01 uls-np-netbox01.wdc.com gunicorn[3013]: [2020-09-13 01:53:01 -0700] [3013] [ERROR] Connection in use: ('127.0.0.1', 8001)
Sep 13 01:53:01 uls-np-netbox01.wdc.com gunicorn[3013]: [2020-09-13 01:53:01 -0700] [3013] [ERROR] Retrying in 1 second.
Sep 13 01:53:02 uls-np-netbox01.wdc.com gunicorn[3013]: [2020-09-13 01:53:02 -0700] [3013] [ERROR] Can't connect to ('127.0.0.1', 8001)
Sep 13 01:53:02 uls-np-netbox01.wdc.com systemd[1]: netbox.service: Supervising process 2994 which is not our child. We'll most likely not notice when it exits.
Originally created by @nanisyako on GitHub (Sep 13, 2020). <!-- NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED. This form is only for reproducible bugs. If you need assistance with NetBox installation, or if you have a general question, DO NOT open an issue. Instead, post to our mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report, and that any plugins have been disabled. --> ### Environment * Python version: venv 3.6 in Centos * NetBox version: 2.9.3 <!-- Describe in detail the exact steps that someone else can take to reproduce this bug using the current stable release of NetBox. Begin with the creation of any necessary database objects and call out every operation being performed explicitly. If reporting a bug in the REST API, be sure to reconstruct the raw HTTP request(s) being made: Don't rely on a client library such as pynetbox. --> ### Steps to Reproduce 1. ``` sudo systemctl start netbox ``` 2. it throws 502 bad GW until I ran the exec command manually 3. <!-- What did you expect to happen? --> ### Expected Behavior <!-- What happened instead? --> ### Observed Behavior ``` netbox.service - NetBox WSGI Service Loaded: loaded (/etc/systemd/system/netbox.service; enabled; vendor preset: disabled) Active: activating (auto-restart) (Result: exit-code) since Sun 2020-09-13 01:51:56 PDT; 9s ago Docs: https://netbox.readthedocs.io/en/stable/ Process: 2947 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=255) Main PID: 2947 (code=exited, status=255) ``` but If I ran ``` sudo /opt/netbox/venv/bin/gunicorn --pid /var/tmp/netbox.pid --pythonpath /opt/netbox/netbox --config /opt/netbox/gunicorn.py netbox.wsgi ``` I can see expected behavior ``` ● netbox.service - NetBox WSGI Service Loaded: loaded (/etc/systemd/system/netbox.service; enabled; vendor preset: disabled) Active: active (running) since Sun 2020-09-13 01:52:57 PDT; 36s ago Docs: https://netbox.readthedocs.io/en/stable/ Main PID: 2994 (gunicorn) CGroup: /system.slice/netbox.service ‣ 2994 /opt/netbox/venv/bin/python3 /opt/netbox/venv/bin/gunicorn --pid /var/tmp/netbox.pid --pythonpath /opt/netbox/netbox --config /opt/netbox/gunicorn.py netbox.wsgi Sep 13 01:52:58 uls-np-netbox01.wdc.com gunicorn[3013]: [2020-09-13 01:52:58 -0700] [3013] [ERROR] Connection in use: ('127.0.0.1', 8001) Sep 13 01:52:58 uls-np-netbox01.wdc.com gunicorn[3013]: [2020-09-13 01:52:58 -0700] [3013] [ERROR] Retrying in 1 second. Sep 13 01:52:59 uls-np-netbox01.wdc.com gunicorn[3013]: [2020-09-13 01:52:59 -0700] [3013] [ERROR] Connection in use: ('127.0.0.1', 8001) Sep 13 01:52:59 uls-np-netbox01.wdc.com gunicorn[3013]: [2020-09-13 01:52:59 -0700] [3013] [ERROR] Retrying in 1 second. Sep 13 01:53:00 uls-np-netbox01.wdc.com gunicorn[3013]: [2020-09-13 01:53:00 -0700] [3013] [ERROR] Connection in use: ('127.0.0.1', 8001) Sep 13 01:53:00 uls-np-netbox01.wdc.com gunicorn[3013]: [2020-09-13 01:53:00 -0700] [3013] [ERROR] Retrying in 1 second. Sep 13 01:53:01 uls-np-netbox01.wdc.com gunicorn[3013]: [2020-09-13 01:53:01 -0700] [3013] [ERROR] Connection in use: ('127.0.0.1', 8001) Sep 13 01:53:01 uls-np-netbox01.wdc.com gunicorn[3013]: [2020-09-13 01:53:01 -0700] [3013] [ERROR] Retrying in 1 second. Sep 13 01:53:02 uls-np-netbox01.wdc.com gunicorn[3013]: [2020-09-13 01:53:02 -0700] [3013] [ERROR] Can't connect to ('127.0.0.1', 8001) Sep 13 01:53:02 uls-np-netbox01.wdc.com systemd[1]: netbox.service: Supervising process 2994 which is not our child. We'll most likely not notice when it exits. ```
adam closed this issue 2025-12-29 18:33:08 +01:00
Author
Owner

@jeremystretch commented on GitHub (Sep 14, 2020):

Thank you for your interest in NetBox. GitHub issues are intended for reporting reproducible bugs and requesting features, and must be submitted using one of the templates provided here. For general discussion, questions, or assistance with installation issues, please post to our mailing list instead.

@jeremystretch commented on GitHub (Sep 14, 2020): Thank you for your interest in NetBox. GitHub issues are intended for reporting reproducible bugs and requesting features, and must be submitted using one of the templates provided [here](https://github.com/netbox-community/netbox/issues/new/choose). For general discussion, questions, or assistance with installation issues, please post to our [mailing list](https://groups.google.com/forum/#!forum/netbox-discuss) instead.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4101