Problem was with the firewall. The port for AMQP was closed.