RabbitMQ Erlang发布失败

时间:2016-07-05 06:33:38

标签: windows erlang rabbitmq cluster-computing windows-server-2012-r2

我有两台Windows Server 2012 R2计算机位于其中一个客户端的数据中心。两个服务器都是域加入的。他们都有RabbitMQ 3.6.0。安装在他们身上。 RabbitMQ在两台机器上作为Windows服务运行。我现在试图将这两台机器集中在一起很长时间没有成功。当我尝试将它们聚类时,我总是会收到以下错误。

第一台机器 nodeA 我运行命令' rabbitmqctl join_cluster rabbit @ nodeB'。这就是我得到的:

Clustering node 'rabbit@nodeA' with 'rabbit@nodeB' ...
Error: unable to connect to nodes ['rabbit@nodeB']: nodedown

`DIAGNOSTICS`
===========

attempted to contact: ['rabbit@nodeB']

rabbit@nodeB:
 * connected to epmd (port 4369) on nodeB
 * epmd reports node 'rabbit' running on port 25672
 * TCP connection succeeded but Erlang distribution failed
 * suggestion: hostname mismatch?
 * suggestion: is the cookie set correctly?
 * suggestion: is the Erlang distribution using TLS?

current node details:
- node name: 'rabbitmq-cli-3892@nodeA'
- home dir: C:\Users\mydirectory
- cookie hash: l+SSu57+cRyAQ03AJdwAbQ==

我已经尝试使用Azure虚拟网络中的Azure虚拟机进行此设置,并且我成功地将两个VM集群化,但是我似乎无法将这两个(客户的计算机)连接在一起。

这就是我所做的并确保:

  • 没有任何防火墙阻止连接
  • 为位于C:\ Windows \ system32 \ drivers \ etc
  • 上的主机文件添加了主机名
  • 尝试将主机名称称为FQDN而不向主机文件添加任何内容
  • 尝试使用大写字母和
  • 来引用主机名
  • 在两台计算机上将完全相同的.erlang.cookie复制到C:\ Windows和C:\ Users \ mydirectory。
  • 我已阅读,理解并应用RabbitMQ群集指南https://www.rabbitmq.com/clustering.html
  • 停止,重启,在两台机器上重新安装RabbitMQ。

似乎我无法让它发挥作用。在Azure计算机上,没有加入域的群集可以很好地工作。我真的没有选择......有什么帮助吗?

2 个答案:

答案 0 :(得分:2)

我遇到了同样的问题,你需要安装rabbitmq作为管理员。卸载然后重新安装为管理员,它应该工作正常

答案 1 :(得分:0)

尝试通过远程shell连接到每个RabbitMQ节点,并检查cookie的值是否相同(可以用3种不同的方式设置cookie:.erlang.cookie就是其中之一)。

erl -remsh 'rabbitmq-cli-3892@nodeA' -name 'test@nodeA'
erlang:get_cookie().