[rabbitmq-discuss] RabbitMQ ConnectionFactory newConnection issue
Emile Joubert
emile at rabbitmq.com
Wed Jun 2 17:54:33 BST 2010
Hi Susantha,
I suggest that you use "/" for virtualhost and use "127.0.0.1" for the
host by not specifying them. You are getting authentication errors in
the logfile because the default username and password are not valid for
the virtualhost you are attempting to use.
Regards
Emile
susantha senevirathna wrote:
> Hi Emile,
> First I would like to thanks for your immediate reply.
> I used code has mentioned below.
>
> ConnectionParameters params = new
> ConnectionParameters();
> params.setUsername("guest");
> params.setPassword("guest");
> params.setVirtualHost("127.0.0.1");
> params.setRequestedHeartbeat(0);
> ConnectionFactory factory = new
> ConnectionFactory(params);
> Connection conn = factory.newConnection("127.0.0.1", 5672);
>
> Version :rabbitmq server-1.7.1
>
> Further I have attached the rabbit.log for your reference.I am looking
> forwrd your reply to sort out my issue.However the rabbit-sasl.log
> hasn't any data.
>
> regards,
> Susantha
>
> On Wed, Jun 2, 2010 at 7:43 PM, Emile Joubert <emile at rabbitmq.com
> <mailto:emile at rabbitmq.com>> wrote:
>
>
> Hi Susantha,
>
> A possible cause of this error is authentication failure. The rabbit
> broker has possibly been configured not to accept default
> credentials that the tests and demos expect.
>
> If authentication failure is not the root cause of the problem then
> please let me know the version of the broker and the java client (or
> source revision if compiled from source) you are using. Please also
> attach the relevant parts of rabbit.log and rabbit-sasl.log for the
> period of the failed test.
>
>
> Regards
>
> Emile
>
>
>
> susantha senevirathna wrote:
>
>
> Hi All,
> I have configured RabbitMQ in my windows machine.It is working
> properly.However I try to run rabbitmq "ConsumerMain" sample.It
> has given following error.So i tried to resolve that matter but
> i couldnt achive yet.If you can help me sort out this issue ,I
> will be glad.Please help me.I have mentioned that exception below.
>
>
> Main thread caught exception: java.io.IOException
> java.io.IOException
> at com.rabbitmq.client.impl.
> AMQChannel.wrap(AMQChannel.java:121)
> at
> com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:139)
> at
> com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:260)
> at
> com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:200)
> at
> com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:249)
> at
> com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:263)
> at
> com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:274)
> at
> com.rabbitmq.examples.ConsumerMain.main(ConsumerMain.java:76)
> Caused by: com.rabbitmq.client.ShutdownSignalException:
> connection error; reason: java.io.EOFException
> at
> com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:81)
> at
> com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:47)
> at
> com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:336)
> at
> com.rabbitmq.client.impl.AMQChannel.rpc(AMQChannel.java:209)
> at
> com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:133)
> ... 6 more
> Caused by: java.io.EOFException
> at
> java.io.DataInputStream.readUnsignedByte(DataInputStream.java:273)
> at com.rabbitmq.client.impl.Frame.readFrom(Frame.java:118)
> at
> com.rabbitmq.client.impl.SocketFrameHandler.readFrame(SocketFrameHandler.java:133)
> at
> com.rabbitmq.client.impl.AMQConnection.readFrame(AMQConnection.java:367)
> at
> com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:408)
> Java Result: 1
>
> regards,
> Susantha
>
>
>
>
More information about the rabbitmq-discuss
mailing list