netbox-rqworker failed to start on fresh installation of v4.1.4 #10443

Closed
opened 2025-12-29 21:31:30 +01:00 by adam · 0 comments
Owner

Originally created by @boxstep on GitHub (Nov 6, 2024).

Deployment Type

Self-hosted

Triage priority

N/A

NetBox Version

v4.1.4

Python Version

3.11

Steps to Reproduce

Follow netbox installation procedure. Procedure installs newest "rq" version.

Expected Behavior

netbox-rqworker service should start

Observed Behavior

netbox-rqworker failed.

'''
$ /opt/netbox/venv/bin/python3 /opt/netbox/netbox/manage.py rqworker high default low
Traceback (most recent call last):
File "/opt/netbox/netbox/manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/opt/netbox/venv/lib/python3.11/site-packages/django/core/management/init.py", line 442, in execute_from_command_line
utility.execute()
File "/opt/netbox/venv/lib/python3.11/site-packages/django/core/management/init.py", line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib/python3.11/site-packages/django/core/management/init.py", line 275, in fetch_command
klass = load_command_class(app_name, subcommand)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib/python3.11/site-packages/django/core/management/init.py", line 48, in load_command_class
module = import_module("%s.management.commands.%s" % (app_name, name))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1206, in _gcd_import
File "", line 1178, in _find_and_load
File "", line 1149, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "/opt/netbox/netbox/core/management/commands/rqworker.py", line 3, in
from django_rq.management.commands.rqworker import Command as _Command
File "/opt/netbox/venv/lib/python3.11/site-packages/django_rq/management/commands/rqworker.py", line 5, in
from rq import Connection
ImportError: cannot import name 'Connection' from 'rq' (/opt/netbox/venv/lib/python3.11/site-packages/rq/init.py)
'''

After having uninstalled rq pip package from venv and installed rq==1.16.2 service started. I read about same issue in v3.5 about rq worker, this might be related.

Originally created by @boxstep on GitHub (Nov 6, 2024). ### Deployment Type Self-hosted ### Triage priority N/A ### NetBox Version v4.1.4 ### Python Version 3.11 ### Steps to Reproduce Follow netbox installation procedure. Procedure installs newest "rq" version. ### Expected Behavior netbox-rqworker service should start ### Observed Behavior netbox-rqworker failed. ''' $ /opt/netbox/venv/bin/python3 /opt/netbox/netbox/manage.py rqworker high default low 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.11/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line utility.execute() File "/opt/netbox/venv/lib/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute self.fetch_command(subcommand).run_from_argv(self.argv) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/netbox/venv/lib/python3.11/site-packages/django/core/management/__init__.py", line 275, in fetch_command klass = load_command_class(app_name, subcommand) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/netbox/venv/lib/python3.11/site-packages/django/core/management/__init__.py", line 48, in load_command_class module = import_module("%s.management.commands.%s" % (app_name, name)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen importlib._bootstrap>", line 1206, in _gcd_import File "<frozen importlib._bootstrap>", line 1178, in _find_and_load File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 690, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 940, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/opt/netbox/netbox/core/management/commands/rqworker.py", line 3, in <module> from django_rq.management.commands.rqworker import Command as _Command File "/opt/netbox/venv/lib/python3.11/site-packages/django_rq/management/commands/rqworker.py", line 5, in <module> from rq import Connection ImportError: cannot import name 'Connection' from 'rq' (/opt/netbox/venv/lib/python3.11/site-packages/rq/__init__.py) ''' After having uninstalled rq pip package from venv and installed rq==1.16.2 service started. I read about same issue in v3.5 about rq worker, this might be related.
adam closed this issue 2025-12-29 21:31:31 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10443