1
正如您所看到的,我嘗試在RabbitMQ上設置和使用新虛擬主機的權限。我找不到,我的問題是什麼。如果我使用vhost作爲「/」,一切正常。在node.js的/ amqpsRabbitMQ「訪問虛擬主機」OWN「拒絕」
=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)
的ConnectionURL是
var connectUrl = sprintf('amqps://%s:%[email protected]%s/%s', 'mqadmin', 'my_password', 'server_ip','OWN');
好抓!標準慣例是使用/在vhost名稱前面,儘管這不是嚴格要求 –