python - rabbitmq not working with java -
I have a rabbit setup on my machine and it has 3 different queues. A Java code is listening to a queue and other queues Sending messages to Python code. Now the Python code is working fine but Java code has problems with AMQ. The following error is coming:
exception in thread "main" com.rabbitmq.client.PossibleAuthenticationFailureException: probably: com.rabbitmq.client.impl.AMQConnection.start authentication failure due to ( AMQConnection.java: 341) on com.rabbitmq.client.ConnectionFactory.newConnection (ConnectionFactory.javaitter90) on com.rabbitmq.client.ConnectionFactory.newConnection (ConnectionFactory.java:612) on com.elki.test.Worker.main (worker Java: 73) Reason: Connection error at com.rabbitmq.client.ShutdownSignalException: com.rabbitmq.utility.ValueOrException.getValue (ValueOrException.java:67) Com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue (BlockingValueOrException.java:33) $ blockingRpcContinuation.getReply at Com.rabbitmq.client.impl.AMQChannel (AMQChannel.java:343) at com.rabbitmq.client.impl.AMQChannel.privateRpc ( AMQChannel.javamore16) at com.rabbitmq.client.impl. AMQChannel.rpc (AMQChannel.java202) T.impl.AMQConnection.start (AMQConnection.java:326) on com.rabbitmq.clien ... 3 caused by: java.io.EOFException on java.io.DataInputStream.readUnsignedByte ( DataInputStream.javathing90) Fremkredfrm (frame com.rabbitmq.client.impl.SocketFrameHandler.readFrame (SocketFrameHandler.java:139) on Com.rabbitmq.client.impl.AMQConnection $ MainLoop.run on com.rabbitmq.client.impl How do I get an AuthenticationFailure
at
Can not be with Java but with Python. Any help appreciated
Code :.
I think this is because you do not set the password and the username on the ConnectionFactory
object, and so it RabbitMQ (Maybe your dragon code is passing through them, and so is it A).
Before calling, factory.newConnection
try adding this code:
factory.setUsername ( UserName); factory.setPassword (password);
instead of userName
and password
as required by your code. / P>
Comments
Post a Comment