basho/riaknostic — Issue #16: Add -nocookie to escript args
Author: seancribbs
Created: 2011-12-15 23:23:49+00:00
State: open
Labels: bug, core

If you don't specify -setcookie or -nocookie in the VM args, Erlang will try to read/write a .cookie file in the home directory of the current user. Since we connect to the Riak node on-demand, adding -nocookie to the escript args should avoid this problem.

```
[6:16 PM] Vagabond: seancribbs: you could fix the cookie issue by starting up with net_kernel disabled, I think
[6:16 PM] Vagabond: if the nodename is noname@nohost, it skips the cookie file
[6:16 PM] seancribbs: it starts on demand
[6:17 PM] Vagabond: oh
[6:17 PM] Vagabond: -nocookie will do it
[6:17 PM] seancribbs: -nocookie, but then set the cookie later?
[6:17 PM] Vagabond: and then using auth:node_cookie should avoid the file (per node cookies are stored in ETS)
[6:18 PM] seancribbs: Vagabond: opening issue for this
[6:18 PM] Vagabond: oh
[6:18 PM] Vagabond: are you using -setcookie on the command line?
[6:18 PM] seancribbs: no
[6:19 PM] seancribbs: erlang:set_cookie/2
[6:19 PM] Vagabond: if you use -setcookie with some invalid value, you should be safe, as well
[6:19 PM] Vagabond: it only uses the .cookie file when no cookie is specified on the command line
[6:19 PM] seancribbs: hmm
[6:20 PM] Vagabond: yeah
[6:20 PM] seancribbs: that would be easy to add via escript args
[6:20 PM] Vagabond: -setcookie thisisnotarealcookie
[6:20 PM] Vagabond: would avoid it trying to write the file
```