QCluster not running - help required please

125 views
Skip to first unread message

MDI (Adam)

unread,
Mar 27, 2025, 12:58:14 PMMar 27
to QATrack+
Hi all,

I have a Windows Server environment (OS Windows Server 2022). I have successfully completed the setup of QATrack+, and everything is all working fine and has been for a few weeks now. I also used all required versions (SQL Server 2019 and Python 3.9.1 ) to ensure complete compatibility on what has already been "tried and tested".

The only problem i have is that the Alert/Notifications aren't working. I have tracked this down to the final part of the install documentation - QCluster.

I first noticed the Windows Scheduled Task was constantly in a "running" state, when this should really switch back to a "ready" state once executed.

ST.jpg


Further troubleshooting has shown that the command "python manage.py qmonitor" (to confirm the task cluster is running) results in multiple errors. Equally, running the command (which is what Task Scheduler does) "python manage.py qcluster" also results in the same errors.

The errors are basically along the lines of saying that the module is not installed e.g. "cannot import xxxx"

cmd.jpg

Now, I have worked my way through each of the errors, manually importing whichever 'module' is missing via the PIP Install command. This has been a bit of googling plus guess work to the actual module name, but i have managed to work my through around 10 modules, each time those errors go away (effectively the module is located) and then it will roll onto whichever the next one is.

Whist importing these modules i was kind of half aware that this probably isn't normal but i was stuck so had no other choice - I have now got to a stage (above cmd error) where i can't find the 'faults' module to install, but more to the point, I don't think this truly is the problem.

My limited knowledge here means i am stuck, so would appreciate any help on getting the Qcluster running. My gut feeling here is that it is something to do with the Qcluster command not looking in the correct 'site-packages' location, as if i browse to the C:\deploy\venvs\qatrack31\Lib\site-packages I can see all of the modules which i think it should be using and referencing when running the command, however (screen shot below) it looks as if it is using/referencing the 'site-packages' in the default Python installation directory, not the QATrack one (c:\program files\python39\lib\site-packages)

cmd2.jpg

Hopefully that helps. It could be that I'm completely wrong here, but given i can see all of the modules in the C:\deploy\venvs\qatrack31\Lib\site-packages location that it was showing me each error on, I'm going to guess that it (hopefully) is just a case of telling the "python manage.py Qcluster" command to look in this directly and not the default python39 one.

As mentioned everything else for QATrack is running perfectly, It's just this final part.

Thanks

tbe...@gmail.com

unread,
Mar 31, 2025, 7:35:05 AMMar 31
to QATrack+
Hi,
I am not using windows here so my knowledge is limited. Which Python version are you referencing in your scheduled task? According to the documentation you have to use the python.exe from your venv. Could you please check that? https://docs.qatrackplus.com/en/stable/install/win.html#setting-up-django-q
qcluster_action.png

MDI (Adam)

unread,
Apr 24, 2025, 10:33:36 AMApr 24
to QATrack+
Hi. Apologies for the later reply.....

Yes, it is using the exact same settings as posted in your screenshot (and the documentation). Followed to the letter.

Any further ideas?

Here is a screenshot of running in CMD, effectively what that Scheduled Task is trying to do:


b.jpg




As you can see it starts to reference C:\Program Files\Python39\lib\site-packages when i feel like it should be referencing C:\deploy\venvs\qatrack31\Lib\site-packages instead. I could be wrong here, but because if i look in both of those directories i can see all of the modules it should be calling correctly in C:\deploy\venvs\qatrack31\Lib\site-packages, it makes me feel like it should be looking here?




a.jpg



Any help will be greatly appreciated, as I'm really stuck now. As i say the rest of the program is functional perfectly, It's just the Reporting/Notification Q Cluster part, which is broken

tbe...@gmail.com

unread,
Apr 25, 2025, 2:51:20 AMApr 25
to QATrack+
Hi,

you have to start the venv you want to use with an activate script every time before using it:

So in your cmd you should see the name of the active venv like here:
venv.PNG
In your screenshot I can't see the venv.

Could you share a screenshot of you service?

regards
Thomas

MDI (Adam)

unread,
Apr 25, 2025, 10:39:20 AMApr 25
to QATrack+
Thanks for the reply.

I'm not sure entirely what you mean by that? The link you have sent is to the Cherrypy setup (which was completed successfully). As i say the entire QA Track application functions fine, starts after reboot etc, has no issues at all. It is just that the Task Schedule for Django Q Cluster, just sits in a 'running' state, when it should go back to a 'ready' state as all Windows Tasks do, once the execute successfully. 

By me testing in CMD, i was just guessing (potentially incorrectly) that this is what the Task Schedule is set to do (effectively running the 'manage.py qcluster' argument), so because of Task Scheduler not executing successfully, i was hoping to see "behind the scenes" so to speak, on what this process was doing. As the documentation suggests, it should output something like this:


Screenshot 1.jpg




Below is a screenshot of the Windows Service as requested: 

Screenshot 2.jpg

tbe...@gmail.com

unread,
Apr 28, 2025, 12:21:08 PMApr 28
to QATrack+
Hi,

I mixed up "service" and "task" in my last post, sry for that.

If you want to test the state of you Q cluster with "python manage.py qmonitor" you have to activate the qatrack virtual environment first. If you do not activate the venv all qatrack/python libraries that are needed and that have been downloaded during installation are not known to the python interpreter (so the moduels are missing). So before you type "python manage.py qmonitor" you have to type:
cd C:\deploy
.\venvs\qatrack31\Scripts\Activate.ps1(or .bat)
cd qatrackplus
assuming you used the same paths.

Here is a link to better understand virtual environments:
Reply all
Reply to author
Forward
0 new messages