Search code examples
javapythonrabbitmqamqp

Can't access RabbitMQ server even after changing configuration file?


By following this link

http://www.rabbitmq.com/access-control.html

I changed /etc/rabbitmq/rabbitmq.config and added the line

[{loopback_users, []}]

Now the config file looks like

[{kernel, [{inet_dist_use_interface, {127,0,0,1}}]},
{rabbit, [{loopback_users, []}, {tcp_listeners, [{"127.0.0.1", 5672}]}]},
{rabbitmq_mochiweb, [{listeners, [{mgmt, [{ip, "127.0.0.1"},
                                       {port, 55672}]}]}]}].

Then I restarted my rabbitmq server by executing in following order:

service rabbitmq-server stop
service rabbitmq-server start

Still I am unable to connect to this server remotely (using both Python and Java clients). It gives connection refused error.


Solution

  • In my configuration I only have:

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

    and everything works fine,

    try to remove tcp_listener option.