[rabbitmq-discuss] rabbitMQ in cloudbees
Tom Reineke
reineke at apt-solutions.de
Wed Mar 19 13:53:02 GMT 2014
Hi,
I'm using the rabbitMQ-integration in cloudbees and I have a very specific question concerning the use of rabbitMQ from many tomcat instances (when only one instance, I don't have these issues).
I'm getting the following stacktrace:
[http-8929-5] ERROR de.MailUtil - An error occured while trying to queue an email: com.rabbitmq.client.ShutdownSignalException: channel error; reason: {#method<channel.close>(reply-code=403, reply-text=ACCESS_REFUSED - access to queue 'foo' in vhost 'bar' refused for user 'bar', class-id=50, method-id=10), null, ""}
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.AMQChannel.privateRpc(AMQChannel.java:216)
at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:118)
at com.rabbitmq.client.impl.ChannelN.queueDeclare(ChannelN.java:768)
at com.rabbitmq.client.impl.ChannelN.queueDeclare(ChannelN.java:61)
...
Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; reason: {#method<channel.close>(reply-code=403, reply-text=ACCESS_REFUSED - access to queue 'foo' in vhost 'bar' refused for user 'bar', class-id=50, method-id=10), null, ""}
at com.rabbitmq.client.impl.ChannelN.asyncShutdown(ChannelN.java:474)
at com.rabbitmq.client.impl.ChannelN.processAsync(ChannelN.java:315)
at com.rabbitmq.client.impl.AMQChannel.handleCompleteInboundCommand(AMQChannel.java:144)
at com.rabbitmq.client.impl.AMQChannel.handleFrame(AMQChannel.java:91)
at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:551)
This seems to have something to do with ACL violation (https://jira.spring.io/browse/AMQP-66)
The relevant code for this error (the rest of the code is all as described in http://www.rabbitmq.com/tutorials/tutorial-two-java.html) is like this:
connection is declared as a static variable and then:
consumerChannel = connection.createChannel();
consumerChannel.queueDeclare(MAIL_QUEUE_NAME, true, false, false, null);
...
prodChannel = connection.createChannel();
prodChannel.queueDeclare(MAIL_QUEUE_NAME, true, false, false, null);
This last line causes the error.
Can you help me there?
Best regards
Tom
More information about the rabbitmq-discuss
mailing list