Rabbitmq-server: rabbitmqctl join_cluster failed : unable to connect to nodes

Created on 25 Apr 2017  路  4Comments  路  Source: rabbitmq/rabbitmq-server

I was trying to build a distributed rabbitmq cluster but it failed. I tried a lot but It does not work at all.

2 machines, whose IPs are 10.60.40.12 10.60.40.11 , and both systems are centos

rabbitmq version: rabbitmq-server-generic-unix-3.6.8

Here is what I did:

1, 'vim /etc/hosts' in each machine :

10.60.40.11 cluster_node1
10.60.40.12 cluster_node2

2, start rabbitmq in 10.60.40.11

3, chmod 777 .erlang.cookie and scp it to 10.60.40.12
after that, reset it to be 400

4, loing 10.60.40.12 and chmod 400 the .erlang.cookie

5,
$./rabbitmq-server -detached //ok
$./rabbitmqctl stop_app //ok
$ ./rabbitmqctl join_cluster rabbit@cluster_node1

Clustering node 'rabbit@st-dz-rs762' with rabbit@cluster_node1 ...
Error: unable to connect to nodes [rabbit@cluster_node1]: nodedown

DIAGNOSTICS

attempted to contact: [rabbit@cluster_node1]

rabbit@cluster_node1:

  • connected to epmd (port 4369) on cluster_node1
  • 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:

The cookie are exactly same and I did not bother myself to TLS at all.

Would you please help me figure out what happened?

I found that many people have encountered this:

https://groups.google.com/forum/#!topic/rabbitmq-discuss/BLyhsxZQLJk

mailing list material

Most helpful comment

I have solved this......

So bad, ./rabbitmqctl join_cluster rabbit@cluster_node1 failed

but

./rabbitmqctl join_cluster rabbit@st-dz-rs761 succeeeeeed !!!!!!

All 4 comments

I have solved this......

So bad, ./rabbitmqctl join_cluster rabbit@cluster_node1 failed

but

./rabbitmqctl join_cluster rabbit@st-dz-rs761 succeeeeeed !!!!!!

Thank you for your time.

Team RabbitMQ uses GitHub issues for specific actionable items engineers can work on. This assumes we have a certain amount of information to work with.

We get at least a dozen of questions through various venues every single day, often quite light on details.
At that rate GitHub issues can very quickly turn into a something impossible to navigate and make sense of even for our team. Because of that questions, investigations, root cause analysis, discussions for potential features are all considered to be mailing list material by our team. Please post this to rabbitmq-users.

Getting all the details necessary to make a conclusion or even form a hypothesis about what's happening can take a fair amount of time. Please help others help you by providing as much relevant information as possible on the list:

  • Server and client versions used
  • Server logs
  • A code example or terminal transcript that can be used to reproduce
  • Full exception stack traces (not a single line message)
  • rabbitmqctl status (and, if possible, rabbitmqctl environment output)
  • Other relevant things about the environment and workload, e.g. a traffic capture

Feel free to edit out hostnames and other potentially sensitive information.

When/if we have enough details and evidence we'd be happy to file a new issue.

Thanks you.

The diagnostics info under TCP connection succeeded but Erlang distribution failed hinted at a possible hostname mismatch.

Was this page helpful?
0 / 5 - 0 ratings