2
votes

I am having trouble starting RabbitMQ since "rabbitmq" user doesn't have permissions in the user (ncoder) home directory (/usr/ncoder). I cannot provide local rabbitmq user write access to ncoder user's home directory as it is a network share. How can I change the location of the cookie file to use /var/lib/rabbitmq/.erlang.cookie instead (where rabbitmq user has access) ?

Error:

ncoder@serverA:/etc/rabbitmq$ sudo -u rabbitmq rabbitmqctl start {error_logger,{{2016,3,19},{3,57,2}},"Error when reading /usr/ncoder/.erlang.cookie: eacces",[]} {error_logger,{{2016,3,19},{3,57,2}},crash_report,[[{initial_call,{auth,init,['Argument__1']}},{pid,<0.20.0>},{registered_name,[]},{error_info,{exit,

1

1 Answers

2
votes

First, rabbitmqctl start isn't a valid command. To start RabbitMQ, you need to use rabbitmq-server.

Now, about the location of the Erlang cookie file, it is imposed by Erlang. In your case, you should put .erlang.cookie in /var/lib/rabbitmq.

If Erlang is unable to find it there, verify the $HOME environment variable points to the actual home directory (so /var/lib/rabbitmq); sudo(1) should set it correctly.

Also, permission on .erlang.cookie must be set to 0400 or 0600: it must not be readable by the group or anyone.