I have the following
a) a rabbitmq-server and Pika installed on a Mac Yosrmite machine. I have a rabbutmq.config /usr/local/etc/rabbitmq/rabbitmq.config that I have the statement: {loopback_users, []}
b) On the raspberry pi I have pika installed. I also installed the rabbtmq-server.
The send.py and receive.py, using pika, work locally on both machines.
Traceback (most recent call last): File "send.py", line 5, in '192.168.1.4')) File "/usr/local/lib/python2.7/dist-packages/pika/adapters/blocking_connection.py", line 339, in init self._process_io_for_connection_setup() File "/usr/local/lib/python2.7/dist-packages/pika/adapters/blocking_connection.py", line 374, in _process_io_for_connection_setup self._open_error_result.is_ready) File "/usr/local/lib/python2.7/dist-packages/pika/adapters/blocking_connection.py", line 395, in _flush_output raise exceptions.ConnectionClosed() pika.exceptions.ConnectionClosed
======================================== My firewall is not enabled in the Mac. There is no errors noted in the server log.
The send.py code is:
#!/usr/bin/env python
import pika
connection = pika.BlockingConnection(pika.ConnectionParameters(
'192.168.1.4'))
channel = connection.channel()
channel.queue_declare(queue='hello')
channel.basic_publish(exchange='',
routing_key='hello',
body='Hello World!')
print(" [x] Sent 'Hello World!'")
connection.close()
=========================== I am getting the activity on the port, in both machines: sudo tcpdump port 5672
On RPi 15:09:05.394815 IP raspberrypi.home.40483 > ArnoldBileysMBP.home.amqp: Flags [S], seq 1428528534, win 29200, options [mss 1460,sackOK,TS val 1626318 ecr 0,nop,wscale 6], length 0 15:09:05.460755 IP ArnoldBileysMBP.home.amqp > raspberrypi.home.40483: Flags [R.], seq 0, ack 1428528535, win 0, length 0
On Mac 11:09:05.547322 IP raspberrypi.home.40483 > arnoldbileysmbp.home.amqp: Flags [S], seq 1428528534, win 29200, options [mss 1460,sackOK,TS val 1626318 ecr 0,nop,wscale 6], length 0 11:09:05.547362 IP arnoldbileysmbp.home.amqp > raspberrypi.home.40483: Flags [R.], seq 0, ack 1428528535, win 0, length 0
Any help would be deeply appreciated.
I found the fix at Open port 5672/tcp for access to RabbitMQ on Mac I deleted the "NODE_IP_ADDRESS=127.0.0.1 " statement in the /usr/local/etc/rabbitmq/rabbitmq-env.conf fiile. This was in addition to the above fix I made to the accessing.