Database: ERROR (spawn error) after restart

Hi developers,
After I mistakenly ran
cryosparcm restart as the root user and realised that, I ran cryosparcm stop as the root user and exit.
Then I encounter the followling error when running cryosparcm start as a normal user.

Starting cryoSPARC System master process..
CryoSPARC is not already running.
database: ERROR (spawn error)
^CTraceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/rmxu/software/cryosparc/cryosparc2_master/deps/anaconda/lib/python2.7/site-packages/pymongo/mongo_client.py", line 1149, in database_names
    "listDatabases")["databases"]]
  File "/home/rmxu/software/cryosparc/cryosparc2_master/deps/anaconda/lib/python2.7/site-packages/pymongo/database.py", line 491, in command
    with client._socket_for_reads(read_preference) as (sock_info, slave_ok):
  File "/home/rmxu/software/cryosparc/cryosparc2_master/deps/anaconda/lib/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "/home/rmxu/software/cryosparc/cryosparc2_master/deps/anaconda/lib/python2.7/site-packages/pymongo/mongo_client.py", line 859, in _socket_for_reads
    with self._get_socket(read_preference) as sock_info:
  File "/home/rmxu/software/cryosparc/cryosparc2_master/deps/anaconda/lib/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "/home/rmxu/software/cryosparc/cryosparc2_master/deps/anaconda/lib/python2.7/site-packages/pymongo/mongo_client.py", line 823, in _get_socket
    server = self._get_topology().select_server(selector)
  File "/home/rmxu/software/cryosparc/cryosparc2_master/deps/anaconda/lib/python2.7/site-packages/pymongo/topology.py", line 214, in select_server
    address))
  File "/home/rmxu/software/cryosparc/cryosparc2_master/deps/anaconda/lib/python2.7/site-packages/pymongo/topology.py", line 198, in select_servers
    self._condition.wait(common.MIN_HEARTBEAT_INTERVAL)
  File "/home/rmxu/software/cryosparc/cryosparc2_master/deps/anaconda/lib/python2.7/threading.py", line 359, in wait
    _sleep(delay)
KeyboardInterrupt

Could you suggest a procedure to fix this problem?

Thanks

Hi @hxn,

Since the command was run with root, there may be some files that are owned by the root user. If possible, can you change ownership back to your cryoSPARC user for all the folders related to cryoSPARC i.e. cryosparc2_database, cryosparc2_master, cryosparc2_worker?
E.g.:
sudo chown -R cryosparcuser:cryosparcuser cryosparc2_database cryosparc2_master cryosparc2_worker

Thanks a lot. Everything seems back on track now.