rabbitmqctl list_users not working - rabbitmq

I was getting 104 connection reset by user in my django celery ,I'm assuming it has something to do with guest user, so to check when I did sudo rabbitmqctl list_users on my server, it just waits forever and does nothing. If anyone knows about both let me know. Also if you could share some rabbitmq pointers then it would be great.

Related

Run redis-cli when redis is running like a service

I have a problem with Redis and redis-cli.
I have running Redis like a service in windows, like you can see in the picture
but when I try to run "redis-cli" it doesn't anything, the console is frozen
I need to monitoring all messages with MONITORING command.
Can you help me please!?
Regards.

How is erlang.cookie and rabbitmq related?

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.

Celery works without broker and backend running

I'm running Celery on my laptop, with rabbitmq being the broker and redis being the backend. I just used all the default settings and ran celery -A tasks worker --loglevel=info, then it all worked. The workers can get jobs done and I get fetch the execution results by calling result.get(). My question here is that why it works even if I didn't run the rebbitmq and redis servers at all. I did not set the accounts on the servers either. In many tutorials, the first step is to run the broker and backend servers before starting celery.
I'm new to these tools and do not quite understand how they work behind the scene. Any input would be greatly appreciated. Thanks in advance.
Never mind. I just realized that redis and rabbitmq automatically run after installation or shell startup. They must be running for celery to work.

Celery and Flower: nothing in broker tab

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

RabbitMQ management web console doesn't show queues or exchanges

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