Cryosparc 3.0 systemd setup on RHEL8

Hi all,

We noticed some problems with the systemd setup, the 2 service files when upgrading from 2.16 to 3.0.1 (aside from the systemd configs, the update went troublefree).

Problem 1: On Centos/RHEL8 basically none of the systemd .service files worked out of the box.
As the paths could not be exec’d. This might be SElinux related. We ended up for

  • env.service
ExecStart=/bin/sh <INSTALLPATH>/systemd/
  • supervisord.service:
ExecStart=/usr/bin/env python3.7 INSTALLPATH>/deps/anaconda/envs/cryosparc_master_env/bin/supervisord -c <INSTALLPATH>/supervisord.conf
ExecStartPost=/usr/bin/env <INSTALLPATH>/bin/cryosparcm start --systemd

which worked for us. For the supervisord service file probably the path replacement could be avoided using the env vars from the sourced EnvironmentFile - this is basicaally restoring the conda environment, which we rely on with our /usr/bin/env+python3.7 call.

Problem 2: location of file (SELinux perm denied in the home directory)
We’ve systemd is waiting for the pid file, if it can’t read it. This can cause timeouts in service startup.
We’ve moved the pidfile to /run/cryosparc/ and adopted this setup in 2 locations:

  • cryosparc-supervisor.service: PIDFile=/run/cryosparc/
  • supervisord.conf: pidfile=/run/cryosparc/
    (That should be a better fit anyways, as this is supposed to be non-persistent data, .pid and .lock files are supposed to go to /run hierarchy, so that cleanup is ensured on system reboot).


1 Like


The documentation of this feature points to this discussion, indicating it is a workaround to a known issue. Is this still a problem with cryoSPARC 3.2?


A quick note to report that I successfully set up the systemd integration using cryoSPARC version 3.2.0 on Rocky Linux 8.4. The setup script from cryoSPARC worked out of the box, I now have cryoSPARC start and stop with the OS (very convenient!).

The cryosparc account needs to be in the wheel group, so it can use sudo. Otherwise, one can also manually run the commands in cryosparc_master/systemd/ from the cryosparc account, and then use a different account with sudo permission to copy the systemd .service files to /etc/systemd/system (since only this step requires sudo).