manage.py rqworker doesn't exist #2556

Closed
opened 2025-12-29 18:19:54 +01:00 by adam · 4 comments
Owner

Originally created by @Otterian on GitHub (Apr 26, 2019).

Environment

  • Python version: Python 3.5.2
  • NetBox version: 2.5.10 (Latest stable)

Steps to Reproduce

  1. Install NetBox using the steps provided in the official documentation

Expected Behavior

I expected manage.py to have a subcommand to allow the spawning of rqworker.

Observed Behavior

There is no command available to support the execution done by Supervisor as described in the Supervisor config file for Netbox
command = python3 /opt/netbox/netbox/netbox/manage.py rqworker

From the Supervisor stderr log:

Unknown command: 'rqworker'

Type 'manage.py help' for usage.

And the output of manage.py:

Type 'manage.py help <subcommand>' for help on a specific subcommand.

Available subcommands:

[auth]
    changepassword
    createsuperuser

[contenttypes]
    remove_stale_contenttypes

[debug_toolbar]
    debugsqlshell

[django]
    check
    compilemessages
    createcachetable
    dbshell
    diffsettings
    dumpdata
    flush
    inspectdb
    loaddata
    makemessages
    sendtestemail
    shell
    showmigrations
    sqlflush
    sqlmigrate
    sqlsequencereset
    squashmigrations
    startapp
    startproject
    test
    testserver

[drf_yasg]
    generate_swagger

[extras]
    nbshell
    runreport

[rest_framework]
    generateschema

[sessions]
    clearsessions

[staticfiles]
    collectstatic
    findstatic
    runserver

[utilities]
    makemigrations
    migrate
Originally created by @Otterian on GitHub (Apr 26, 2019). <!-- NOTE: 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. --> ### Environment * Python version: Python 3.5.2 * NetBox version: 2.5.10 (Latest stable) <!-- Describe in detail the exact steps that someone else can take to reproduce this bug using the current stable release of NetBox (or the current beta release where applicable). 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 wrapper like pynetbox. --> ### Steps to Reproduce 1. Install NetBox using the steps provided in the official documentation <!-- What did you expect to happen? --> ### Expected Behavior I expected manage.py to have a subcommand to allow the spawning of rqworker. <!-- What happened instead? --> ### Observed Behavior There is no command available to support the execution done by Supervisor as described in the Supervisor config file for Netbox `command = python3 /opt/netbox/netbox/netbox/manage.py rqworker ` ### From the Supervisor stderr log: > Unknown command: 'rqworker' > Type 'manage.py help' for usage. ### And the output of manage.py: ``` Type 'manage.py help <subcommand>' for help on a specific subcommand. Available subcommands: [auth] changepassword createsuperuser [contenttypes] remove_stale_contenttypes [debug_toolbar] debugsqlshell [django] check compilemessages createcachetable dbshell diffsettings dumpdata flush inspectdb loaddata makemessages sendtestemail shell showmigrations sqlflush sqlmigrate sqlsequencereset squashmigrations startapp startproject test testserver [drf_yasg] generate_swagger [extras] nbshell runreport [rest_framework] generateschema [sessions] clearsessions [staticfiles] collectstatic findstatic runserver [utilities] makemigrations migrate ```
adam closed this issue 2025-12-29 18:19:54 +01:00
Author
Owner

@Otterian commented on GitHub (Apr 26, 2019):

After tearing my hair out and honestly believing this to be the issue, I managed to get NetBox to work by editing (drumroll) the Nginx config for the site.

As far as I am concerned the steps involving rqworker and Supervisor in the documentation should be deprecated or updated, as I see no use in a command that doesn't exist - since it apparently works without it.

@Otterian commented on GitHub (Apr 26, 2019): After tearing my hair out and honestly believing this to be the issue, I managed to get NetBox to work by editing (drumroll) the Nginx config for the site. As far as I am concerned the steps involving rqworker and Supervisor in the documentation should be deprecated or updated, as I see no use in a command that doesn't exist - since it apparently works without it.
Author
Owner

@lampwins commented on GitHub (Apr 26, 2019):

rqworker is a command used in django-rq which is only needed when you wish to use Webhooks. django-rq is not included in the base NetBox requirements and this means the administrator has to manually pip install it if they wish to use Webhooks. This will change to a base requirement in the upcoming 2.6 release.

If you are not using Webhooks, simply remove the rq worker process from your supervisor config.

@lampwins commented on GitHub (Apr 26, 2019): rqworker is a command used in `django-rq` which is only needed when you wish to use Webhooks. `django-rq` is not included in the base NetBox requirements and this means the administrator has to manually pip install it if they wish to use Webhooks. This will change to a base requirement in the upcoming 2.6 release. If you are not using Webhooks, simply remove the rq worker process from your supervisor config.
Author
Owner

@gravelander commented on GitHub (Nov 25, 2019):

@Otterian , what exactly did you tweak to get this working?

@gravelander commented on GitHub (Nov 25, 2019): @Otterian , what exactly did you tweak to get this working?
Author
Owner

@Grokzen commented on GitHub (Nov 26, 2019):

@xelarate86 @Otterian The following supervisord config works for me locally to run python manage.py rqworker

[program:rqworker]
command = /usr/bin/python3 /opt/netbox/netbox/manage.py rqworker

; If you want to run more than one worker instance, increase this
numprocs = 3
user = www-data

process_name = rqworker1-%(process_num)s

environment = DJANGO_SETTINGS_MODULE=netbox.settings-prod

; This is the directory from which RQ is ran. Be sure to point this to the
; directory where your source code is importable from
directory = /opt/netbox/netbox/

; RQ requires the TERM signal to perform a warm shutdown. If RQ does not die
; within 10 seconds, supervisor will forcefully kill it
stopsignal = TERM

autostart = true
autorestart = true
@Grokzen commented on GitHub (Nov 26, 2019): @xelarate86 @Otterian The following supervisord config works for me locally to run `python manage.py rqworker` ``` [program:rqworker] command = /usr/bin/python3 /opt/netbox/netbox/manage.py rqworker ; If you want to run more than one worker instance, increase this numprocs = 3 user = www-data process_name = rqworker1-%(process_num)s environment = DJANGO_SETTINGS_MODULE=netbox.settings-prod ; This is the directory from which RQ is ran. Be sure to point this to the ; directory where your source code is importable from directory = /opt/netbox/netbox/ ; RQ requires the TERM signal to perform a warm shutdown. If RQ does not die ; within 10 seconds, supervisor will forcefully kill it stopsignal = TERM autostart = true autorestart = true ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2556