Search code examples
couchdbbigcouch

Bigcouch cluster configuration


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.


Solution

  • 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