I'm trying to configure Flower, Celery's monitoring tool. This works ok overall, but I cannot see anything under the broker tab. I can see stuff under "workers", 'tasks' and 'monitor' and the graphs are updating. I'm using the following to start flower:
celery flower --broker=amqp://<username>:<password>#<ipaddress>:5672/vhost_ubuntu --broker_api=http://<username>:<password>#<ipaddress>:15672/api
Relevant error message I'm receiving is: Unable to get broker info: 401 Client Error: Unauthorized
I can login to RabbitMQ management via http://:15672/ with username guest and password guest
Any ideas as to why I can't see the messages under the broker tab?
This reply might be a few years too late, but I finally figured out why I was having the same issue. Once you enable the rabbitmq_management plugin, you need to give the user that you are using to connect to rabbitmq permission to use it. At heart, the rabbitmq-management plugin gives you a user interface to check on your amqp server, if you credentials work to login to the portal they should work with the API once the administrator tag is added.
sudo rabbitmqctl set_user_tags <username> administrator
You need to enable flower to access rabbitmq. For that run these commands in your terminal
sudo rabbitmq-plugins enable rabbitmq_management
sudo service rabbitmq-server restart
Also make sure that current user has relevant permissions on rabbitmq.
Now if you run flower, it should show the broker.
Also there is a bug in older version of tornado. Make sure to upgrage tornado so that flower works properly.
pip install --upgrade tornado
Related
I just install RabbitMQ in my computer and want to run demo for sending message but it doesn't work. According to documentation the reason may because the broker was started without enough free disk space. And when I check RabbitMQ Management Dashboard, it show my free disk space only 46kb (by default it needs at least 200 MB free). According to documentation I need to change disk_free_limit.
From this documentation I have to create configuration file by myself and put it in C:\Users\User\AppData\Roaming\RabbitMQ. The documentation give an example script for configuration. I change the setting for disk_free_limit.absolute, restart computer (I don't know how to restart RabbitMQ service in windows). But when I check the RabbitMQ Management Dashboard the disk space still 46kb.
I highly recommend the usage of containers for running services like RabbitMQ to avoid problems like the ones you are having at the moment.
I usually use this dockerfile
FROM rabbitmq:3-management
RUN echo '[rabbitmq_management,rabbitmq_management_visualiser,rabbitmq_amqp1_0].' > enabled_plugins
RUN rabbitmq-plugins enable rabbitmq_amqp1_0
For running it
docker build -t my-rabbit .
docker run -it --rm --name rabbitmq -p 5672:5672 -p 15672:15672 my-rabbit:latest
If you never played with docker before, please read this.
I have accidentally deleted erlang.cookie and i cannot restart RabbitMQ server? What is the best way to make the server running again.
The erlang cookie is a token needed by rabbitmq to use clustering. That's why he is required on server start.
Go to /var/lib/rabbitmq and check if .erlang.cookie is still here.
If not, try running
rabbitmqctl shutdown
rabbitmq-server
Considering the erlang doc this should regenerate your cookie.
The first action of the Erlang network authentication server (auth) is then to read a file named $HOME/.erlang.cookie. If the file does not exist, it is created.
If this doesn't work, try to reboot the host, and if this still doesn't work can you post more details about the error message, and run
rabbitmqctl status
and show us what it gives you.
I've installed RabbitMQ (latest version downloadable from RabbitMQ website) on my Windows 10 machine. It installed with ERlang 19.1.
I'm trying to install RabbitMQ Web UI Management Tools using the following command (using RabbitMQ Command Prompt):
rabbitmq-plugins enable rabbitmq_management
I'm getting the following error:
The directory name is invalid.
The filename, directory name, or volume label syntax is incorrect.
The filename, directory name, or volume label syntax is incorrect.
Plugin configuration unchanged.
Applying plugin configuration to rabbit#[0x7FF9A8527044]... failed.
* Could not contact node rabbit#[0x7FF9A8527044].
Changes will take effect at broker restart.
* Options: --online - fail if broker cannot be contacted.
--offline - do not try to contact broker.
I've looked up on SO and tried stopping and restarting, overriding erlang cookie, but nothing helps.
I think there's a problem with RabbitMQ itself. The service itself is marked as started, but if I try to telnet the default port (5672) then it fails (it's not a firewall issue - I've disabled it).
Also I don't see an log files created for RabbitMQ or any related Event Logs messages. So it's hard to diagnose exactly the problem.
I also tried uninstalling and re-install both erlang and RabbitMQ. Still didn't help.
How do I further diagnose the problem?
Found a solution to the problem (downgrading Erlang did not work in my case, but just in case I left it on Erlang 18 in case there were other issues with ver 19).
What puzzled my eye was this line: Applying plugin configuration to rabbit#[0x7FF9A8527044]... failed.. Seems like it's trying to connect to rabbit instance at a wrong machine name.
I then ran rabbitmqctl.bat status which failed but again showed that it's trying to connect to [0x7FF9A8527044] while the node name was rabbit#my-mchine-name. So I started reading the configuration section at RabbitMQ website and the solution was simple - setting the node name manually.
All I had to do is add an environment variable named RABBITMQ_NODENAME with the node name being rabbit#localhost. And that's it. Problem solved!
you may be running into issues with Erlang 19 incompatibility. there has been some history of Erlang 19 support problems with RMQ. Try installing Erlang 18 instead.
If that fails, I would recommend using Docker for Windows and installing / running RabbitMQ in that. I've moved all my services like RabbitMQ, MongoDB, etc. into Docker containers and it's made my life as a dev so much simpler.
In my case I had to trash the local account config located at : %APPDATA%\RabbitMQ\.
Deleting the entire folder and reinstalling the service did the trick.
Rabbitmq 3.6.14
Erlang 20.1 OTP
When I was trying to display rabbitmq queue details as follows, It display result as follows:
sudo rabbitmqctl list_queues | grep notifications.info
notifications.info 37
Now my question is that how to fetch or view those messages or information contained in notifications.info.
In case you have the admin plugin installed, you can peek inside those messages using the admin UI. Usually available on port 15672 of your rabbitmq host.
You can see if this plugin is installed by running:
rabbitmq-plugins list
Another way to receive messages from the queue is by using one of the many rabbitmq clients. E.g. the RabbitMq java client: https://www.rabbitmq.com/java-client.html. What's your favorite programming language? Chances are that there is a client for you. Here is an overview of available clients: https://www.rabbitmq.com/devtools.html
I've got rabbitmq 2.8.2 set up with the web management interface running. The Queues and Exchanges show no data.
rabbitmqctl list_queues works and shows my queues.
I've done rabbitmqctl stop_app, start_app.. and also service rabbitmq-server restart.
Any idea how to get the queue & exchange details to populate?
I had removed the guest user and created a new user for myself. My new user did not have permission to access the / vhost. Adding that permission fixed my issue.
Rabbitmq users only have permission to view the queues that they created by default. Also if you want the user to have access to the management console you need to grant the right privileges.
To solve this problem I ran:
rabbitmqctl set_user_tags <user> management
There is more information on setting up the correct permissions for accessing the management console on RabbitMQs website: https://www.rabbitmq.com/management.html