使用管理插件成功安装了rabbitmq服务器:
version = '4.5.1'
run_list = [ "recipe[rabbitmq::default@#{version}]",
"recipe[rabbitmq::mgmt_console@#{version}]",
"recipe[rabbitmq::user_management@#{version}]"]
属性:
default['rabbitmq']['enabled_users'] =
[{ :name => 'guest', :password => 'guest', :rights =>
[{ :vhost => nil, :conf => '.*', :write => '.*', :read => '.*' }]
},
{ :name => 'fake_user', :password => 'fake_user', :tag => 'administrator', :rights =>
[{ :vhost => nil, :conf => '.*', :write => '.*', :read => '.*' }]
}]
default['rabbitmq']['disabled_users'] = []
default['rabbitmq']['loopback_users'] = ['fake_user']
在/etc/rabbitmq/rabbitmq.config文件{loopback_users, [<<"fake_user">>]},
用户已安装,但我无法登录管理控制台,无法使用凭据访问它。
甚至通过控制台尝试:
rabbitmqctl delete_user fake_user
rabbitmqctl add_user fake_user fake_user
rabbitmqctl set_user_tags test administrator
rabbitmqctl set_permissions -p / fake_user ".*" ".*" ".*"
答案 0 :(得分:2)
如果您将fake_user
放在loopback_users
中,则只能在本地进行身份验证,而不是从管理界面进行身份验证。
尝试使用此选项以允许远程验证:
default['rabbitmq']['loopback_users'] = []