For the RabbitMQ server, you can find out this file with follow path C:\Windows\System32\config\systemprofile\AppData\Roaming\RabbitMQ.erlang.cookie
In my case, the content of file is HQYDPYUYZQFES******
For your user account (CLI client), you can find out this file with follow path C:\Users<your_username>.erlang.cookie
In my case, the content of file is OGIHLSSKESAFW******
After that, you need synchronize content of these files. You run Windows PowerShell by Administrator with follow script
$serverCookiePaths = @(
"$env:APPDATA\RabbitMQ\.erlang.cookie",
"$env:WINDIR\system32\config\systemprofile\AppData\Roaming\RabbitMQ\.erlang.cookie"
)
$userCookiePath = "$env:USERPROFILE\.erlang.cookie"
foreach ($path in $serverCookiePaths) {
if (Test-Path $path) {
Copy-Item $path $userCookiePath -Force
Write-Host "content of these files .erlang.cookie synchronized."
break
}
}
rabbitmq-service.bat stop
rabbitmq-service.bat start
rabbitmqctl.bat status
rabbitmq-plugins.bat enable rabbitmq_management