[rabbitmq-discuss] Error running rabbitmqctl

Russell Borogove russell at borogove.org
Mon Jun 21 19:01:14 BST 2010

On Jun 21, 2010, at 6:20 AM, Emile Joubert wrote:

> On 18/06/10 20:34, Russell Borogove wrote:
>> In order to coordinate rabbitmq with alice, I'm setting the cookie for both on the command line with '-setcookie 123'. This seems to work fine. 
>> When I try to run rabbitmq, though, it errors out trying to read the cookie from my home dir:
>> russell at shard ~: sudo rabbitmqctl -setcookie 123 stop
>> {error_logger,{{2010,6,18},{12,32,20}},"Error when reading /Users/russell/.erlang.cookie: eacces",[]}
>> Why is it looking for the cookie there?

> Regrettably "-setcookie" is not parameter that is accepted by
> rabbitmqctl. That is why erlang searches for a cookie file in
> $HOME/.erlang.cookie .

> You can solve this problem by getting $HOME/.erlang.cookie to be
> readable and containing the correct cookie value.

Unfortunately, making $HOME/.erlang.cookie readable and running rmq sudo seem to be incompatible. 
This is OS X by the way if it makes a difference:

russell at shard ~: rabbitmq-server

Only root or rabbitmq should run rabbitmq-server

russell at shard ~: sudo rabbitmq-server
{error_logger,{{2010,6,21},{10,51,25}},"Error when reading /Users/russell/.erlang.cookie: eacces",[]}

russell at shard ~: ls -al .erlang.cookie
-r--------  1 russell  staff  20 Jun 18 00:00 .erlang.cookie
russell at shard ~: chmod +r .erlang.cookie 
russell at shard ~: ls -al .erlang.cookie
-r--r--r--  1 russell  staff  20 Jun 18 00:00 .erlang.cookie

russell at shard ~: sudo rabbitmq-server
{error_logger,{{2010,6,21},{10,52,3}},"Cookie file /Users/russell/.erlang.cookie must be accessible by owner only",[]}

This is all exceptionally frustrating given that the installation guide says:
The rabbitmq-server, rabbitmqctl, and other RabbitMQ-related scripts on the path automatically (through sudo) run in the context of the rabbitmq user so that the Erlang cookie can be read from $MACPORTS_PREFIX/var/lib/rabbitmq/.erlang.cookie.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20100621/5928f899/attachment.htm>

More information about the rabbitmq-discuss mailing list