<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jun 21, 2010, at 6:20 AM, Emile Joubert wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On 18/06/10 20:34, Russell Borogove wrote:<br><blockquote type="cite">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. <br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">When I try to run rabbitmq, though, it errors out trying to read the cookie from my home dir:<br></blockquote><blockquote type="cite">russell@shard ~: sudo rabbitmqctl -setcookie 123 stop<br></blockquote><blockquote type="cite">{error_logger,{{2010,6,18},{12,32,20}},"Error when reading /Users/russell/.erlang.cookie: eacces",[]}<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Why is it looking for the cookie there?<br></blockquote></div></blockquote><br><blockquote type="cite"><div>Regrettably "-setcookie" is not parameter that is accepted by<br>rabbitmqctl. That is why erlang searches for a cookie file in<br>$HOME/.erlang.cookie .</div></blockquote><br><blockquote type="cite"><div>You can solve this problem by getting $HOME/.erlang.cookie to be<br>readable and containing the correct cookie value.<br></div></blockquote></div><div><br></div><div>Unfortunately, making $HOME/.erlang.cookie readable and running rmq sudo seem to be incompatible.&nbsp;</div><div>This is OS X by the way if it makes a difference:</div><div><br></div><div><div>russell@shard ~: rabbitmq-server</div><div>...</div><div><br></div><div>Only root or rabbitmq should run rabbitmq-server</div><div><br></div></div><div><div>russell@shard ~: sudo rabbitmq-server</div><div>Password:</div><div>{error_logger,{{2010,6,21},{10,51,25}},"Error when reading /Users/russell/.erlang.cookie: eacces",[]}</div><div>...</div><div><br></div><div><div>russell@shard ~: ls -al .erlang.cookie</div><div>-r-------- &nbsp;1 russell &nbsp;staff &nbsp;20 Jun 18 00:00 .erlang.cookie</div><div>russell@shard ~: chmod +r .erlang.cookie&nbsp;</div><div>russell@shard ~: ls -al .erlang.cookie</div><div>-r--r--r-- &nbsp;1 russell &nbsp;staff &nbsp;20 Jun 18 00:00 .erlang.cookie</div><div><br></div><div><div>russell@shard ~: sudo rabbitmq-server</div><div>{error_logger,{{2010,6,21},{10,52,3}},"Cookie file /Users/russell/.erlang.cookie must be accessible by owner only",[]}</div><div>...</div></div></div><div><br></div><div>This is all exceptionally frustrating given that the installation guide says:</div><div><span class="Apple-style-span" style="font-family: Verdana, sans-serif; color: rgb(102, 102, 102); font-size: 12px; line-height: 17px; ">The&nbsp;<code style="color: rgb(0, 139, 139); background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: rgb(246, 252, 176); padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; background-position: initial initial; ">rabbitmq-server</code>,&nbsp;<code style="color: rgb(0, 139, 139); background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: rgb(246, 252, 176); padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; background-position: initial initial; ">rabbitmqctl</code>, 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&nbsp;<code style="color: rgb(0, 139, 139); background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: rgb(246, 252, 176); padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; background-position: initial initial; ">$MACPORTS_PREFIX/var/lib/rabbitmq/.erlang.cookie</code>.</span></div><div><font class="Apple-style-span" color="#666666" face="Verdana, sans-serif"><span class="Apple-style-span" style="line-height: 17px;"><br></span></font></div></div></body></html>