rabbitmqctl错误:无法连接到节点rabbit @ myserver nodedown [英] rabbitmqctl Error: unable to connect to node rabbit@myserver nodedown

查看:3875
本文介绍了rabbitmqctl错误:无法连接到节点rabbit @ myserver nodedown的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows 2008 R2上使用Erlang OTP 17.1运行RabbitMQ v3.3.5。我的开发和质量保证环境是独立的。我的分期和生产环境是集群的。



我发现这个问题经常发生在RabbitMQ服务运行的地方,RabbitMQ管理控制台看到一切,但是当我尝试从命令行运行rabbitmqctl失败,并显示该节点已关闭(在本地和远程服务器上尝试)的错误。



如果我重新启动Windows服务。



我在RabbitMQ错误日志中没有看到错误信息。最后一条消息表示该节点已启动。



以下是我最近在我们的分段Windows群集的节点2上遇到的问题的示例输出:

  PS C:\程序文件(x86)\RabbitMQ Server\rabbitmq_server-3.3.5\sbin> .\rabbitmqctl.bat status 
节点的状态@ @ MYSERVER2 ...
错误:无法连接到节点兔@ MYSERVER2:nodedown

DIAGNOSTICS
= ==========

尝试联系:[兔@ MYSERVER2]

兔@ MYSERVER2:
*连接到epmd(端口4369 )在MYSERVER2
* epmd报告:节点'兔子'不运行
没有其他节点MYSERVER2
*建议:启动节点

当前节点详细信息:
- 节点名称:rabbitmqctl2199771 @ MYSERVER2
- home dir:C:\Users\RabbitMQ
- cookie哈希:mn6OaTX9mS4DnZaiOzg8pA ==
/ pre>

此时,我重新启动RabbitMQ服务,然后重试

  PS C:\程序文件(x86)\RabbitMQ Server\rabbitmq_server-3.3.5\sbin> .\rabbitmqctl.bat status 
