问题
I just set my three CouchDB instances as a cluster, this is how I did when I set it up:
Add "-kernel inet-dist-listen-minimum/maxinum" from 9100 to 9200 to the vm.args file. and shut down the firewall
Set three couchdb instanes' using the same admin and passwords.
Change binding address to 0.0.0.0 for both chttpd and httpd section in Fauxton
Choos one of the couchdb instance to set up as cluster then add two nodes (by entering their ip address)
All done
After these steps, I believe the cluster should be set up properly, however, when I ran the command
curl http://username:login@localhost/_membership
on three VMs, only the main one of the three nodes showed it had three members in the cluster( nodes).
This is what it looks like when in http://localhost:9000/_membership (It's a ssh tunnel to connect to the port 5984 from my computer) :
{"all_nodes":["couchdb@localhost"],"cluster_nodes":["couchdb@130.56.252.xxx","couchdb@130.56.252.xxx","couchdb@localhost"]}
And this is what the other instances show:
{"all_nodes":["couchdb@localhost"],"cluster_nodes":["couchdb@localhost"]}
So now I have got two questions:
Did I set the cluster it correctly?
How can I tell if I set it properly?
来源:https://stackoverflow.com/questions/43539427/how-to-verify-a-couchdb-2-0-cluster-setup