Successfully updated master to version v4.1.2.
===================================================
Starting cryoSPARC System master process..
CryoSPARC is not already running.
configuring database
Warning: Could not get database status (attempt 1/3)
Warning: Could not get database status (attempt 2/3)
Warning: Could not get database status (attempt 3/3)
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/groups/brunger/software/cryosparc/cryosparc_master/cryosparc_compute/database_management.py", line 48, in configure_mongo
initialize_replica_set()
File "/home/groups/brunger/software/cryosparc/cryosparc_master/cryosparc_compute/database_management.py", line 87, in initialize_replica_set
admin_db = try_get_pymongo_admin_db(mongo_client)
File "/home/groups/brunger/software/cryosparc/cryosparc_master/cryosparc_compute/database_management.py", line 249, in try_get_pymongo_admin_db
admin_db.command(({'serverStatus': 1}))
File "/home/groups/brunger/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/groups/brunger/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/groups/brunger/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/groups/brunger/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/groups/brunger/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/groups/brunger/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/groups/brunger/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: localhost:39007: [Errno 111] Connection refused, Timeout: 20.0s, Topology Description: <TopologyDescription id: 63d4270dc7973ea34e2e0105, topology_type: Single, servers: [<ServerDescription ('localhost', 39007) server_type: Unknown, rtt: None, error=AutoReconnect('localhost:39007: [Errno 111] Connection refused')>]>
[2023-01-27T11:34:44-0800] Error configuring database. Most recent database log lines:
2023-01-27T11:33:30.807-0800 I CONTROL [initandlisten] git version: d352e6a4764659e0d0350ce77279de3c1f243e5c
2023-01-27T11:33:30.807-0800 I CONTROL [initandlisten] allocator: tcmalloc
2023-01-27T11:33:30.807-0800 I CONTROL [initandlisten] modules: none
2023-01-27T11:33:30.807-0800 I CONTROL [initandlisten] build environment:
2023-01-27T11:33:30.807-0800 I CONTROL [initandlisten] distarch: x86_64
2023-01-27T11:33:30.807-0800 I CONTROL [initandlisten] target_arch: x86_64
2023-01-27T11:33:30.807-0800 I CONTROL [initandlisten] options: { net: { port: 39007 }, replication: { oplogSizeMB: 64, replSet: "meteor" }, storage: { dbPath: "/home/groups/brunger/software/cryosparc/cryosparc_database", journal: { enabled: false } } }
2023-01-27T11:33:30.811-0800 I STORAGE [initandlisten] exception in initAndListen: DBPathInUse: Unable to lock the lock file: /home/groups/brunger/software/cryosparc/cryosparc_database/mongod.lock (Resource temporarily unavailable). Another mongod instance is already running on the /home/groups/brunger/software/cryosparc/cryosparc_database directory, terminating
2023-01-27T11:33:30.811-0800 I CONTROL [initandlisten] now exiting
2023-01-27T11:33:30.811-0800 I CONTROL [initandlisten] shutting down with code:100
This indicates no CryoSPARC-related were found. Had their been any running processes, one could kill them like so: kill 12345
where 12345 would correspond to the number in the first column of ps results. ps xww only shows results for the current user. Was the search performed under the correct Linux account (that runs CryoSPARC processes)? To also display database processes for other accounts, you may run ps axuww | grep mongo
I restarted everything, cryosparcm start still doesn’t work
Starting cryoSPARC System master process..
CryoSPARC is not already running.
configuring database
Warning: Could not get database status (attempt 1/3)
Warning: Could not get database status (attempt 2/3)
Warning: Could not get database status (attempt 3/3)
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/groups/brunger/software/cryosparc/cryosparc_master/cryosparc_compute/database_management.py", line 48, in configure_mongo
initialize_replica_set()
File "/home/groups/brunger/software/cryosparc/cryosparc_master/cryosparc_compute/database_management.py", line 87, in initialize_replica_set
admin_db = try_get_pymongo_admin_db(mongo_client)
File "/home/groups/brunger/software/cryosparc/cryosparc_master/cryosparc_compute/database_management.py", line 249, in try_get_pymongo_admin_db
admin_db.command(({'serverStatus': 1}))
File "/home/groups/brunger/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/groups/brunger/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/groups/brunger/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/groups/brunger/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/groups/brunger/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/groups/brunger/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/groups/brunger/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: localhost:39007: [Errno 111] Connection refused, Timeout: 20.0s, Topology Description: <TopologyDescription id: 63d4694f5a1b6a7f2a2b5f44, topology_type: Single, servers: [<ServerDescription ('localhost', 39007) server_type: Unknown, rtt: None, error=AutoReconnect('localhost:39007: [Errno 111] Connection refused')>]>
[2023-01-27T16:17:26-0800] Error configuring database. Most recent database log lines:
2023-01-27T16:16:12.984-0800 I CONTROL [initandlisten] git version: d352e6a4764659e0d0350ce77279de3c1f243e5c
2023-01-27T16:16:12.984-0800 I CONTROL [initandlisten] allocator: tcmalloc
2023-01-27T16:16:12.984-0800 I CONTROL [initandlisten] modules: none
2023-01-27T16:16:12.984-0800 I CONTROL [initandlisten] build environment:
2023-01-27T16:16:12.984-0800 I CONTROL [initandlisten] distarch: x86_64
2023-01-27T16:16:12.984-0800 I CONTROL [initandlisten] target_arch: x86_64
2023-01-27T16:16:12.984-0800 I CONTROL [initandlisten] options: { net: { port: 39007 }, replication: { oplogSizeMB: 64, replSet: "meteor" }, storage: { dbPath: "/home/groups/brunger/software/cryosparc/cryosparc_database", journal: { enabled: false } } }
2023-01-27T16:16:13.001-0800 I STORAGE [initandlisten] exception in initAndListen: DBPathInUse: Unable to lock the lock file: /home/groups/brunger/software/cryosparc/cryosparc_database/mongod.lock (Resource temporarily unavailable). Another mongod instance is already running on the /home/groups/brunger/software/cryosparc/cryosparc_database directory, terminating
2023-01-27T16:16:13.001-0800 I CONTROL [initandlisten] now exiting
2023-01-27T16:16:13.001-0800 I CONTROL [initandlisten] shutting down with code:10
I had the same problem. We had started with an early version cryosparc 3, gone through several updates, updating to 4.1.1 broke everything. A clean install of 4.1.2 worked, but couldn’t load the database. The solution was to manually import each project to the new (empty) database.
$ cryosparcm log database
2023-01-27T10:14:56.327-0800 I REPL [rsSync] conducting a dry run election to see if we could be elected. current term: 184
2023-01-27T10:14:56.327-0800 I REPL [replexec-0] dry election run succeeded, running for election in term 185
2023-01-27T10:14:56.342-0800 I REPL [replexec-0] election succeeded, assuming primary role in term 185
2023-01-27T10:14:56.342-0800 I REPL [replexec-0] transition to PRIMARY from SECONDARY
2023-01-27T10:14:56.342-0800 I REPL [replexec-0] Resetting sync source to empty, which was :27017
2023-01-27T10:14:56.342-0800 I REPL [replexec-0] Entering primary catch-up mode.
2023-01-27T10:14:56.342-0800 I REPL [replexec-0] Exited primary catch-up mode.
2023-01-27T10:14:58.329-0800 I REPL [rsSync] transition to primary complete; database writes are now permitted
2023-01-27T10:19:56.568-0800 I COMMAND [LogicalSessionCacheReap] command config.transactions command: find { find: "transactions", filter: { lastWriteDate: { $lt: new Date(1674841796325) } }, projection: { _id: 1 }, sort: { _id: 1 }, $db: "config" } planSummary: IXSCAN { _id: 1 } keysExamined:2 docsExamined:2 cursorExhausted:1 numYields:0 nreturned:2 reslen:387 locks:{ Global: { acquireCount: { r: 2 } }, Database: { acquireCount: { r: 1 } }, Collection: { acquireCount: { r: 1 } } } protocol:op_msg 242ms
2023-01-27T11:33:30.807-0800 I CONTROL [initandlisten] MongoDB starting : pid=24752 port=39007 dbpath=/home/groups/brunger/software/cryosparc/cryosparc_database 64-bit host=sh02-04n16.int
2023-01-27T11:33:30.807-0800 I CONTROL [initandlisten] db version v3.6.23
2023-01-27T11:33:30.807-0800 I CONTROL [initandlisten] git version: d352e6a4764659e0d0350ce77279de3c1f243e5c
2023-01-27T11:33:30.807-0800 I CONTROL [initandlisten] allocator: tcmalloc
2023-01-27T11:33:30.807-0800 I CONTROL [initandlisten] modules: none
2023-01-27T11:33:30.807-0800 I CONTROL [initandlisten] build environment:
2023-01-27T11:33:30.807-0800 I CONTROL [initandlisten] distarch: x86_64
2023-01-27T11:33:30.807-0800 I CONTROL [initandlisten] target_arch: x86_64
2023-01-27T11:33:30.807-0800 I CONTROL [initandlisten] options: { net: { port: 39007 }, replication: { oplogSizeMB: 64, replSet: "meteor" }, storage: { dbPath: "/home/groups/brunger/software/cryosparc/cryosparc_database", journal: { enabled: false } } }
2023-01-27T11:33:30.811-0800 I STORAGE [initandlisten] exception in initAndListen: DBPathInUse: Unable to lock the lock file: /home/groups/brunger/software/cryosparc/cryosparc_database/mongod.lock (Resource temporarily unavailable). Another mongod instance is already running on the /home/groups/brunger/software/cryosparc/cryosparc_database directory, terminating
2023-01-27T11:33:30.811-0800 I CONTROL [initandlisten] now exiting
2023-01-27T11:33:30.811-0800 I CONTROL [initandlisten] shutting down with code:100
2023-01-27T16:16:12.984-0800 I CONTROL [initandlisten] MongoDB starting : pid=11685 port=39007 dbpath=/home/groups/brunger/software/cryosparc/cryosparc_database 64-bit host=sh02-04n16.int
2023-01-27T16:16:12.984-0800 I CONTROL [initandlisten] db version v3.6.23
2023-01-27T16:16:12.984-0800 I CONTROL [initandlisten] git version: d352e6a4764659e0d0350ce77279de3c1f243e5c
2023-01-27T16:16:12.984-0800 I CONTROL [initandlisten] allocator: tcmalloc
2023-01-27T16:16:12.984-0800 I CONTROL [initandlisten] modules: none
2023-01-27T16:16:12.984-0800 I CONTROL [initandlisten] build environment:
2023-01-27T16:16:12.984-0800 I CONTROL [initandlisten] distarch: x86_64
2023-01-27T16:16:12.984-0800 I CONTROL [initandlisten] target_arch: x86_64
2023-01-27T16:16:12.984-0800 I CONTROL [initandlisten] options: { net: { port: 39007 }, replication: { oplogSizeMB: 64, replSet: "meteor" }, storage: { dbPath: "/home/groups/brunger/software/cryosparc/cryosparc_database", journal: { enabled: false } } }
2023-01-27T16:16:13.001-0800 I STORAGE [initandlisten] exception in initAndListen: DBPathInUse: Unable to lock the lock file: /home/groups/brunger/software/cryosparc/cryosparc_database/mongod.lock (Resource temporarily unavailable). Another mongod instance is already running on the /home/groups/brunger/software/cryosparc/cryosparc_database directory, terminating
2023-01-27T16:16:13.001-0800 I CONTROL [initandlisten] now exiting
2023-01-27T16:16:13.001-0800 I CONTROL [initandlisten] shutting down with code:100
2023-01-28T00:19:59.784-0800 I STORAGE [WT RecordStoreThread: local.oplog.rs] WiredTiger record store oplog truncation finished in: 0ms
From “Attach Project” select the directory that contains the jobs for that project, then let it run for a minute or two as it sets everything up. The project will be renumbered to match the new database, ie; what is shown as P1 in my session was originally P24 in the old database. Internal job numbers, references, links are all maintained, so you can still call back to jobs run before importing the database.
To get v4.1.2 to properly install I had to delete all files, clear out anything left in /temp,delete the SSD cache, restart the computer, and then install a clean download. You may want to do that as well if you’re going to reinstall. Good luck.
Did you ensure this directory is not accessed by any other computers to which this directory is also exported? Finding out why
Unable to lock the lock file: /home/groups/brunger/software/cryosparc/cryosparc_database/mongod.lock
occurs may enable an easy fix and reduce the chance of this same Unable to lock the lock file: problem recurring after one has gone through the effort of importing each project to a new database.
Some old database process on this or another computer may be blocking the new database process from “locking” the mongod.lock file. The old database process needs to be identified.
What are the outputs of these commands: