我在我们公司有一个环境,它托管RabbitMQ 3.6.1和Erlang 19.3。当我尝试使用RabbitMQ管理UI创建队列时,我得到了下面的错误。我可以创建交易所和虚拟货币。只有当我试图创建错误时,我才得到错误。我尝试编写一个实用程序来使用HTTP API创建队列,但即使这样也失败了。
经过进一步的研究,我偶然发现了这篇文章https://groups.google.com/d/msg/rabbitmq-users/pa1UtLbbvOE/3OlgKgMBAgAJ,其中说Erlang 19与RabbitMQ 3.6.3及更低版本不兼容。有人能证实我的发现吗?
The error I am getting is Got response code 500 with body {"error":"Internal Server Error","reason":"{error,\n {exit,\n {{function_clause,\n [{rabbit_queue_location_validator,module,\n ["random"],\n [{file,"src/rabbit_queue_location_validator.erl"},\n {line,50}]},\n {rabbit_queue_location_validator,validate_strategy,1,\n [{file,"src/rabbit_queue_location_validator.erl"},\n {line,38}]},\n {rabbit_queue_master_location_misc,get_location_mod_by_config,\n 1,\n [{file,"src/rabbit_queue_master_location_misc.erl"},\n {line,88}]},\n {rabbit_queue_master_location_misc,get_location,1,\n [{file,"src/rabbit_queue_master_location_misc.erl"},\n {line,51}]},\n {rabbit_amqqueue,declare,6,\n [{file,"src/rabbit_amqqueue.erl"},{line,300}]},\n {rabbit_channel,handle_method,3,\n [{file,"src/rabbit_channel.erl"},{line,1331}]},\n {rabbit_channel,handle_cast,2,\n [{file,"src/rabbit_channel.erl"},{line,455}]},\n {gen_server2,handle_msg,2,\n [{file,"src/gen_server2.erl"},{line,1049}]}]},\n {gen_server,call,\n [<0.27627.105>,\n {call,\n {'queue.declare',0,<<"Test">>,false,true,false,false,false,\n []},\n none,<0.15368.105>},\n infinity]}},\n [{gen_server,call,3,[{file,"gen_server.erl"},{line,212}]},\n {rabbit_mgmt_util,'-amqp_request/5-fun-0-',4,\n [{file,"src/rabbit_mgmt_util.erl"},{line,579}]},\n {rabbit_mgmt_util,with_channel,5,\n [{file,"src/rabbit_mgmt_util.erl"},{line,598}]},\n {rabbit_mgmt_util,http_to_amqp,5,\n [{file,"src/rabbit_mgmt_util.erl"},{line,526}]},\n {webmachine_resource,resource_call,3,\n [{file,"src/webmachine_resource.erl"},{line,186}]},\n {webmachine_resource,do,3,\n [{file,"src/webmachine_resource.erl"},{line,142}]},\n {webmachine_decision_core,resource_call,1,\n [{file,"src/webmachine_decision_core.erl"},{line,48}]},\n {webmachine_decision_core,accept_helper,1,\n [{file,"src/webmachine_decision_core.erl"},{line,612}]}]}}\n"}
2条答案
按热度按时间3z6pesqy1#
在你的情况下,错误就发生在这里。您是否创建了值为
random
的queue-master-locator
策略?如果是这样,我建议清除策略,看看是否能解决问题。我也建议升级到最新版本(
3.6.12
)。你使用的版本太旧了。0mkxixxg2#
感谢@Luke Bakken为我指出RabbitMQ邮件列表。
我通过将队列主机位置策略的配置更改为<<“random”>>来解决这个问题
请参阅此链接了解更多信息
https://groups.google.com/d/msg/rabbitmq-users/XUbtu4UxbHQ/3y-PvO0oBAAJ