سؤال

I'm currently trying bigcouch and I don't quite understand how it identifies nodes within a cluster. For example, the dev cluster consists of 3 nodes listening on ports 15984/15986, 25984/25986 and 35984/35986. When we add nodes to cluster we append documents with id "dev2@127.0.0.1" and "dev3@127.0.0.1" to nodes database (see http://bigcouch.cloudant.com/develop). Now where are the port numbers? How does node 1 know that nodes 2 and 3 listen on the above pots? And related question: if I want to add a node located on a different host to this cluster, how do I do that? Adding "dev1@IP" doesn't seem to work, bigcouch is not able to connect to it.

هل كانت مفيدة؟

المحلول 2

The problem has been resolved -- it appears that two bigcouch nodes must have the same magic cookie in order to communicate successfully. When a dev cluster is installed, this magic cookie is generated automatically, so it is not possible to add nodes from another cluster unless magic cookies are manually synchronised. It is neccesary to add the following line to /opt/bigcouch/rel/*/etc/vm.args:

-setcookie any_string

نصائح أخرى

Bigcouch nodes talk to each other using distributed erlang primitives (not http). The node names are of the form 'name@host' which is sufficient for the nodes to interact. Specifically, they contact the epmd daemon (http://www.erlang.org/doc/man/epmd.html) on a well-known port on remote hosts.

http://www.erlang.org/doc/reference_manual/distributed.html

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top