1

我有两台Windows Server 2012 R2机器位于客户端的数据中心之一。这两台服务器都是域加入的。他们都有RabbitMQ 3.6.0。安装在它们上面。 RabbitMQ在两台机器上都作为Windows服务运行。我试图长时间聚集这两台机器,现在没有成功。当我尝试对它们进行群集时,我总是遇到以下错误。RabbitMQ Erlang分发失败

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

Clustering node '[email protected]' with '[email protected]' ... 
Error: unable to connect to nodes ['[email protected]']: nodedown 

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

attempted to contact: ['[email protected]'] 

[email protected]: 
* 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: '[email protected]' 
- home dir: C:\Users\mydirectory 
- cookie hash: l+SSu57+cRyAQ03AJdwAbQ== 

我已经试过这种设置与Azure的虚拟机Azure的虚拟网络中,我成功地聚集在两个虚拟机,但似乎我无法连接这两个(客户机)在一起。

这是我做了什么,并确保:

  • 没有任何防火墙阻止连接
  • 添加主机名到位于c宿主文件:\ WINDOWS \ SYSTEM32 \ drivers \ etc中
  • 试过指主机名的FQDN,无所添加到hosts文件
  • 试过指主机以大写字母和不
  • 复制完全相同的.erlang.cookie到C的名字:\ Windows和C:\我们ers \ mydirectory在这两台机器上。
  • 我已阅读,理解并应用RabbitMQ集群指南https://www.rabbitmq.com/clustering.html
  • 停止,重新启动,重新安装两台机器上的RabbitMQ。

看来我无法让它工作。在Azure机器上,这不是域加入的群集,效果很好。我真的没有选择...任何帮助?

+0

Erlang Cookie在这些机器上相同? – cantSleepNow

+0

是的,该cookie是相同的,因此是饼干哈希 – user2632919

回答

0

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

erl -remsh '[email protected]' -name '[email protected]' 
erlang:get_cookie(). 
+0

嗨,我在两台机器上获得价值_nocookie_。这很奇怪..当我尝试join_cluster时,我看到cookie哈希是相同的......(请参阅我以前的帖子) – user2632919

2

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