I know there have been a million posts about this error and the likely culprit is mismatched .erlang.cookie between the rabbitmq home dir and the server.
However, I am unable to resolve the issue as I will explain below.
I upgraded rabbitmq from 3.11.28 to 3.12.13 running on erlang 25.2 on RHEL8. Rabbitmq came up fine and the rabbitmqctl command worked successfully.
I then proceeded to upgrade erlang from 25.2 to 26.1.3 in preparation to upgrade rabbitmq to 3.13.0 as the minimum erlang version for 3.13.0 is erlang 26.0.
The upgrade of erlang to 26.1.3 was successful and rabbitmq came up fine. I am able to log into the admin console, look at objects such as queues, exchanges, etc and publish messages successfully, etc.
When I run the rabbitmqctl command on the command line however, I continue to get the error in the title.
Ok, let's update the .erlang.cookie in the /home/rabbitmq dir and also the .erlang.cookie in the /var/lib/rabbitmq dir to match what the current node details states is the Erlang cookie hash.
However, every time I run the rabbitmqctl command, it spits out a new Erlang cookie hash, and even though I update the .erlang.cookie's to match this new cookie hash, I continue to get the error with a new cookie hash.
So, why does the rabbitmqctl command continue to spit out new Erlang cookie hashes even though the .erlang.cookie's match between the /home/rabbitmq and /var/lib/rabbitmq dir's?