windows RabbitMQ 有 Nodedown 错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/28258392/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 18:57:12  来源:igfitidea点击:

RabbitMQ has Nodedown Error

windowserlangrabbitmq

提问by Brent Arias

On a Windows 7 Enterprise machine, I made a fresh install of Erlang 17.4 and RabbitMQ 3.4.3 x64. The installation was successful and uneventful.

在 Windows 7 Enterprise 机器上,我全新安装了 Erlang 17.4 和 RabbitMQ 3.4.3 x64。安装成功且顺利。

I have not yet tried to create my first queue or exchange, but I already see trouble. This problem is similar to another SO post, but that other post appears to involve clustering, which I don't have. Furthermore, that other poster can circumvent his issue by restarting the RabbitMQ service; that approach does not work for me.

我还没有尝试创建我的第一个队列或交换,但我已经看到了问题。这个问题类似于另一个 SO post,但另一个帖子似乎涉及聚类,而我没有。此外,其他发布者可以通过重新启动 RabbitMQ 服务来规避他的问题;这种方法对我不起作用。

My "nodedown" problem is evident at the RabbitMQ command prompt:

我的“nodedown”问题在 RabbitMQ 命令提示符下很明显:

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

DIAGNOSTICS

attempted to contact: [rabbit@TPAJ05421843]

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

current node details:
- node name: 'rabbitmqctl-19884@TPAJ05421843'
- home dir: H:\
- cookie hash: PD4QQCYrf0TME9vIko3Xuw==

C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.4.3\sbin>rabbitmqctl status 节点 rabbit@TPAJ05421843 的状态 ...
错误:无法连接到节点 rabbit@TPAJ05421843: nodedown

诊断

试图联系:[rabbit@TPAJ05421843]

rabbit@TPAJ05421843:
* 连接到 TPAJ05421843 上的 epmd(端口 4369)
* epmd 报告:节点“rabbit”未
在 TPAJ05421843上的所有其他节点上运行:['RabbitMQ']
* 建议:启动节点

当前节点详细信息:
- 节点名称:'rabbitmqctl-19884@TPAJ05421843'
- 主目录:H:\
- cookie 哈希:PD4QQCYrf0TME9vIko3Xuw==

Based on the above, I chose to check the status of the node explicitly named 'RabbitMQ'. I get this:

基于上述,我选择检查显式命名为“RabbitMQ”的节点的状态。我明白了:

C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.4.3\sbin>rabbitmqctl -n RabbitMQ status
Status of node 'RabbitMQ@TPAJ05421843' ...
Error: unable to connect to node 'RabbitMQ@TPAJ05421843': nodedown

DIAGNOSTICS

attempted to contact: ['RabbitMQ@TPAJ05421843']

RabbitMQ@TPAJ05421843:
* connected to epmd (port 4369) on TPAJ05421843
* epmd reports node 'RabbitMQ' running on port 59301
* TCP connection succeeded but Erlang distribution failed
* suggestion: hostname mismatch?
* suggestion: is the cookie set correctly?

current node details:
- node name: 'rabbitmqctl-23076@TPAJ05421843'
- home dir: H:\
- cookie hash: PD4QQCYrf0TME9vIko3Xuw==

C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.4.3\sbin>rabbitmqctl -n RabbitMQ status
节点'RabbitMQ@TPAJ05421843'的状态......
错误:无法连接到节点'RabbitMQ@TPAJ05421843':nodedown

诊断

试图联系:['RabbitMQ@TPAJ05421843']

RabbitMQ@TPAJ05421843:
* 连接到 TPAJ05421843 上的 epmd(端口 4369)
* epmd 报告在端口 59301 上运行的节点“RabbitMQ”
* TCP 连接成功但 Erlang 分发失败
* 建议:主机名不匹配?
* 建议:cookie 设置正确吗?

当前节点详细信息:
- 节点名称:'rabbitmqctl-23076@TPAJ05421843'
- 主目录:H:\
- cookie 哈希:PD4QQCYrf0TME9vIko3Xuw==

Ok, this is barely better since at least it acknowledges 'RabbitMQ' running on port 59301. But what the heck could it mean that "Erlang distribution failed"?

