Node is not in primary or recovering state

The following is my error:

Attempt 3/3 to GET http://svlpcryosparc01.stjude.org:39402/startup failed with exception: 500 Server 
Error: INTERNAL SERVER ERROR for url: http://svlpcryosparc01.stjude.org:39402/startup
Failed to GET http://svlpcryosparc01.stjude.org:39402/startup

When I tried reconfiguring the replica set I got the following error message:

rs.reconfig({ "_id": "meteor", "members": [ { "_id": 0, "host": "localhost:39400" } ] })
{
"ok" : 0,
"errmsg" : "replSetReconfig should only be run on PRIMARY, but my state is REMOVED; use the 
\"force\" argument to override",
"code" : 10107,
"codeName" : "NotMaster"
}

rs.reconfig({ "_id": "meteor", "members": [ { "_id": 0, "host": "svlpcryosparc01.stjude.org:39400"}]},{ 
"force" : true })
{
"ok" : 0,
"errmsg" : "No host described in new configuration 48847 for replica set meteor maps to this 
node",
"code" : 103,
"codeName" : "NewReplicaSetConfigurationIncompatible"
}

Please let me know how I can solve this issue. I’m trying to reuse an older database with a newer installation on a new host and change the ports to 39400-39410 because I’m running multiple instances on the same host. Thanks

Hi @shockacone, assuming you are running the latest cryoSPARC v3.2, I’d suggest installing the latest patch. The patch includes commands cryosparcm checkdb and cryosparcm fixdbport to automatically reconfigure the base port. However the cryosparcm patch command requires a running command server, which you don’t have yet.

Important! If you’re not running v3.2.0 do not install these patches. Check the contents of cryosparc_master/version to verify. If the contents are not v3.2.0, re-install first

Here’s how to download and install the patch manually from the command line (substitute /path/to/cryosparc_master and /path/to/cryosparc_worker to with the locations on disk where you installed the cryosparc_master and cryosparc_worker components):

# Stop cryoSPARC
cryosparcm stop

# Manually install the master patch component
cd /path/to/cryosparc_master
curl -L "https://get.cryosparc.com/patch_get/v3.2.0+211012/master" -o cryosparc_master_patch.tar.gz
tar -xzf cryosparc_master_patch.tar.gz --overwrite --strip-components=1 --directory ./

Then do this for each machine that hosts the cryosparc_worker component. If the workers do not have internet access, you may also run the curl command on a machine that does and then use scp to copy the resulting cryosparc_worker_patch.tar.gz into the cryosparc_worker directory on each machine.

# Manually install the worker patch component
cd /path/to/cryosparc_worker
curl -L "https://get.cryosparc.com/patch_get/v3.2.0+211012/worker" -o cryosparc_worker_patch.tar.gz
./bin/cryosparcw patch

Start cryoSPARC’s database component:

cryosparcm start database

Then run the database fix:

cryosparcm fixdbport

And finally restart cryoSPARC and check that everything is working as expected:

cryosparcm restart
cryosparcm checkdb

If you’re still getting an error when cryoSPARC starts up, send me the output of these two commands:

cryosparcm log database | tail -n 100
cryosparcm log command_core | tail -n 100

Let me know how that goes.

1 Like

Hi @nfrasser apologies for the delay. I’m quite sure this worked in my case. Thanks.

1 Like