Solved: netbox-rq fails to start after upgrade from 3.6.1 to 3.7.3 (cannot import name 'Connection' from 'rq') #18171
-
EDIT: Solved: Hello, I'm trying to align my devs lab environments to match our prod installation which is 3.7.3 Any help would be appreciated. OS: RHEL 8.8 Requirement already satisfied: django-rq in /usr/local/lib/python3.9/site-packages (3.0.0) Error: Dec 6 12:59:32 cn04tlv-netboxcbad01 systemd[1]: Started NetBox Request Queue Worker. If I attempt to downgrade RQ I get multiple dependency errors. django-rq 3.0.0 requires rq>=2, but you'll have rq 1.16.2 which is incompatible. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You don't appear to be installing Netbox in a virtualenv. If not, it is bound to end in tears, as the versions of python packages which are installed globally on your system are almost certainly not compatible with those Netbox requires. You should use the script Then, if you still can't get the upgrade to work, there might be other problems. Unfortunately, Netbox doesn't pin its dependencies, so the packages you get when you install Netbox 3.7.3 today are not the same as the packages you would have got when 3.7.3 was first released - and the newer packages are known to break things. You can find a working set of dependencies from here: https://github.com/markkuleinio/netbox-freezes - these are taken from points in time when those versions of Netbox could be installed successfully. I can see that version 3.7.3 worked with:
but in v3.7.3, requirements.txt pinned django-rq==2.10.1 but did not pin rq. It might be sufficient just to edit requirements.txt and add the dependency on that version of rq. A similar change was added recently to Netbox master in commit f568433, dated Oct 28 2024, pinning rq==1.16.2, which made it into Netbox v4.1.5. However this was not back-ported to any earlier versions of Netbox (indeed, I've never seen a retrospective update to any version of Netbox other than the current master version) So basically, if you're using anything other than the most recently-released version of Netbox, you're expected to work out all this dependency stuff yourself. But of course, to get yourself onto the most recent version, you still have to upgrade to v3.7.x first. I think there would be a case for a v3.7.9 release to address this particular problem, or if not, then a documented workaround. (Aside: you might as well go straight to v3.7.8, rather than v3.7.3, to get the latest set of bug fixes on that particular series) |
Beta Was this translation helpful? Give feedback.
You don't appear to be installing Netbox in a virtualenv. If not, it is bound to end in tears, as the versions of python packages which are installed globally on your system are almost certainly not compatible with those Netbox requires.
You should use the script
/opt/netbox/upgrade.sh
to install the packages; this will wipe and recreate a fresh virtualenv for you, and it should ignore any globally-installed versions of packages.Then, if you still can't get the upgrade to work, there might be other problems. Unfortunately, Netbox doesn't pin its dependencies, so the packages you get when you inst…