好吧,这几乎没有好转,因为至少它承认“RabbitMQ”在端口 59301 上运行。但是“Erlang 分发失败”到底意味着什么?

When I try to research this topic, I found articles saying "be sure you have matched cookies." Based on that I found this article, which claims the "cookie mismatch" does not pertain to me, because I have not created (nor intend to create) a RabbitMQ cluster.

当我尝试研究这个主题时,我发现一些文章说“确保你有匹配的 cookie”。基于,我发现了这篇文章,其中声称“cookie 不匹配”与我无关,因为我还没有创建(也不打算创建)RabbitMQ 集群。

What should I do?

我该怎么办?

回答by Jerdev

I had this same problem today. There were no cookie or firewall problems and windows reported that the service was running successfully. This is what finally fixed it:

我今天遇到了同样的问题。没有 cookie 或防火墙问题,windows 报告服务运行成功。这是最终修复它的原因:

  1. Run RabbitMQ sbin command prompt as administrator.
  2. Run "rabbitmq-service remove"
  3. Run "rabbitmq-service install"
  1. 以管理员身份运行 RabbitMQ sbin 命令提示符。
  2. 运行“rabbitmq-service remove”
  3. 运行“rabbitmq-service install”

For some reason the service set up by the installer did not configure several registry entries. Running this set them correctly and allowed the service to run.

由于某种原因,安装程序设置的服务没有配置多个注册表项。运行此设置正确并允许服务运行。

One thing I noticed was that before I did this, there was no description of the service in the Windows Services view. After installing with the rabbitmq-service command, the description was visible. This might be a quick indicator if you are having the same problem.

我注意到的一件事是,在我执行此操作之前,Windows 服务视图中没有对该服务的描述。使用 rabbitmq-service 命令安装后,描述可见。如果您遇到同样的问题,这可能是一个快速指标。

回答by sh87

As @eddyP commented, I had two different Erlang cookie files:

正如@eddyP 评论的那样,我有两个不同的 Erlang cookie 文件:

  • A servercookie file, located at $env:WINDIR\system32\config\systemprofile\.erlang.cookie(prior to Erlang 20.2 it was located at $env:WINDIR\.erlang.cookie).
  • A clientcookie file, located at $env:USERPROFILE\.erlang.cookie.
  • 一个服务器cookie 文件,位于$env:WINDIR\system32\config\systemprofile\.erlang.cookie(在 Erlang 20.2 之前,它位于$env:WINDIR\.erlang.cookie)。
  • 一个客户端的cookie文件,位于$env:USERPROFILE\.erlang.cookie

Copying the server cookie file over the client one, so that both files were the same, fixed the problem for me.

将服务器 cookie 文件复制到客户端,使两个文件相同,为我解决了问题。

For further details, see "How Nodes (and CLI tools) Authenticate to Each Other: the Erlang Cookie".

有关更多详细信息,请参阅“节点(和 CLI 工具)如何相互验证:Erlang Cookie”

回答by Andrei Karcheuski

From RabbitMQ Command Prompt sbin (run as administrator) execute this command:

从 RabbitMQ 命令提示符 sbin(以管理员身份运行)执行以下命令:

rabbitmq-server restart 

回答by nguyên

In Windown, For some reason delete all folder in c:\Users\xxx\AppData\Roaming\RabbitMQ\db\(xxxis your username) then flow @Jerdev answer and

在Windown中,出于某种原因删除c:\Users\xxx\AppData\Roaming\RabbitMQ\db\xxx是您的用户名)中的所有文件夹,然后流@Jerdev回答和

  • start rabbitmq net start rabbitmq

  • check rabbitmq service rabbitmqctl status

  • 启动 RabbitMQ net start rabbitmq

  • 检查rabbitmq服务 rabbitmqctl status

回答by Michael Klishin

The same question on the RabbitMQ mailing list: https://groups.google.com/forum/#!topic/rabbitmq-users/0s1ExFhl4hM.

RabbitMQ 邮件列表上的相同问题:https://groups.google.com/forum/#! topic/rabbitmq-users/0s1ExFhl4hM 。

The Erlang cookie is used by rabbitmqctlas well as server nodes, so it may need being taken care of (placed in the correct location). See "Installing as a non-administrator user leaves .erlang.cookie in the wrong place" on Windows quirks.

