0

I am having trouble setting up connection to a remote RabbitMQ server. Basically i have the consumer and the server running on a remote ubuntu machine and want my local machine to act as publisher. I have ssh access to the remote machine. I have read the answer to the following and it seems it is possible RabbitMQ on Amazon EC2 Instance & Locally?

However when i try to connect to the remote host

connection = AMQP.connect(:host => 'hostname') 
puts "Connected to server...."
channel = AMQP::Channel.new(connection)
queue = channel.queue(queue_name, :auto_delete => true)
exchange = channel.default_exchange

I get a 'Detected TCP connection failure'. i ran netstat on the remote server and the port 5672 is listening.

Community
  • 1
  • 1
RDismyname
  • 173
  • 1
  • 1
  • 10

1 Answers1

0

Have you authorized the inbound traffic at port 5672 in the Security Group of your RabbitMQ server?

This may help:

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/authorizing-access-to-an-instance.html

Derek Chan
  • 71
  • 4