【发布时间】:2012-07-11 16:48:04
【问题描述】:
RabbitMQ 启动正常,但是铲子插件状态列为“正在启动”。
我正在使用以下 rabbitmq.config:
每个代理都在单独的 AWS 实例上运行。远程服务器是windows 2008 server,本地服务器是Amazon Linux。
[{rabbitmq_shovel, [{shovels, [{scrape_request_shovel, [{sources, [{broker,"amqp://test_user:test_password@localhost"}]}, {destinations, [{broker, "amqp://test_user:test_password@ec2-###-##-###-###.compute-1.amazonaws.com"}]}, {queue, <<"scp_request">>}, {ack_mode, on_confirm}, {publish_properties, [{delivery_mode, 2}]}, {publish_fields, [{exchange, <<"">>}, {routing_key, <<"scp_request">>}]}, {reconnect_delay, 5} ]} ] }] }].
运行以下命令:
sudo rabbitmqctl eval 'rabbit_shovel_status:status().'
返回:
[{scrape_request_shovel,starting,{{2012,7,11},{23,38,47}}}]
根据This question,如果没有在两个代理上正确设置用户,可能会导致这种情况。但是,我已经通过 rabbitmqctl user_add 在两台机器上仔细检查了我是否正确设置了用户——甚至还尝试过使用不同的用户集。
我还在远程主机上对端口 5672 进行了 nmap 扫描,以验证该端口是否已启动并正在运行。
更新 问题没有解决,但这似乎是远程服务器连接问题的结果。我在配置文件中将“reconnect_delay”更改为 0,以避免铲子无限重试连接。强烈建议其他有此问题的人也这样做,因为它允许您从 rabbit_shovel_status 中获取错误消息。就我而言,我收到以下错误:
[{scrape_request_shovel, {terminated, {{badmatch,{error,access_refused}}, [{rabbit_shovel_worker,make_conn_and_chan,1}, {rabbit_shovel_worker,handle_cast,2}, {gen_server2,handle_msg,2}, {proc_lib,init_p_do_apply,3}]}}, {{2012,7,12},{0,4,37}}}]
【问题讨论】:
标签: rabbitmq