Error to move CryoSPARC Databases

Hi,

I got the following error when I tried to move the CryoSPARC DataBase to a new machine:

$ cryosparcm restart
Starting cryoSPARC System master process…
CryoSPARC is not already running.
configuring database
Traceback (most recent call last):
File “”, line 1, in
File “/data/SOFTWARE/CryoSPARC00/cryosparc_master/cryosparc_compute/database_management.py”, line 49, in configure_mongo
initialize_replica_set()
File “/data/SOFTWARE/CryoSPARC00/cryosparc_master/cryosparc_compute/database_management.py”, line 89, in initialize_replica_set
admin_db.command(‘replSetGetStatus’) # check replset
File “/data/SOFTWARE/CryoSPARC00/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.8/site-packages/pymongo/database.py”, line 828, in command
return self._command(
File “/data/SOFTWARE/CryoSPARC00/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.8/site-packages/pymongo/database.py”, line 703, in _command
return sock_info.command(
File “/data/SOFTWARE/CryoSPARC00/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.8/site-packages/pymongo/pool.py”, line 740, in command
return command(
File “/data/SOFTWARE/CryoSPARC00/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.8/site-packages/pymongo/network.py”, line 177, in command
helpers._check_command_response(
File “/data/SOFTWARE/CryoSPARC00/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.8/site-packages/pymongo/helpers.py”, line 180, in _check_command_response
raise OperationFailure(errmsg, code, response, max_wire_version)
pymongo.errors.OperationFailure: Our replica set config is invalid or we are not a member of it, full error: {‘state’: 10, ‘stateStr’: ‘REMOVED’, ‘uptime’: 3, ‘optime’: {‘ts’: Timestamp(1706459868, 34), ‘t’: 188}, ‘optimeDate’: datetime.datetime(2024, 1, 28, 16, 37, 48), ‘lastHeartbeatMessage’: ‘’, ‘syncingTo’: ‘’, ‘syncSourceHost’: ‘’, ‘syncSourceId’: -1, ‘infoMessage’: ‘’, ‘ok’: 0.0, ‘errmsg’: ‘Our replica set config is invalid or we are not a member of it’, ‘code’: 93, ‘codeName’: ‘InvalidReplicaSetConfig’, ‘operationTime’: Timestamp(1706459868, 34), ‘$clusterTime’: {‘clusterTime’: Timestamp(1706459868, 34), ‘signature’: {‘hash’: b’\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00’, ‘keyId’: 0}}}
[2024-01-29T01:14:29+08:00] Error configuring database. Most recent database log lines:
2024-01-29T01:14:29.193+0800 I CONTROL [signalProcessingThread] got signal 15 (Terminated), will terminate after current cmd ends
2024-01-29T01:14:29.193+0800 I NETWORK [signalProcessingThread] shutdown: going to close listening sockets…
2024-01-29T01:14:29.193+0800 I NETWORK [signalProcessingThread] removing socket file: /tmp/mongodb-49001.sock
2024-01-29T01:14:29.194+0800 I REPL [signalProcessingThread] shutting down replication subsystems
2024-01-29T01:14:29.194+0800 I FTDC [signalProcessingThread] Shutting down full-time diagnostic data capture
2024-01-29T01:14:29.200+0800 I STORAGE [WTOplogJournalThread] oplog journal thread loop shutting down
2024-01-29T01:14:29.200+0800 I STORAGE [signalProcessingThread] WiredTigerKVEngine shutting down
2024-01-29T01:14:29.253+0800 I STORAGE [signalProcessingThread] shutdown: removing fs lock…
2024-01-29T01:14:29.253+0800 I CONTROL [signalProcessingThread] now exiting
2024-01-29T01:14:29.253+0800 I CONTROL [signalProcessingThread] shutting down with code:0

More information about the steps:

  1. On the old machine, I stopped CryoSPARC v4.2.1 by “cryosparcm stop”
  2. I copied the DataBase to the new mahine using “rsync -r --links /Old…/CryoSPARC00_database/* /New…/CryoSPARC00_DataBase”
  3. I installed CryoSPARC v4.4.1 on the new machine using the same LICENSE_ID as that used on the old machine, and told the software the location of the database (copied from the old machine)
  4. when I ran “cryosparcm start” on the new machine I got the above errors.

This seems to be a problem related to mongodb replica set, but I do not know how to fix it.
Any suggestions?

Thanks a lot!

Have you tried to install 4.2.1 with the new db location? Then you can update the cs/db. I have a feeling there were some db migrations you need from 4.2.1 → 4.4.1.

Thanks a lot!
I have tried installing v4.2.1 on the new machine. Unforrtunately, the problem remains the same.

$ cryosparcm start
Starting cryoSPARC System master process…
CryoSPARC is not already running.
configuring database
Traceback (most recent call last):
File “”, line 1, in
File “/data/SOFTWARE/CryoSPARC00/cryosparc_master/cryosparc_compute/database_management.py”, line 48, in configure_mongo
initialize_replica_set()
File “/data/SOFTWARE/CryoSPARC00/cryosparc_master/cryosparc_compute/database_management.py”, line 88, in initialize_replica_set
admin_db.command(‘replSetGetStatus’) # check replset
File “/data/SOFTWARE/CryoSPARC00/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.8/site-packages/pymongo/database.py”, line 828, in command
return self._command(
File “/data/SOFTWARE/CryoSPARC00/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.8/site-packages/pymongo/database.py”, line 703, in _command
return sock_info.command(
File “/data/SOFTWARE/CryoSPARC00/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.8/site-packages/pymongo/pool.py”, line 740, in command
return command(
File “/data/SOFTWARE/CryoSPARC00/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.8/site-packages/pymongo/network.py”, line 177, in command
helpers._check_command_response(
File “/data/SOFTWARE/CryoSPARC00/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.8/site-packages/pymongo/helpers.py”, line 180, in _check_command_response
raise OperationFailure(errmsg, code, response, max_wire_version)
pymongo.errors.OperationFailure: Our replica set config is invalid or we are not a member of it, full error: {‘state’: 10, ‘stateStr’: ‘REMOVED’, ‘uptime’: 3, ‘optime’: {‘ts’: Timestamp(1706459868, 34), ‘t’: 188}, ‘optimeDate’: datetime.datetime(2024, 1, 28, 16, 37, 48), ‘lastHeartbeatMessage’: ‘’, ‘syncingTo’: ‘’, ‘syncSourceHost’: ‘’, ‘syncSourceId’: -1, ‘infoMessage’: ‘’, ‘ok’: 0.0, ‘errmsg’: ‘Our replica set config is invalid or we are not a member of it’, ‘code’: 93, ‘codeName’: ‘InvalidReplicaSetConfig’, ‘operationTime’: Timestamp(1706459868, 34), ‘$clusterTime’: {‘clusterTime’: Timestamp(1706459868, 34), ‘signature’: {‘hash’: b’\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00’, ‘keyId’: 0}}}
[2024-01-29T09:07:18+08:00] Error configuring database. Most recent database log lines:
2024-01-29T09:07:17.927+0800 I CONTROL [signalProcessingThread] got signal 15 (Terminated), will terminate after current cmd ends
2024-01-29T09:07:17.927+0800 I NETWORK [signalProcessingThread] shutdown: going to close listening sockets…
2024-01-29T09:07:17.927+0800 I NETWORK [signalProcessingThread] removing socket file: /tmp/mongodb-49001.sock
2024-01-29T09:07:17.927+0800 I REPL [signalProcessingThread] shutting down replication subsystems
2024-01-29T09:07:17.928+0800 I FTDC [signalProcessingThread] Shutting down full-time diagnostic data capture
2024-01-29T09:07:17.933+0800 I STORAGE [WTOplogJournalThread] oplog journal thread loop shutting down
2024-01-29T09:07:17.933+0800 I STORAGE [signalProcessingThread] WiredTigerKVEngine shutting down
2024-01-29T09:07:17.940+0800 I STORAGE [signalProcessingThread] shutdown: removing fs lock…
2024-01-29T09:07:17.940+0800 I CONTROL [signalProcessingThread] now exiting
2024-01-29T09:07:17.940+0800 I CONTROL [signalProcessingThread] shutting down with code:0

Please can you
post any error messages from the database log that precede

2024-01-29T09:07:17.927+0800 I CONTROL [signalProcessingThread] got signal 15 (Terminated), will terminate after current cmd ends

For this purpose, you may run
cryosparcm log database

[Edited: Question changed. The original question concerned matching port numbers between the old and new installation].

By the way, if runing “cryosparcm stop” and then “cryosparcm status”, I got the following error message:

$ cryosparcm status

CryoSPARC System master node installed at
/data/SOFTWARE/CryoSPARC00/cryosparc_master
Current cryoSPARC version: v4.2.1

CryoSPARC process status:

app STOPPED Not started
app_api STOPPED Not started
app_api_dev STOPPED Not started
app_legacy STOPPED Not started
app_legacy_dev STOPPED Not started
command_core STOPPED Not started
command_rtp STOPPED Not started
command_vis STOPPED Not started
database STOPPED Not started


*** CommandClient: (http://master01:49002/api) URL Error [Errno 111] Connection refused
An error ocurred while checking license status
Could not get license verification status. Are all CryoSPARC processes RUNNING?

While if I point “–dbpath” to a new and empty folder, both v4.4.1 and v4.2.1 work well.

In the new installation I used 49000, instead of 39000. The old installation was set up with 39000.

Following your suggestion, I have solved the problem with the following command:

cryosparcm changeport 49000

Thanks a lot!

1 Like