Cannot login in RabbitMQ Management web console

2019-05-27 10:39发布

问题:

I have installed RabbitMQ Server installed in CentOS 6.6 and I have also installed and enabled Management plugin. If I run the command rabbitmq-plugins list this is what I get at console:

 Configured: E = explicitly enabled; e = implicitly enabled
 | Status:   * = running on rabbit@pdone-staging
 |/
[e*] amqp_client                       3.5.0
[  ] cowboy                            0.5.0-rmq3.5.0-git4b93c2d
[  ] eldap                             3.5.0-gite309de4
[e*] mochiweb                          2.7.0-rmq3.5.0-git680dba8
[  ] rabbitmq_amqp1_0                  3.5.0
[  ] rabbitmq_auth_backend_ldap        3.5.0
[  ] rabbitmq_auth_mechanism_ssl       3.5.0
[  ] rabbitmq_consistent_hash_exchange 3.5.0
[  ] rabbitmq_federation               3.5.0
[  ] rabbitmq_federation_management    3.5.0
[E*] rabbitmq_management               3.5.0
[e*] rabbitmq_management_agent         3.5.0
[  ] rabbitmq_management_visualiser    3.5.0
[  ] rabbitmq_mqtt                     3.5.0
[  ] rabbitmq_shovel                   3.5.0
[  ] rabbitmq_shovel_management        3.5.0
[  ] rabbitmq_stomp                    3.5.0
[  ] rabbitmq_test                     3.5.0
[  ] rabbitmq_tracing                  3.5.0
[e*] rabbitmq_web_dispatch             3.5.0
[  ] rabbitmq_web_stomp                3.5.0
[  ] rabbitmq_web_stomp_examples       3.5.0
[  ] sockjs                            0.3.4-rmq3.5.0-git3132eb9
[e*] webmachine                        1.10.3-rmq3.5.0-gite9359c7

I'm trying to access with guest default user after change it password through rabbitmqctl change_password guest <newpassword> but any time I try to login at http://localhost:15672/ I got Login failed message. I have check guest permissions and apparently are right ones:

rabbitmqctl list_user_permissions guest
Listing permissions for user "guest" ...
/       .*      .*      .*

So, what I'm missing here? Why I cannot login into Management console?

回答1:

Guest login is deactivated in production environment.

So you must create a new user.Also i think, it is a good practice to delete guest user in production environment after create a new user.So

sudo rabbitmqctl add_user myuser mypass
sudo rabbitmqctl set_permissions -p / myuser ".*" ".*" ".*"
sudo rabbitmqctl set_user_tags myuser administrator