Hostname mismatch: node X believes its host is different

Hi All,

I realize that this topic is incredibly popular and I’ve gone through about 10 others talking about the same thing, but nothing they suggest seems to work, so here’s another one…

I have Erlang OTP 20.2 and RabbitMQ 3.7.3 installed on 2 fresh virtual machines running Windows Server 2016 with all latest updates. I copy the cookie file from {machine1} at C:\Windows\System32\config\systemprofile to machine 1 at C:Users{User}. I also copy the cookie file to those same directories on {machine2}. I restart the machines (I probably only need to restart the process, but just to be sure). I triple check to make sure all the cookie files are identical. They are.

I run rabbitmqctl stop_app on {machine1}. I run rabbitmqctl join_cluster rabbit@{machine2}. I get the following output:

Clustering node rabbit@{machine1} with rabbit@{machine2}
Error: unable to perform an operation on node ‘rabbit@{machine2}’. Please see diagnostics information and suggestions below.

Most common reasons for this are:

  • Target node is unreachable (e.g. due to hostname resolution, TCP connection or firewall issues)
  • CLI tool fails to authenticate with the server (e.g. due to CLI tool’s Erlang cookie not matching that of the server)
  • Target node is not running

In addition to the diagnostics info below:

DIAGNOSTICS

attempted to contact: [‘rabbit@{machine2}’]

rabbit@{machine2}:

  • connected to epmd (port 4369) on {machine2}

  • epmd reports node ‘rabbit’ uses port 25672 for inter-node and CLI tool traffic

  • TCP connection succeeded but Erlang distribution failed

  • Hostname mismatch: node “rabbit@{machine2}” believes its host is different. Please ensure that hostnames resolve the same way locally and on “rabbit@{machine2}”

Current node details:

  • node name: ‘rabbitmqcli40@{machine1}’
  • effective user’s home directory: C:\Users{username}
  • Erlang cookie hash: {cookiehash}

I’ve also triple checked that the machine names are correct by running the “hostname” command and also by running "echo %computername%. I’ve also tried connecting in the other direction, and I’ve verified that the cookies have the same hash in the output. Nothing works. I cannot understand what the problem is. Does anybody have any idea what’s going on, or could at least suggest a checklist of things to look for? I’ve read the entire page about clustering. It didn’t help.

This doesn’t sound like an issue with Ansible but something specific to RabbitMQ. You are better off asking those communities for help with this.

Thanks

Jordan

Oops, sorry. I sent this to the wrong place.