RabbitMQ“访问vhost'OWN'被拒绝”

时间:2016-11-18 10:00:32

标签: node.js rabbitmq amqp

如您所见,我尝试在RabbitMQ上设置和使用新vhost的权限。我找不到,我的问题是什么。如果我使用vhost作为“/”,一切正常。

=INFO REPORT==== 18-Nov-2016::11:50:20 ===
Setting permissions for 'mqadmin' in '/' to '.*', '.*', '.*'

=INFO REPORT==== 18-Nov-2016::11:50:24 ===
Setting permissions for 'mqadmin' in '/OWN' to '.*', '.*', '.*'

=INFO REPORT==== 18-Nov-2016::11:51:49 ===
accepting AMQP connection <0.18046.18> (my_ip:60527 -> server_ip:5671)

=ERROR REPORT==== 18-Nov-2016::11:51:49 ===
Error on AMQP connection <0.18046.18> (my_ip:60527 -> server_ip:5671, user: 'mqadmin', state: opening):
access to vhost 'OWN' refused for user 'mqadmin'

=INFO REPORT==== 18-Nov-2016::11:51:49 ===
closing AMQP connection <0.18046.18> (my_ip:60527 -> server_ip:5671)

node.js / amqps上的ConnectionUrl是

var connectUrl = sprintf('amqps://%s:%s@%s/%s', 'mqadmin', 'my_password', 'server_ip','OWN');

1 个答案:

答案 0 :(得分:3)

我回答说。解决了! vhost“/ OWN”和“OWN”不一样!当忽略/来自vhost时,一切正常。