Pika.exceptions.ProbableAuthenticationError when trying to send a message to a remote queue

I am trying to run the RabbitMQ Python tutorial , but with the sender in the virtual machine, the host machine and the receiver and queue on the virtual machine guest machine. So I changed the mentioned send.py code, replacing localhost with 192.168.1.5 . When I run it, I get the following error:

... File "/home/damian/.virtualenvs/kivy_1.9/local/lib/python2.7/site-packages/pika/adapters/base_connection.py", line 153, in _check_state_on_disconnect raise exceptions.ProbableAuthenticationError pika.exceptions.ProbableAuthenticationError 

rabbitmq-server seems to work, because when I stop it, send.py gives me:

 ... File "/home/damian/.virtualenvs/kivy_1.9/local/lib/python2.7/site-packages/pika/adapters/blocking_connection.py", line 301, in _adapter_connect raise exceptions.AMQPConnectionError(error) pika.exceptions.AMQPConnectionError: Connection to 192.168.1.5:5672 failed: [Errno 111] Connection refused 

which makes perfect sense.

How to fix this ProbableAuthenticationError ?

The host machine is Debian 7 with Python 2.7.3 and pika 0.9.14, guest Ubuntu 15.04 with rabbitmq-server 3.4.3-2

+5
source share
1 answer

This is because you are trying to authenticate using the guest username and password remotely. Starting with RabbitMQ 3.3 you need to create a new account to use remotely, and guest/guest can only be used locally.

This is taken from the changelog here .

 25603 prevent access using the default guest/guest credentials except via localhost since (1.0.0) 

You can reconfigure RabbitMQ to allow remote access using the guest account by removing guest from loopback_users, but recommended creating a new user to follow the recommendations.

 [{rabbit, [{loopback_users, []}]}]. 
+12
source

All Articles