Allowing RabbitMQ-Server Connections
24,009
It looks like you need to grant access to the "/myapp" vhost for the "guest" user.
set_permissions [-p vhostpath] {user} {conf} {write} {read}
So something similar to this will give your guest user unlimited access:
rabbitmqctl set_permissions -p /myvhost guest ".*" ".*" ".*"
Related videos on Youtube
Author by
Cerin
Updated on July 09, 2022Comments
-
Cerin almost 2 years
I'm trying to get a Django Celery worker to connect to a RabbitMQ server, all running on the same host.
However, when I run
manage.py celery worker
all I get is:[2013-06-11 17:33:41,185: WARNING/MainProcess] celery@localhost has started. [2013-06-11 17:33:44,192: ERROR/MainProcess] Consumer: Connection Error: Socket closed. Trying again in 2 seconds... [2013-06-11 17:33:50,203: ERROR/MainProcess] Consumer: Connection Error: Socket closed. Trying again in 4 seconds... [2013-06-11 17:34:03,214: ERROR/MainProcess] Consumer: Connection Error: Socket closed. Trying again in 6 seconds... [2013-06-11 17:34:27,232: ERROR/MainProcess] Consumer: Connection Error: Socket closed. Trying again in 8 seconds...
When I inspect my
/var/log/rabbitmq/[email protected]
I see several messages like:=ERROR REPORT==== 11-Jun-2013::17:33:44 === exception on TCP connection <0.201.0> from 127.0.0.1:43461 {channel0_error,opening, {amqp_error,access_refused, "access to vhost 'myapp' refused for user 'guest'", 'connection.open'}}
I'm using the standard package out of Ubuntu 12.04's repo, with the default settings and my django-celery settings look like:
BROKER_HOST = "localhost" BROKER_PORT = 5672 BROKER_USER = "guest" BROKER_PASSWORD = "guest" BROKER_VHOST = "myapp"
Why is RabbitMQ refusing connections?
-
Prasad Shinde almost 6 yearsWhat if, I want to give by default full access to my vhost while creating from rabbitmq image? because if we run the application in docker container, then, in that case, we don't want any manual permissions to get the app working, in general.