Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to access RabbitMq publicly

I have installed & setup the Rabbitmq on Centos remote server. Later I created an file "rabbitmq.config" and added the line

[{rabbit, [{loopback_users, []}]}]

and then restarted the rabbitmq server. Again tried to login the rabbitmq management web interface from my local machine using the guest credentials, but getting

login failed

error message.What is the proper way to empty the loopback user settings for Rabbitmq in Centos.

like image 734
loganathan Avatar asked Apr 11 '14 19:04

loganathan


People also ask

How do I access RabbitMQ?

Open the RabbitMQ management console, http://localhost:15672 . Login as a guest. Enter guest as the Username and Password. Note: The default user โ€œguestโ€ is an administrative user and its login credentials are published on the official RabbitMQ web site.

How do I access RabbitMQ locally?

If you're running Rabbit MQ locally you can use localhost in place of the host. Opening the URL in the browser, you'll see a login page, enter guest for both username and password to access the administrative parts. Yay! โœŒ๏ธ That's it, start Rabbiting your MQs ๐Ÿ˜›.

How do I access RabbitMQ server remotely?

Create new RabbitMQ user and set permissions To create a new RabbitMQ user to access the RabbitMQ server remotely: Open a browser and navigate to http://localhost:15672/. The RabbitMQ Management login screen displays. Log into RabbitMQ using guest as both the username and password.

Can access virtual hosts RabbitMQ?

Different users can be granted access only to specific virtual hosts. Their permissions in each virtual hosts also can be limited. RabbitMQ supports two major authentication mechanisms as well as several authentication and authorisation backends. Password-based authentication has a companion guide.


2 Answers

First of all connect to your rabbitmq server machine using ssh client so as to be able to run rabbitmqctl (like puTTY) & get into the sbin directory of rabbit installation

  1. you need to create a user for any vhost on that system (here I use default vhost "/")

$ rabbitmqctl add_user yourName yourPass

  1. Set the permissions for that user for default vhost

$ rabbitmqctl set_permissions -p / yourName ".*" ".*" ".*"

  1. Set the administrator tag for this user (to enable him access the management pluggin)

$ rabbitmqctl set_user_tags yourName administrator

... and you are ready to login to your rabbitmq management gui using yourName and yourPass from any browser by pointing it to http://"*********":15672 where ***** is your server IP hope it helps...

:-)

like image 120
Anshuman Banerjee Avatar answered Sep 17 '22 23:09

Anshuman Banerjee


There is an example config file, on centos do:

cp /usr/share/doc/rabbitmq-server-3.4.2/rabbitmq.config.example /etc/rabbitmq/rabbitmq.config

Find and remove comments (and comma):

{loopback_users, []}

Then, stop rabbitmq:

rabbitmqctl stop

Now start the server:

service rabbitmq-server start

Now user "guest" can access from anywhere.

like image 21
anonimmmoo Avatar answered Sep 17 '22 23:09

anonimmmoo