Erlang cookie 由rabbitmqctl服务器节点和服务器节点使用,因此可能需要对其进行处理(放置在正确的位置)。请参阅Windows quirks上的“以非管理员用户身份安装会将 .erlang.cookie 留在错误的位置” 。

回答by ccassob

I resolve my problem doing this in Windows 10.

我解决了在 Windows 10 中执行此操作的问题。

  1. Execute RabbitMQ Command Prompt (sbin dir) as administrator.
  2. Execute "rabbitmq-service remove" in (RabbitMQ Command Prompt).
  3. Execute %AppData% in Run Dialog Box of Windows.
  4. Delete all files in RabbitMQ folder.
  5. Execute "rabbitmq-service install" in (RabbitMQ Command Prompt).
  6. Execute "rabbitmqctl start_app" in (RabbitMQ Command Prompt).
  1. 以管理员身份执行 RabbitMQ 命令提示符(sbin dir)。
  2. 在(RabbitMQ 命令提示符)中执行“rabbitmq-service remove”。
  3. 在 Windows 的运行对话框中执行 %AppData%。
  4. 删除RabbitMQ文件夹中的所有文件。
  5. 在(RabbitMQ 命令提示符)中执行“rabbitmq-service install”。
  6. 在(RabbitMQ 命令提示符)中执行“rabbitmqctl start_app”。

回答by Maelmori

If you come here looking for a linux answer for the same error message, try

如果您来这里寻找相同错误消息的 linux 答案,请尝试

sudo service rabbitmq-server start

(which is not a blocking command)

(这不是阻塞命令)

回答by Happy Dhingra

Just do the following:

只需执行以下操作:

  1. Uninstall rabbitmq and erlang.
  2. delete the rabbitmq folder existing in your appdata (if you dont know the appdata location, just type echo %AppData%in the command prompt)
  3. Then install erlang first and then rabbitmq.
  4. After installing, enable the management plugin using below command:

    rabbitmq-plugins enable rabbitmq_management

  1. 卸载rabbitmq和erlang。
  2. 删除 appdata 中存在的 rabbitmq 文件夹(如果您不知道 appdata 位置,只需在命令提示符中键入echo %AppData%
  3. 然后先安装erlang,再安装rabbitmq。
  4. 安装后,使用以下命令启用管理插件:

    rabbitmq-plugins 启用 rabbitmq_management

回答by Steve Ritchie

For me the cookies didnt match, like the other comments but the locations was in a different path for those having the same issue as me C:\Windows\System32\config\systemprofile

对我来说,cookie 不匹配,就像其他评论一样,但对于那些与我有相同问题的人来说,位置在不同的路径中 C:\Windows\System32\config\systemprofile

回答by Dmitry Sazonov

That is happening because rabbit MQ is not being installed correctly on Windows (and this error is misleading!). So to solve it do the following:

发生这种情况是因为在 Windows 上未正确安装 rabbit MQ(并且此错误具有误导性!)。所以要解决它,请执行以下操作:

  1. type "cmd" in Cortana search or in "Run" for older version of Windows
  2. right click on in and choose "Run as Administrator"
  3. go to rabbit's sbin folder (cd "C:\Program Files\RabbitMQ Server\rabbitmq_server-3.7.4\sbin")
  4. run: rabbitmq-service remove
  5. run: rabbitmq-service install
  1. 在 Cortana 搜索或旧版 Windows 的“运行”中输入“cmd”
  2. 右键单击并选择“以管理员身份运行”
  3. 转到 rabbit 的 sbin 文件夹(cd "C:\Program Files\RabbitMQ Server\rabbitmq_server-3.7.4\sbin")
  4. 运行:rabbitmq-service remove
  5. 运行:rabbitmq-service install

now you can run 6. rabbitmq-plugins enable rabbitmq_management 7. rabbitmq-service start 8. and, finally, run: start http://localhost:156729. log on as user "guest" with password: "guest" and that's it. Happy Rabbiting!

现在你可以运行 6. rabbitmq-plugins enable rabbitmq_management 7. rabbitmq-service start 8. 最后,运行:start http://localhost:156729. 以用户“guest”登录,密码:“guest”它。兔兔快乐!