连接时Rabbitmq通道错误

问题描述 投票:1回答:1

我正在使用srv0,应用程序通常连接到rabbitmq

我已经将srv0克隆到srv1,只需通过自定义ip登陆(用于测试目的)

现在srv1上的客户端应用程序无法连接到兔子(Catalina.out):

Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>(reply-code=404, reply-text=NOT_FOUND - no queue 'wrs-checklist-delete' in vhost '/', class-id=50, method-id=10)

/var/log/rabbitmq/*.log答案

=ERROR REPORT==== 24-Nov-2016::17:54:19 === Channel error on connection <0.344.0> (127.0.0.1:16899 -> 127.0.0.1:5672, vhost: '/', user: 'guest'), channel 1: {amqp_error,not_found,"no queue 'wrs-checklist-delete' in vhost '/'", 'queue.declare'}

检查:

  • $ HOSTNAME返回srv1的主机

我应该从哪里开始意识到这个问题?

rabbitmq rabbitmqctl
1个回答
1
投票

我没有队列,./rabbitmqadmin list queues返回〜连接错误

我已经停止了兔子服务器并删除了/var/lib/rabbitmq/mnesia

然后启动了Rabbit-server并重新创建了/var/lib/rabbitmq/mnesia

之后创建了队列: ./rabbitmqadmin declare exchange --vhost=/ name=queuename -create type=direct ./rabbitmqadmin declare queue --vhost=/ name= ./rabbitmqadmin --vhost=/ declare binding source="queuename" destination_type="queue" destination="queuename"

那就好了

© www.soinside.com 2019 - 2024. All rights reserved.