2016-08-26 42 views
0

我正在設置一個RabbitMQ集羣,它的讀數爲docsRabbitMQ clusturing`join_cluster`

設置它時,它通過命令rabbitmqctl join_cluster [email protected]將Machine2和Machine1連接起來。現在什麼是[email protected]

我知道它的[email protected],但是當我啓動這個命令時,它說Error: {cannot_discover_cluster,"Cannot cluster node with itself"}

當我輸入IP而不是主機名時,它說Error: {cannot_discover_cluster,"The nodes provided are either offline or not running"}

我也在/etc/hosts文件中加入了IP rabbit1

我在這裏錯過了什麼?

回答

0

你試圖加入一個自己。

你有兩種可能的錯誤:

  1. 錯誤/etc/hosts(錯誤化名)
  2. 你實際嘗試加入[email protected][email protected]
+0

嗯,我看到的只有一個可能性,那就是選項之一。 '/ etc/hosts'可能會出錯。我只在格式爲'1.2.3.4 rabbit'的文件中添加了另一行。 – PythonEnthusiast

0

兔@ rabbit1,

在這種情況下,rabbit1是rabbitmq服務器所在的計算機/主機的名稱。

您可以使用像Rabbit @ name_of_the_server這樣的服務器名稱來進行羣集。

您還可以看到什麼是當前RabbitMQ的主機名:

rabbitmqctl cluster_status

這會給你我的意思是主機名的名稱。

而且您需要確保在進行集羣之前,您需要停止該計算機上的rabbitmq服務器,然後執行集羣並重新啓動rabbitmq節點。

檢查此鏈接:

https://www.rabbitmq.com/clustering.html