Add Celery/RabbitMQ management docs
From pull request #215 in a comment by @tcdewit
Enable the rabbitmq_management console. This way queues can be managed inside your browser (http://openremserver::15672/#/queues)
sudo rabbitmq-plugins enable rabbitmq_management
First you’ll need a user account for logging in:
sudo rabbitmqctl add_user <username> <password> sudo rabbitmqctl set_user_tags <username> administrator sudo rabbitmqctl set_permissions -p / <username> "." "." ".*"
Or if you only want to use the commandline instead of the web-interface, here are several useful commands:
sudo rabbitmqadmin list queues name sudo rabbitmqadmin delete queue name='queuename'
Show details for specified queue:
sudo rabbitmqadmin list queues vhost name node messages message_stats.publish_details.rate
Reset all queues (note: also resets all users!):
sudo rabbitmqctl stop_app sudo rabbitmqctl reset sudo rabbitmqctl start_app
Check celery queue:
celery inspect active
Comments (46)
-
reporter -
reporter @dplatten - can I prod you on this question again please?
-
reporter - marked as major
Changing status to major as it is biting people!
-
I don't think I have Windows-specific instructions, but I have directed at least one person here: https://www.rabbitmq.com/management.html. I have then pointed then to the most recent batch file here: https://bitbucket.org/openrem/openrem/issues/637/create-instructions-on-how-to-remove-all
The rabbitmq commands aren't put on the Windows path, so to install the plugins and run any other RabbitMQ commands the user needs to open a command prompt and then navigate to the sbin subfolder of their RabbitMQ install - something like:
C:\Program Files\RabbitMQ Server\rabbitmq_server-3.7.8\sbin
-
reporter -
reporter Adding enabling RabbitMQ management interface to linux single page install. Refs
#637,#662→ <<cset e72312a857b4>>
-
reporter Adding enabling RabbitMQ management interface to standard pre-install instructions. Refs
#637,#662→ <<cset c1c847ba1c31>>
-
reporter Correcting code block . Refs
#637,#662. [skip ci] docs only→ <<cset 08b4c47d8ced>>
-
reporter Adding an indent to the Linux instructions. Refs
#637,#662. [skip ci] docs only→ <<cset 4cf00f1b1fb0>>
-
reporter General pre-install instructions at https://docs.openrem.org/en/issue637-662rabbitmqmanagement/install-prep.html#enable-radbbitmq-queue-management-interface
Linux one page at https://docs.openrem.org/en/issue637-662rabbitmqmanagement/quick_start_linux.html#enable-radbbitmq-queue-management-interface
-
reporter Simple (and crude) check on the length of the RabbitMQ default queue on the localhost. Not clear if it needs to be the hostname. Refs
#637,#662→ <<cset e76c39c6c128>>
-
reporter Still crude, but now lists each queue in a table. Refs
#637,#662→ <<cset 9ab44917148b>>
-
reporter Finally clicked why pipelines were failing... Refs
#637,#662→ <<cset 396be014d7e9>>
-
reporter Added more detail to table and added purge button. Refs
#637,#662→ <<cset bef421068d47>>
-
reporter Removed redundant function/URL. Refs
#637,#662→ <<cset 59ad6956f896>>
-
reporter - changed milestone to 0.8.2
-
reporter -
assigned issue to
-
assigned issue to
-
reporter Spelling correction. Refs
#637,#662→ <<cset 4af1303162d2>>
-
reporter Now deals with management interface not enabled. Also tested from separate system. Refs
#637,#662→ <<cset fe8d6cf7637e>>
-
reporter Adding docs for RabbitMQ admin page. Refs
#637,#662→ <<cset 02ef84e58f4a>>
-
reporter Attempting to get RabbitMQ docs built from the right paren. Refs
#637,#662[skip ci} docs only→ <<cset 4bc5dbc2a159>>
-
reporter Small changes to docs. Refs
#637,#662[skip ci} docs only→ <<cset 26fde314e181>>
-
The
requests
python package is not included in settings.py and must be added for this to work. -
reporter -
Your link is to setup.py. Does the contents of that make it into settings.py?
-
reporter Split out creation of admin user, not necessary. Updated release notes. Added docs link. Set docs version to make links work for PR. Refs
#637,#662[skip ci} docs only→ <<cset f8669e08c1db>>
-
reporter Added missing docstring. Thanks Codacy! Refs
#637,#662→ <<cset 965d4b65ce4f>>
-
reporter I'm confused @dplatten - why does it need to be in
settings.py
? -
reporter Adding missing code block declaration. Refs
#637,#662→ <<cset 052ce5d72140>>
-
I thought I had to add it to INSTALLED_APPS in settings.py before the RabbitMQ part of the interface would work, but I think that actually I just had to install it.
-
reporter Updated changes - will close both issues with this PR. Bumped version of release notes to render, moved 0.8.1 to history. Refs
#637,#662[skip ci] docs only→ <<cset 83f88a5c2557>>
-
For my test install if I run celery then the following three queues are visible on the RabbitMQ page:
celery@default.celery.pidbox celeryev.b3baed35-2546-43c7-a8ce-76f1da0ba0b8 default
Then when I do an export another appears: d10f88d8-991d-34e8-a217-09a8475e719a
This new one continues to have a "1" in the "Messages waiting to be passed to Celery" even once it's finished.
-
reporter I was going to ask you about those.
In my production install, I have between twenty and thirty of those, mostly with one or two messages. If I 'get' them in the RabbitMQ interface, they contain a payload of {"status": "SUCCESS"...} etc, with a "task_id" that corresponds to the task ID OpenREM generates.
In my production install, they are all set to expire after 86400000 which is 24 hours if that is in ms. And they auto-delete. And they don't seem to build up.
On my laptop, they have no features - no expire and no auto-delete. But they also don't have the 'durable' feature, so I guess they must get cleared up when I restart RabbitMQ?
-
reporter Updating title for 0.8.1 release notes. Refs
#637,#662[skip ci] docs only→ <<cset 6c1a6bf2de5e>>
-
reporter non-static-URL version confirmed working by @LuukO, also by me. Don't know what has changed...! Refs
#637,#662→ <<cset 08b9388d2eac>>
-
reporter - changed status to resolved
Merged in issue637-662RabbitMQmanagement (pull request #241)
Approved-by: Luuk Approved-by: David Platten
→ <<cset c7ed191113ef>>
-
reporter - changed milestone to 0.9.0
-
@edmcdonagh, the text on this page includes, "If Celery is running, there will also be a queue named default@hostname.celery.pidbox."
On my system there is no queue with this name; it is called "celery@default.celery.pidbox"
-
reporter Thanks @dplatten. @LuukO - what is it called on your system?
-
On my (Windows) system it is also called "celery@default.celery.pidbox"
-
reporter Thanks. Updated.
-
reporter Moved statuses and jobs waiting to celery page. Need to add terminate RabbitMQ queued jobs, then can remove RabbitMQ page. Refs
#637,#662,#705[skip ci]→ <<cset 4099a54b8476>>
-
reporter Added button to purge RabbitMQ queue. Refs
#637,#662,#705[skip ci]→ <<cset 81e397a23070>>
-
reporter Removed RabbitMQ url, views, templates. Refs
#637,#662,#705[skip ci]→ <<cset 2ddd46f902e4>>
-
reporter New titles, links to docs, removed non-useful text. Refs
#637,#662,#705[skip ci]→ <<cset 12d64f7dfa6d>>
-
reporter Merged in issue349celery (pull request #277)
RabbitMQ, Celery and Flower task management changes
Fixes
#349,#705,#723, refs#637,#662Approved-by: Luuk Approved-by: David Platten
→ <<cset f4bb4875a6fc>>
- Log in to comment
@dplatten - did you send me some Windows instructions regarding this?