1

I have setted up rabbitMQ and its management plubin in windows,

I found rabbitmq.config file with "EXAMPLE FILE" type in the path of

" ...AppData\Roaming\RabbitMQ " and " C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.3.1\etc "

I add the line {loopback_users, []} into this rabbitmq.config file, and restart the windows service, but still can't login from another computer with guest/guest

Am I editing the wrong config file?

Here is some relevant discussion: How to access RabbitMq publicly http://www.rabbitmq.com/access-control.html

Community
  • 1
  • 1
user3527917
  • 327
  • 2
  • 10
  • 22
  • in the tutorial, the rabbitmq.config in windows is expected in %APPDATA%\RabbitMQ\ I guess it was the issue, and copy the rabbitmq.config in that path, restart the windows service, still not work – user3527917 May 21 '14 at 13:08
  • possible duplicate of [Can't access RabbitMQ web management interface after fresh install](http://stackoverflow.com/questions/22850546/cant-access-rabbitmq-web-management-interface-after-fresh-install) – pinepain May 21 '14 at 15:27
  • the answer http://stackoverflow.com/questions/22850546/cant-access-rabbitmq-web-management-interface-after-fresh-install/23790606#23790606 is good, but how can we also set the permission of "guest/guest" same as the "test/test" above? I ran the command rabbitmqctl set_permissions -p / guest "." "." ".*" but still can not login via guest/guest, the solution in the link using test/test is great, but I want to make guest/guest also work. – user3527917 May 21 '14 at 18:04
  • Use proxy setup - https://www.rabbitmq.com/management.html#proxy (btw, you referred to q where I mentioned proxy in answer, actually, we use proxy in production via nginx and it works perfect) – pinepain May 21 '14 at 18:45
  • rabbitmqctl set_permissions -p for guest/guest user doesn't work! – Gabriele Santomaggio May 22 '14 at 08:50

2 Answers2

2

RabbitMQ service can't read the configuration file, this is the problem. So, your configuration file is not loaded.

The path "..AppData\Roaming\RabbitMQ" is valid only if you execute rabbitmq-server.bat from the command prompt and not if you execute a service.

In order to work with Windows Service you have to configure the environment variable RABBITMQ_CONFIG_FILE in windows.

Open Control Panel > System > Advanced > Environment Variables and then add:

RABBITMQ_CONFIG_FILE 
path_your_configuration_file

as:

enter image description here

Then you have to uninstall and re-install rabbitmq and it works.

Please read this discussion

I tried on windows7 with rabbitmq 3.3.1, it works corretly using guest/guest. My configuration file is:

[{, [{loopback_users, []}]}].

Gabriele Santomaggio
  • 21,656
  • 4
  • 52
  • 52
  • I did as you mentioned I still get this message in log file HTTP access denied: user 'USER' - invalid credentials =ERROR REPORT= – Pankaj Nimgade Nov 25 '14 at 15:19
  • Its probably easier just to set the RABBITMQ_BASE environment variable, and then all the other variables will start working (as by default they're based on RABBITMQ_BASE) – Jon Egerton Dec 03 '14 at 09:31
  • Thank you @JonEgerton ! we solved via skype with Pankaj. the error was path_your_configuration_file! He Didn't set the file name. – Gabriele Santomaggio Dec 03 '14 at 09:48
  • My point was that the config file path is implied if you set the base path - its easiest to move the whole RabbitMQ folder to somewhere not in the roaming profile, then point the base path at that. – Jon Egerton Dec 03 '14 at 21:32
0

A combination of the prior post and the comment from Jon Egerton was key to getting my Windows configuration working for the guest account remotely. Here are steps I took:

  1. Set an environment variable: RABBITMQ_BASE (I set mine to c:\RabbitMQData)
  2. Create the directory and create the rabbitmq.config file as explained in the previous post.
  3. Uninstall RabbitMQ (As mentioned already, don’t skip this step. Stopping and starting RabbitMQ won’t do the trick)
  4. Reinstall RabbitMQ and verify the RabbitMQ Server service started.
  5. Verify that the directory specified by RABBITMQ_BASE contains the db and log sub-directories.
  6. Install the RabbitMQ_Management plug-in from the command line.
  7. Verify that you can now logon as the guest account using the host’s IP address or host name.
ewilan
  • 638
  • 6
  • 16