Cryosparcm start: Warning: Could not get database status

Hello! I’m trying to begin running Cryosparc on a new server (was installed by Exxact company) and I get this error after typing
cryosparcm restart

```
CryoSPARC is running.
Stopping cryoSPARC
database: stopped
Shut down
Starting cryoSPARC System master process…
CryoSPARC is not already running.
configuring database

  • configuration complete*
    database: started
    Warning: ç (attempt 1/3)
    Warning: Could not get database status (attempt 2/3)
    Warning: Could not get database status (attempt 3/3)
    checkdb error - could not get replica set status; please reconfigure the database with cryosparcm configuredb
    Traceback (most recent call last):
  • File “”, line 1, in *
  • File “/home/cryosparc_user/software/cryosparc/cryosparc_master/cryosparc_compute/database_management.py”, line 268, in check_mongo*
  • admin_db = try_get_pymongo_admin_db(mongo_client)*
  • File “/home/cryosparc_user/software/cryosparc/cryosparc_master/cryosparc_compute/database_management.py”, line 249, in try_get_pymongo_admin_db*
  • admin_db.command(({‘serverStatus’: 1}))*
  • File “/home/cryosparc_user/software/cryosparc/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.8/site-packages/pymongo/database.py”, line 827, in command*
  • with self.__client._socket_for_reads(read_preference, session) as (sock_info, secondary_ok):*
  • File “/home/cryosparc_user/software/cryosparc/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.8/contextlib.py”, line 113, in enter*
  • return next(self.gen)*
  • File “/home/cryosparc_user/software/cryosparc/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.8/site-packages/pymongo/mongo_client.py”, line 1478, in _socket_for_reads*
  • server = self._select_server(read_preference, session)*
  • File “/home/cryosparc_user/software/cryosparc/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.8/site-packages/pymongo/mongo_client.py”, line 1436, in _select_server*
  • server = topology.select_server(server_selector)*
  • File “/home/cryosparc_user/software/cryosparc/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.8/site-packages/pymongo/topology.py”, line 250, in select_server*
  • return random.choice(self.select_servers(selector, server_selection_timeout, address))*
  • File “/home/cryosparc_user/software/cryosparc/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.8/site-packages/pymongo/topology.py”, line 211, in select_servers*
  • server_descriptions = self._select_servers_loop(selector, server_timeout, address)*
  • File “/home/cryosparc_user/software/cryosparc/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.8/site-packages/pymongo/topology.py”, line 226, in _select_servers_loop*
  • raise ServerSelectionTimeoutError(*
    pymongo.errors.ServerSelectionTimeoutError: sn4622116092:39001: [Errno -3] Temporary failure in name resolution, Timeout: 20.0s, Topology Description: <TopologyDescription id: 656fb45d7918706c8aa9296b, topology_type: Unknown, servers: [<ServerDescription (‘sn4622116092’, 39001) server_type: Unknown, rtt: None, error=AutoReconnect(‘sn4622116092:39001: [Errno -3] Temporary failure in name resolution’)>]>
    [2023-12-05T15:39:16-08:00] Error checking database. Most recent database log lines:
    2023-12-05T15:38:03.465-0800 I REPL [replexec-0] Starting replication reporter thread
    2023-12-05T15:38:03.466-0800 I REPL [rsSync] transition to SECONDARY from RECOVERING
    2023-12-05T15:38:03.466-0800 I REPL [rsSync] conducting a dry run election to see if we could be elected. current term: 21
    2023-12-05T15:38:03.466-0800 I REPL [replexec-0] dry election run succeeded, running for election in term 22
    2023-12-05T15:38:03.472-0800 I REPL [replexec-0] election succeeded, assuming primary role in term 22
    2023-12-05T15:38:03.472-0800 I REPL [replexec-0] transition to PRIMARY from SECONDARY
    2023-12-05T15:38:03.472-0800 I REPL [replexec-0] Resetting sync source to empty, which was :27017
    2023-12-05T15:38:03.472-0800 I REPL [replexec-0] Entering primary catch-up mode.
    2023-12-05T15:38:03.472-0800 I REPL [replexec-0] Exited primary catch-up mode.
    2023-12-05T15:38:05.468-0800 I REPL [rsSync] transition to primary complete; database writes are now permitted

this is what I get for
cryosparcm status

----------------------------------------------------------------------------
CryoSPARC System master node installed at
/home/cryosparc_user/software/cryosparc/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 RUNNING pid 145525, uptime 0:04:21

----------------------------------------------------------------------------
**** CommandClient: (http://sn4622116092:39002/api) URL Error [Errno -3] Temporary failure in name resolution*
An error ocurred while checking license status
Could not get license verification status. Are all CryoSPARC processes RUNNING?

Is this a reinstall issue? or can this be fixed somehow?

Have you attempted executing the command as the cryosparc-user?

In my case, this would look like this:
sudo -u cryosparc cryosparcm start

Welcome to the forum @laina-hall.

This problem likely does not require reinstallation, even though you may want to update CryoSPARC once you have resolved the problem.

The resolution depends on the current state of the CryoSPARC installation. If whoever installed CryoSPARC on this computer promised installation support, please ask them for suggestions because they are most familiar with the details of this installation. Otherwise, please read on.

  1. May I ask whether there are any plans to connect additional “worker” computers to this CryoSPARC instance, or will this instance run in single workstation mode for the foreseeable future?

  2. What are the outputs of these commands:

    grep -v LICENSE /home/cryosparc_user/software/cryosparc/cryosparc_master/config.sh
    hostname -f
    host $(hostname -f)
    ip addr | grep "inet "
    ps -weo pid,ppid,start,cmd | grep -e cryosparc -e mongo | grep -v grep
    

Hello, we have tried to reach out to the installer with little luck. We are trying to connect additional worker computers. Here is the output of that command. Thank you so much!

Instance Configuration

export CRYOSPARC_FORCE_HOSTNAME=true
export CRYOSPARC_MASTER_HOSTNAME=“sn4622116092”
export CRYOSPARC_DB_PATH=“/home/cryosparc_user/software/cryosparc/cryosparc_database”
export CRYOSPARC_BASE_PORT=39000
export CRYOSPARC_DB_CONNECTION_TIMEOUT_MS=20000

Security

export CRYOSPARC_INSECURE=false
export CRYOSPARC_DB_ENABLE_AUTH=true

Cluster Integration

export CRYOSPARC_CLUSTER_JOB_MONITOR_INTERVAL=10
export CRYOSPARC_CLUSTER_JOB_MONITOR_MAX_RETRIES=1000000

Project Configuration

export CRYOSPARC_PROJECT_DIR_PREFIX=‘CS-’

Development

export CRYOSPARC_DEVELOP=false

Other

export CRYOSPARC_CLICK_WRAP=true
localhost
localhost has address 127.0.0.1
inet 127.0.0.1/8 scope host lo
inet 136.152.62.91/25 brd 136.152.62.127 scope global dynamic noprefixroute eno1
inet 169.254.122.173/16 brd 169.254.255.255 scope link noprefixroute usb0
1732204 2603 13:27:18 sshd: cryosparc_user [priv]
1732363 1732204 13:27:24 sshd: cryosparc_user@pts/9

Good to know. In this case, certain “shortcut” solutions do not work, and you may need the help of your IT/network team to:

  • register your network adapter and ensure your computer is assigned “stable” fully qualified domain name that can be correctly resolved by other computers on your network, such as the planned additional worker computers, can “find” the master host.
  • configure the hostname of your computer to match that “stable” fully qualified domain name such that the command
    hostname -f prints out that hostname.

After that, modify the CRYOSPARC_MASTER_HOSTNAME= definition inside /home/cryosparc_user/software/cryosparc/cryosparc_master/config.sh to also match the newly assigned, “stable” fully qualified domain name and comment out the line

export CRYOSPARC_FORCE_HOSTNAME=true

(which overrides a sanity check).
Hopefully, at that point the command
cryosparcm start will work. If it does, please post here the output of the command

# will only work if CryoSPARC started successfully
/home/cryosparc_user/software/cryosparc/cryosparc_master/bin cryosparcm cli "get_scheduler_targets()"

so we may see what changes need to be made to your worker configuration.