Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

access to vhost refused for guest, with the MassTransit Sample-RequestResponse sample

Tags:

I am using the default configuration on latest RabbitMQ server (guest is admin) but I get the next exception when I run the RequestResponse sample.

OperationInterruptedException: The AMQP operation was interrupted: AMQP close-reason, initiated by Peer, code=530, text="NOT_ALLOWED - access to vhost 'test' refused for user 'guest'", classId=10, methodId=40, cause=

any ideas?

like image 673
Apostolis Bekiaris Avatar asked Sep 09 '17 22:09

Apostolis Bekiaris


1 Answers

The sample is correct. The setting in App.config is:

<add key="RabbitMQHost" value="rabbitmq://localhost/test"/>

It means that MT will try connecting to the local instance, and test virtual host. Out of the box RabbitMQ has no virtual hosts configured and this is why you are getting this exception.

What you could have done is, using the management plugin:

  1. Add the test virtual host to your RabbitMQ server configuration
  2. Add full permissions to that virtual host to your guest user

And then it will work with the App.config without changes.

like image 169
Alexey Zimarev Avatar answered Oct 11 '22 13:10

Alexey Zimarev