RabbitMQ failed to start, TCP connection succeeded but Erlang distribution failed

https://groups.google.com/forum/#!topic/rabbitmq-users/a6sqrAUX_Fg describes the problem where there is a cookie mismatch on a fresh installation of Rabbit MQ. The easy solution on windows is to synchronize the cookies

Also described here: http://www.rabbitmq.com/clustering.html#erlang-cookie

Ensure cookies are synchronized across 1, 2 and Optionally 3 below

  1. %HOMEDRIVE%%HOMEPATH%\.erlang.cookie (usually C:\Users\%USERNAME%\.erlang.cookie for user %USERNAME%) if both the HOMEDRIVE and HOMEPATH environment variables are set

  2. %USERPROFILE%\.erlang.cookie (usually C:\Users\%USERNAME%\.erlang.cookie) if HOMEDRIVE and HOMEPATH are not both set

  3. For the RabbitMQ Windows service - %USERPROFILE%\.erlang.cookie (usually C:\WINDOWS\system32\config\systemprofile)

The cookie file used by the Windows service account and the user running CLI tools must be synchronized by copying the one from C:\WINDOWS\system32\config\systemprofile folder.


If you are using dedicated drive folder locations for your development tools/software in Windows10(Not the windows default location), one way you can synchronize the erlang cookie as described by https://www.rabbitmq.com/cli.html is by copying the cookie as explained below.

Please note in my case HOMEDRIVE and HOMEPATH environment variables both are not set.


After copying the "C:\Windows\system32\config\systemprofile\.erlang.cookie" to "C:\Users\%USERNAME%\.erlang.cookie" ,

the error "tcp connection succeeded but Erlang distribution failed" is resolved.


Now I am able to use "rabbitmqctl.bat status" command successfully. Hence there is no mandatory need to install in default location to resolve this error as synchronizing cookie will resolve that error.


I have reinstall the RabbitMQ in my computer by using default setup foler

Then check with the command :

rabbitmqctl status

It work now, not the problem of Erlang VM .(Means Er can install at other foler)

It will cause some problem (like this one) that I couldn't find out now if we don't use the RabbitMQ default setup require foler (C:\Program Files\RabbitMQ Server)

If anyone find it out, I hope you can tell me why and how to fix.