RabbitMQ: Default Erlang Cookie File (rabbitmqctl)

Hello,

I've installed rabbitmq using pkg and enabled / started the service. However, when I try to use rabbitmqctl, I got an error. Upon searching the root cause of the issue, I realized that it's caused by cookie mismatch (.erlang.cookie). This cookie file is located under /var/db/rabbitmq/.erlang.cookie, however rabbitmqctl cannot make use of it by default.

To solve the problem, I had to copy .erlang.cookie file to /root and run rabbitmqctl.

On most Linux systems, you do not have to do this operation. After installing RabbitMQ, you can directly use rabbitmqctl without further operation. Is this the intended behavior? I wanted to ask on forums before filing a bug report. I'm sure there is a reason for it.

Thank you,
Eren

Code:
root@freebsd ~ # rabbitmqctl list_queues
Error: unable to perform an operation on node 'rabbit@freebsd'. 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:

 * See the CLI, clustering and networking guides on https://rabbitmq.com/documentation.html to learn more
 * Consult server logs on node rabbit@freebsd
 * If target node is configured to use long node names, don't forget to use --longnames with CLI tools
 
Back
Top