[rabbitmq-discuss] Unable remotely connect to an Rabbitmq server?

Jerry Kuch jerryk at vmware.com
Mon Sep 19 18:14:09 BST 2011


If you try to telnet to port 5672 on the Rabbit server do you connect to anything?  If you bang out some junk on the keyboard and hit RETURN do you get an AMQP error message on your terminal?  If not, it's possible you have a firewall blocking the AMQP port on the broker, or the remote server isn't running (or isn't running there)...

Best regards,
Jerry

Sent from my iPad.

On Sep 19, 2011, at 5:40 AM, sam_mis <sameek at arosys.com> wrote:

> 
> Hi
> 
> I have install Rabbitmq server on Debian machine. I want to connect this
> machine and publish message on it.other machine will connect with the Debian
> and consume those messages.i am using following code:
> 
>      factory = new ConnectionFactory();
>      logger.info("successfully opening a Connection to an AMQP broker..");
>      factory.setUsername("guest");
>      logger.info("Set the user name...");
>      factory.setPassword("guest");
>      logger.info("Set the password...");
>      factory.setVirtualHost("/");
>      logger.info("Set the virtual host...");
>      factory.setHost("192.168.1.2");  //my Debian server IP Address
>      logger.info("The default host to use for connections..");
>      factory.setPort(5672);
>      logger.info("Set the target port..");
>      connection = factory.newConnection();
> 
> when i tried i got the following error:
> 
> java.net.ConnectException: Connection timed out: connect
>    at java.net.PlainSocketImpl.socketConnect(Native Method)
>    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
>    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
>    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
>    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
>    at java.net.Socket.connect(Socket.java:529)
>    at java.net.Socket.connect(Socket.java:478)
>    at
> com.rabbitmq.client.ConnectionFactory.createFrameHandler(ConnectionFactory.java:342)
>    at
> com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:380)
>    at
> com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:403)
>    at RabbitMQProducer12.producer(RabbitMQProducer12.java:43)
>    at RabbitMQProducer12.main(RabbitMQProducer12.java:78)
> 
> I want to know where the problem.Is this procedure is correct to connect
> remotely to the other system.if it is wrong then what will be the correct
> way to do this? 
> -- 
> View this message in context: http://old.nabble.com/Unable--remotely-connect-to-an-Rabbitmq-server--tp32494635p32494635.html
> Sent from the RabbitMQ mailing list archive at Nabble.com.
> 
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss


More information about the rabbitmq-discuss mailing list