couchdb icon indicating copy to clipboard operation
couchdb copied to clipboard

I lost one node in 'all_nodes'. How can I add it again?

Open ASCII-768977 opened this issue 6 years ago • 1 comments

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

  1. 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.

  2. 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.

  3. 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

ASCII-768977 avatar May 04 '20 04:05 ASCII-768977

Hi there,

This is not a CouchDB bug. GitHub is for actual CouchDB bugs only.

If you are looking for general support with using CouchDB, please try one of these other options:

  • The user mailing list. Signup instructions are here
  • The Slack/IRC chat room. Joining instructions are here

wohali avatar May 04 '20 04:05 wohali