I lost one node in 'all_nodes'. How can I add it again?
Description
I lost one node in 'all_nodes'. How can I add it again?
What issue happened
I have 4 ubuntu virtual machines, and I use docker to run a CouchDB container with customized local.ini and vm.args.
Everything was perfect. I got a 3 nodes cluster worked well like this:
{"all_nodes":["[email protected]","[email protected]","[email protected]"],
"cluster_nodes":["[email protected]","[email protected]","[email protected]"]}
Last night, one of the machines had something wrong with connection, when I try to ssh connect the machine, it shows 'shell request failed on channel 0'.
So I soft reboot the ubuntu machine, which is one node of the cluster.
Then I found that I lose this node in "all_node"...in other worked well nodes shows like this:
{"all_nodes":["[email protected]","[email protected]"],
"cluster_nodes":["[email protected]","[email protected]","[email protected]"]}
In the losing node view like this:
{"all_nodes":["[email protected]"],
"cluster_nodes":["[email protected]","[email protected]","[email protected]"]}
What measures did I take
-
First, I tried this command to restart my docker container: 'docker restart my_container_id' Then I found it doesn't work. I still cannot get the losing node.
-
I've tried to enable the cluster mode again but the result tells me the cluster is already finished so I cannot add nodes with curl -X POST -H just like the beginning.
-
Then I tried to use
'curl -X PUT "http://user:[email protected]:5986/_nodes/[email protected]" -d {}'to add the node back. However, the system showed'{"error":"conflict","reason":"Document update conflict."}'.
Could you please help me how to add the node back again? Thank you so much for reading this.
My Environment
- CouchDB version used: 2.3.1 using docker
- Operating system and version: ubuntu 18.04 bionic