Add Celery/RabbitMQ management docs

Issue #662 resolved
Ed McDonagh created an issue

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)

  1. David Platten

    I don't think I have Windows-specific instructions, but I have directed at least one person here: I have then pointed then to the most recent batch file here:

    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

  2. David Platten

    The requests python package is not included in and must be added for this to work.

  3. Ed McDonagh 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>>

  4. David Platten

    I thought I had to add it to INSTALLED_APPS in before the RabbitMQ part of the interface would work, but I think that actually I just had to install it.

  5. David Platten

    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.

  6. Ed McDonagh 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?

  7. David Platten

    @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"

  8. Log in to comment