[rabbitmq-discuss] connection timeout exception ..

PATAR, SAGAR sp345s at att.com
Mon Oct 14 16:06:50 BST 2013


I have installed rabbit MQ in my local and was able to access the via browser with the below URL
http://localhost:15672/#/

Tried out with a simple java program ..
       public static void main(String[] args) throws IOException {
                ConnectionFactory factory = new ConnectionFactory();
            factory.setHost("localhost");
            factory.setPort(15672);
            factory.setUsername("guest");
            factory.setPassword("guest");
            Connection connection = factory.newConnection();
            Channel channel = connection.createChannel();

            String message = "Hello World!";
            channel.basicPublish("dl.test.exchange","test", null , message.getBytes());
            System.out.println(" [x] Sent '" + message + "'");

        //    channel.close();
          //  connection.close();

        }

And getting the below exception ... Not sure if there is any tweak I am missing ..


Exception in thread "main" java.io.IOException
       at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:106)
       at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:102)
       at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:353)
       at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:516)
       at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:533)
       at TestSend.main(TestSend.java:16)
Caused by: com.rabbitmq.client.ShutdownSignalException: connection error; reason: java.net.SocketTimeoutException: Timeout during Connection negotiation
       at com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:67)
       at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:33)
       at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:343)
       at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:306)
       ... 3 more
Caused by: java.net.SocketTimeoutException: Timeout during Connection negotiation
       at com.rabbitmq.client.impl.AMQConnection.handleSocketTimeout(AMQConnection.java:552)
       at com.rabbitmq.client.impl.AMQConnection.access$500(AMQConnection.java:53)
       at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:527)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20131014/c171d32a/attachment.htm>


More information about the rabbitmq-discuss mailing list