节点的状态@ @ MYSERVER2 ...
[{pid,3784},
{running_applications,
[{rabbitmq_management_agent,RabbitMQ管理代理,3.3.5},
{rabbit,RabbitMQ,3.3.5},
{os_mon,​​CPO CXC 138 46,2.2.15},
{mnesia,MNESIA CXC 138 12,4.12.1},
{xmerl,XML解析器,1.3.7},
{sasl,SASL CXC 138 11 ,2.4},
{stdlib,ERTS CXC 138 10,2.1},
{内核,ERTS CXC 138 10,3.0.1}} b $ b {os,{win32,nt}},
{erlang_version,
Erlang / OTP 17 [erts-6.1] [64位] [smp:4:4] [异步线程:$]
{memory,
[{total,35960208},
{connection_procs,2704},
{queue_procs,5408},
{plugins,111936},
{other_proc,13695792},
{mnesia,102296},
{mgmt_db,0},
{msg_index,21816},
{other_ets,884704},
{binary,25776},
{code,16672826},
{ato m,602729},
{other_system,3834221}]},
{alerts,[]},
{listeners,[{clustering,25672,::},{amqp, 5672,::},{amqp,5672,0.0.0.0}]},
{vm_memory_high_watermark,0.4},
{vm_memory_limit,3435787059},
{disk_free_limit,50000000 },
{disk_free,74911649792},
{file_descriptors,
[{total_limit,8092},
{total_used,4},
{sockets_limit,7280}
{sockets_used,2}]},
{processes,[{limit,1048576},{used,139}]},
{run_queue,0},
{ ,5}]
...完成。任何关于什么原因导致这个以及如何自动检测这种情况的想法?/ / code>




$ b

这是在Windows上运行RabbitMQ的问题吗?

解决方案

主机名是不区分大小写的当你试图解决它们。例如, LOCALHOST localhost 是相同的主机。



但是,当Erlang在RabbitMQ的情况下构造节点的名称(例如 rabbit @< hostname> )时,此名称区分大小写。所以 rabbit @ LOCALHOST rabbit @ localhost 是两个不同的节点名称,即使它们在同一主机上运行。 / p>

最近,我们(RabbitMQ团队)发现,在Windows上,为RabbitMQ构造的节点名称不一致。因此,有时候,RabbitMQ开始是因为Windows服务可以命名为 rabbit @ MYHOST rabbitmqctl 将尝试达到 rabbit @ myhost 并失败。



由于RabbitMQ 3.6.0,节点名称应该是一致的。 b $ b

I am running RabbitMQ v3.3.5 with Erlang OTP 17.1 on Windows 2008 R2. My Dev and QA environments are stand-alone. My staging and production environments are clustered.

I am finding this one problem happening often where the RabbitMQ service is running, the RabbitMQ management console is seeing everything, but when I try running rabbitmqctl from the command line it fails with an error saying that the node is down (tried locally and on a remote server).

This problem is resolved if I restart the Windows service.

I see no error message in the RabbitMQ error log. The last message indicated that the node was up.

Below is an example output of the issue that I recently experienced on node 2 of our staging windows cluster:

PS C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.3.5\sbin> .\rabbitmqctl.bat status
Status of node rabbit@MYSERVER2 ...
Error: unable to connect to node rabbit@MYSERVER2: nodedown

DIAGNOSTICS
===========

attempted to contact: [rabbit@MYSERVER2]

rabbit@MYSERVER2:
  * connected to epmd (port 4369) on MYSERVER2
  * epmd reports: node 'rabbit' not running at all
                  no other nodes on MYSERVER2
  * suggestion: start the node

current node details:
- node name: rabbitmqctl2199771@MYSERVER2
- home dir: C:\Users\RabbitMQ
- cookie hash: mn6OaTX9mS4DnZaiOzg8pA==

at this point I restart the RabbitMQ service and then try again

PS C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.3.5\sbin> .\rabbitmqctl.bat status
Status of node rabbit@MYSERVER2...
[{pid,3784},
 {running_applications,
     [{rabbitmq_management_agent,"RabbitMQ Management Agent","3.3.5"},
      {rabbit,"RabbitMQ","3.3.5"},
      {os_mon,"CPO  CXC 138 46","2.2.15"},
      {mnesia,"MNESIA  CXC 138 12","4.12.1"},
      {xmerl,"XML parser","1.3.7"},
      {sasl,"SASL  CXC 138 11","2.4"},
      {stdlib,"ERTS  CXC 138 10","2.1"},
      {kernel,"ERTS  CXC 138 10","3.0.1"}]},
 {os,{win32,nt}},
 {erlang_version,
     "Erlang/OTP 17 [erts-6.1] [64-bit] [smp:4:4] [async-threads:30]\n"},
 {memory,
     [{total,35960208},
      {connection_procs,2704},
      {queue_procs,5408},
      {plugins,111936},
      {other_proc,13695792},
      {mnesia,102296},
      {mgmt_db,0},
      {msg_index,21816},
      {other_ets,884704},
      {binary,25776},
      {code,16672826},
      {atom,602729},
      {other_system,3834221}]},
 {alarms,[]},
 {listeners,[{clustering,25672,"::"},{amqp,5672,"::"},{amqp,5672,"0.0.0.0"}]},
 {vm_memory_high_watermark,0.4},
 {vm_memory_limit,3435787059},
 {disk_free_limit,50000000},
 {disk_free,74911649792},
 {file_descriptors,
     [{total_limit,8092},
      {total_used,4},
      {sockets_limit,7280},
      {sockets_used,2}]},
 {processes,[{limit,1048576},{used,139}]},
 {run_queue,0},
 {uptime,5}]
...done.

Any idea as to what causes this and how to automatically detect the situation?

Is this specifically a problem with running RabbitMQ on Windows?

解决方案

Hostnames are case-insensitives when you are trying to resolve them. For example, LOCALHOST and localhost are the same host.

However, when Erlang constructs the name of a node (eg. rabbit@<hostname> in the case of RabbitMQ), this name is case-sensitive. So rabbit@LOCALHOST and rabbit@localhost are two different node names, even if they run on the same host.

Recently, we (the RabbitMQ team) found out that, on Windows, the node name constructed for RabbitMQ was inconsistent. Therefore, sometimes, RabbitMQ started as a Windows service could be named rabbit@MYHOST but rabbitmqctl would try to reach rabbit@myhost and fail.

Since RabbitMQ 3.6.0, the node name should be consistent.

这篇关于rabbitmqctl错误:无法连接到节点rabbit @ myserver nodedown的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