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
```
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
my question is, why did it work after the initial setup of the
cluster?
in the absence of that setting, each node will have generated and
stored a random value to ~/.erlang.cookie
they obviously won't match across the cluster, which is why the
cluster doesn't work
so it shoud not have worked ever?
well, if you used the cluster setup tool we ship, it may have set
the cookie for you
anyway, it's easy to solve. add the -setcookie line to all nodes
with the same value
i used fauxton
it's nowhere near as annoying to fix as getting -name wrong
but there is no cookie set in the vm.args
then each node is reading from a file
erlang 21 (I think) finally removed that fallback behaviour
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
currently you can only set the nodename:
https://github.com/apache/couchdb-docker#detailed-configuration
I know approximately nothing about docker, sorry.
besides an instinct not to use it in production, which probably
dates me.
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
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
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
~/.erlang.cookie I think, that's just normal erlang behaviour.
ya sorry you wrote it.
nope there is no .erlang.cookie on my couchdb clouster instance
docker container :(
hm
is it just a single node cluster?
no it consists of 2 nodes
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
which was not longer possible after rebooting one node
hm
nowhere in https://github.com/apache/couchdb-docker do I see the
cookie being set, the word cookie isn't even used
i am just wondering.. i've got a erlang cookie now, and rebooting a
node leads to the expecte behaviour
I would add the -setcookie line to vm.args of both nodes and
restart them
and maybe file a bug against that repo for not writing the cookie
into the vm.args for you
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
ty for your help again, 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:
us...@infra.apache.org
With regards,
Apache Git Services