Open amorimdev opened 7 years ago
Seems like a configuration issue. Did you create a vhost and user? Is the consumer configured correctly?
Yes, i create vhost and user, works perfectly in symfony posting messages. The configuration is the same as I'm using in my parameters.yml for RabbitMqBundle. I released the user access to "/", when I change the setting to vhost "/" it works, but if put vhost for sample "/test-or-any" its not works
My solution was to add an extra / to the start of the vhost in the conf file:
[rabbitmq] host = localhost username = guest password = **** vhost=//host_name port=5672 queue=queue_name compression=Off
I had the similar issue; however, it turned out that for the name of the vhost, I need to add an addition /
to connect it. For example, if i created a vhost '/test', I need to connect to amqp://guest:guest@localhost:5672//test
for this to work. So, in my point of view, the string /test
is seen integratedly as the name of the vhost, and what happened to me was just the misuse of the name of the vhost.
Any vhost that I put in the configuration file other than "/", sample "/test", throws forbidden error:
2017/07/12 16:13:56 Connecting RabbitMQ... 2017/07/12 16:13:56 Failed creating consumer: Failed connecting RabbitMQ: Exception (403) Reason: "no access to this vhost"