ufobat commented on issue #106: Inconsistency for required clustersettings. NODENAME and erlang cookie URL: https://github.com/apache/couchdb-docker/issues/106#issuecomment-421000125 just fyi: thats the discussion on `#couchdb` on freenode describing what happend to me ``` <ufobat> i forgot to set the -setcook in my vm.args file, when i set up a cluster. funny thing that happend, my cluster worked first. but afer a node went down and came back up, my cluster didnt work anymore <ufobat> my question is, why did it work after the initial setup of the cluster? <rnewson> in the absence of that setting, each node will have generated and stored a random value to ~/.erlang.cookie <rnewson> they obviously won't match across the cluster, which is why the cluster doesn't work <ufobat> so it shoud not have worked ever? <rnewson> well, if you used the cluster setup tool we ship, it may have set the cookie for you <rnewson> anyway, it's easy to solve. add the -setcookie line to all nodes with the same value <ufobat> i used fauxton <rnewson> it's nowhere near as annoying to fix as getting -name wrong <ufobat> but there is no cookie set in the vm.args <rnewson> then each node is reading from a file <rnewson> erlang 21 (I think) finally removed that fallback behaviour <ufobat> then another question is raising in my mind: when you need to set both the nodename and the cookie, shoudn't it be possible to be set both in the apache/couchdb-docker image <ufobat> currently you can only set the nodename: https://github.com/apache/couchdb-docker#detailed-configuration <rnewson> I know approximately nothing about docker, sorry. <rnewson> besides an instinct not to use it in production, which probably dates me. <ufobat> well. you can pass the nodename at (the first) startup time, you can not set the erlang cookie. imho that sounds at least strange to me <rnewson> possibly a reflection of the fact that you might care what the names are, but you don't care what the cookie is so long as the nodes agree and that's it a big random value <ufobat> i see. that i missed the point how the instances of the cluster agree on that.. no actually i missed where those instances store it. since it was obiouslie not vm.args <rnewson> ~/.erlang.cookie I think, that's just normal erlang behaviour. <ufobat> ya sorry you wrote it. <ufobat> nope there is no .erlang.cookie on my couchdb clouster instance docker container :( <rnewson> hm <rnewson> is it just a single node cluster? <ufobat> no it consists of 2 nodes <ufobat> and i am absolutly sure it had worked in the beginning because i've created a db on node1 and asked for the db on node2 <ufobat> which was not longer possible after rebooting one node <rnewson> hm <rnewson> nowhere in https://github.com/apache/couchdb-docker do I see the cookie being set, the word cookie isn't even used <ufobat> i am just wondering.. i've got a erlang cookie now, and rebooting a node leads to the expecte behaviour <rnewson> I would add the -setcookie line to vm.args of both nodes and restart them <rnewson> and maybe file a bug against that repo for not writing the cookie into the vm.args for you <ufobat> i just created a issue and asked if that shoudn't be set somewhere: https://github.com/apache/couchdb-docker/issues/106 because i know that there should no more environtment settings be introduced <ufobat> ty for your help again, rnewson :) <rnewson> np ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
