Hostname Mismatch

Hello,

We recently got a new workstation to process cryoEM data. It came with CryoSPARC 5.0.6 preinstalled, with the master and worker configured on the same workstation. We changed the hostname from the manufacturer’s default (snXXXXXXXXXX) to something more palatable (hostname.university.internal). We used CryoSPARC without issue for several weeks after the hostname change, but now we are receiving the following error:

✕ UnauthorizedException: This command must run on the CryoSPARC master host, but there is a mismatch between the $CRYOSPARC_MASTER_HOSTNAME definition (hostname.university.internal) and the configured hostname of this host (Hostname.university.internal).

If, and only if, the command ran on the CryoSPARC master host, but the host is configured with a different hostname, consider the appropriate intervention for your circumstances:

1 Ensure $CRYOSPARC_MASTER_HOSTNAME and the output of command hostname -f match. CRYOSPARC_MASTER_HOSTNAME may be defined inside cryosparc_master/config.sh. Restart CryoSPARC after this change.
2 Or: re-run this command with the environment variable CRYOSPARC_FORCE_HOSTNAME=“true”. This setting bypasses an important safety check and may disrupt CryoSPARC function if used inappropriately.

The output of hostname -f and CRYOSPARC_MASTER_HOSTNAME match exactly, both show lower case hostname. Our university IT department also confirmed that they see lower case hostname on their registry.

When I enable CRYOSPARC_FORCE_HOSTNAME, the master will start and the web app is then accessible. However, when we attempt to run any job that requires the worker node, we get the following error:

Traceback (most recent call last): File “core/job_scheduling.py”, line 47, in core.job_scheduling.schedule_jobs File “core/job_scheduling.py”, line 283, in core.job_scheduling.schedule_job File “/home/cryosparc_user/software/cryosparc/cryosparc_master/core/jobs.py”, line 565, in launch_job return launch_job_on_node(job, target) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/home/cryosparc_user/software/cryosparc/cryosparc_master/core/jobs.py”, line 663, in launch_job_on_node return launch_job_on(job, target) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/home/cryosparc_user/software/cryosparc/cryosparc_master/core/jobs.py”, line 673, in launch_job_on pid = processing.exec_on( ^^^^^^^^^^^^^^^^^^^ File “/home/cryosparc_user/software/cryosparc/cryosparc_master/core/processing.py”, line 453, in exec_on raise ExecError(“SSH command failed”, **error_details) core.processing.ExecError: ssh user@hostname.university.internal ‘bash -c ‘"’“‘nohup /home/cryosparc_user/software/cryosparc/cryosparc_worker/bin/cryosparcw run --project P5 --job J97 --master hostname.university.internal --port 61000 --timeout 20000 --auth 2>/scr/nice_dataset/cool_target/J97/job.log >&2 & echo $!’”’"‘’: SSH command failed (code 255) Output: Error: ssh_askpass: exec(/usr/libexec/openssh/ssh-askpass): No such file or directory Host key verification failed.

I’ve tried setting CRYOSPARC_HOSTNAME_CHECK=”hostname.university.internal” in the config.sh file, which has not worked. I’ve also turned the workstation off overnight and disconnected all cables to see if a hard reboot would fix the issue, but it did not.

Is there anywhere else where this capitalization mismatch in the hostname could be coming from? I would like to avoid reinstalling if possible, but that’s the only other option I can think of currently.

Thanks so much!

Sincerely,

Mitch

Welcome to the forum @MitchGulkis.

At this point, please can you run the following commands and post their outputs:

cat /etc/hosts
/home/cryosparc_user/software/cryosparc/cryosparc_master/bin/cryosparcm resources
grep HOSTNAME /home/cryosparc_user/software/cryosparc/cryosparc_master/config.sh
host $(hostname -f)

[Edit] corrected path in grep command

Thanks so much, I’ve been reading these posts for years and they’re always super helpful!

cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
/home/cryosparc_user/software/cryosparc/cryosparc_master/bin/cryosparcm resources
Target                      Property       Value
--------------------------  -------------  
-----------------------------------------------------------------------
snXXXXXXXXXX                Type           node
                            Host           snXXXXXXXXXX
                            Lane           default
                            Worker         
/home/cryosparc_user/software/cryosparc/cryosparc_worker/bin/cryosparcw
                            SSH Target     cryosparc_user@snXXXXXXXXXX
                            CPUs           128
                            RAM            512 GiB
                            GPUs           0,1,2,3
                            GPU 0 Name     NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition
                            GPU 0 Mem      95.59 GiB
                            GPU 1 Name     NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition
                            GPU 1 Mem      95.59 GiB
                            GPU 2 Name     NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition
                            GPU 2 Mem      95.59 GiB
                            GPU 3 Name     NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition
                            GPU 3 Mem      95.59 GiB
                            Cache Path     /scr/cryosparc_cache
                            Cache Reserve  10.00 GB
--------------------------  -------------  
-----------------------------------------------------------------------
hostname.university.internal  Type           node
                            Host           hostname.university.internal
                            Lane           default
                            Worker         
/home/cryosparc_user/software/cryosparc/cryosparc_worker/bin/cryosparcw
                            SSH Target     cryosparc_user@hostname.university.internal
                            CPUs           128
                            RAM            512 GiB
                            GPUs           0,1,2,3
                            GPU 0 Name     NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition
                            GPU 0 Mem      95.59 GiB
                            GPU 1 Name     NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition
                            GPU 1 Mem      95.59 GiB
                            GPU 2 Name     NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition
                            GPU 2 Mem      95.59 GiB
                            GPU 3 Name     NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition
                            GPU 3 Mem      95.59 GiB
                            Cache Path     /scr/cryosparc_cache
                            Cache Reserve  10.00 GB

We currently have two attached worker nodes, since I couldn’t figure out how to remove the original. We haven’t experienced any issue when queuing jobs to the new node (hostname.university.internal).

grep HOSTNAME /home/cryosparc_user/software/cryosparc/cryosparc_master/bin/config.sh
grep: /home/cryosparc_user/software/cryosparc/cryosparc_master/bin/config.sh: No such file or directory

Removing the /bin from the previous command produces:

grep HOSTNAME /home/cryosparc_user/software/cryosparc/cryosparc_master/config.sh
export CRYOSPARC_MASTER_HOSTNAME="hostname.university.internal"
export CRYOSPARC_FORCE_HOSTNAME="true"
#export CRYOSPARC_HOSTNAME_CHECK="hostname.university.internal"
host $(hostname -f)
hostname.university.internal has address 10.66.253.188

Almost there. Check out the

cryosparcm worker disconnect --worker

command. Be sure to specify the correct
--worker parameter, because under your circumstances, without the
--worker parameter, the command would remove the connection that you will want to keep.
May I also suggest removing the line

export CRYOSPARC_FORCE_HOSTNAME="true"

and restarting CryoSPARC. Keeping the line would disable a useful safeguard against erroneous usage of the cryosparcm command and should no longer be needed in your context.

Thanks for the explanation of disconnecting! Now when I run cryosparcm resources, I only see the worker node with the correct, updated hostname.

However, with CryoSPARC running, if I comment out

export CRYOSPARC_FORCE_HOSTNAME="true"

I get the same error:

✕ UnauthorizedException: This command must run on the CryoSPARC master host, but there is a mismatch between the
$CRYOSPARC_MASTER_HOSTNAME definition (hostname.university.internal) and the configured hostname of this host     
(Hostname.university.internal).                                                                                   

If, and only if, the command ran on the CryoSPARC master host, but the host is configured with a different      
hostname, consider the appropriate intervention for your circumstances:                                         

 1 Ensure $CRYOSPARC_MASTER_HOSTNAME and the output of command hostname -f match. CRYOSPARC_MASTER_HOSTNAME may 
   be defined inside cryosparc_master/config.sh. Restart CryoSPARC after this change.                           
 2 Or: re-run this command with the environment variable CRYOSPARC_FORCE_HOSTNAME="true". This setting bypasses 
   an important safety check and may disrupt CryoSPARC function if used inappropriately.  

Likewise, with CRYOSPARC_FORCE_HOSTNAME set to true, I can stop CryoSPARC. But when I comment out the variable, I get the same error.

With the variable enabled, I restarted CryoSPARC with no effect.

The following two commands still produce identical outputs, with the correct lower case hostname shown.

hostname -f
hostname.university.internal

grep "CRYOSPARC_MASTER_HOSTNAME" config.sh
hostname.university.internal

Let’s see whether the source of the capitalized name record can be pinned down. What are the outputs of the commands

host -v 10.66.253.18
dig -x 10.66.253.18
/usr/bin/python3 -c "import socket;print(socket.getfqdn())"
1 Like
host -v 10.66.253.18
Trying "18.253.66.10.in-addr.arpa"
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 51545
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 3

;; QUESTION SECTION:
;18.253.66.10.in-addr.arpa.    IN    PTR

;; ANSWER SECTION:
18.253.66.10.in-addr.arpa. 3600    IN    PTR    Printer-XXXX.example.internal.

;; AUTHORITY SECTION:
10.in-addr.arpa.    3600    IN    NS    ns1.example.edu.
10.in-addr.arpa.    3600    IN    NS    ns2.example.edu.
10.in-addr.arpa.    3600    IN    NS    ns3.example.edu.

;; ADDITIONAL SECTION:
ns1.example.edu.    14400    IN    A    172.18.x.12
ns2.example.edu.    14400    IN    A    172.18.x.20
ns3.example.edu.    14400    IN    A    172.18.x.28

Received 231 bytes from 172.18.x.12#53 in 27 ms
dig -x 10.66.253.18
; <<>> DiG 9.16.23-RH <<>> -x 10.66.253.18
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57455
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 4

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; COOKIE: [REDACTED] (good)
;; QUESTION SECTION:
;18.253.66.10.in-addr.arpa.    IN    PTR

;; ANSWER SECTION:
18.253.66.10.in-addr.arpa. 3600    IN    PTR    Printer-XXXX.example.internal.

;; AUTHORITY SECTION:
10.in-addr.arpa.    3600    IN    NS    ns1.example.edu.
10.in-addr.arpa.    3600    IN    NS    ns2.example.edu.
10.in-addr.arpa.    3600    IN    NS    ns3.example.edu.

;; ADDITIONAL SECTION:
ns1.example.edu.    14400    IN    A    172.18.x.12
ns2.example.edu.    14400    IN    A    172.18.x.20
ns3.example.edu.    14400    IN    A    172.18.x.28

;; Query time: 5 msec
;; SERVER: 172.18.x.12#53(172.18.x.12)
;; WHEN: Tue Oct 20 16:09:44 EDT 2026
;; MSG SIZE  rcvd: 270
/usr/bin/python3 -c "import socket;print(socket.getfqdn())"
Hostname.university.internal

You found the issue! It seems that reverse DNS lookup resolves to Hostname.university.internal, but forward DNS lookup resolves to hostname.university.internal. Weird, I’ll have to ask my university’s IT folks about that! From my (very) limited understanding of networking, DNS hostnames are not case sensitive so this case mismatch doesn’t effect normal DNS processes, but if CryoSPARC checks for an exact string match, this could cause the error?

When I changed the hostname in the config.sh file to Hostname.university.internal, the master starts and the web app is accessible! I had to also reconnect the worker with the upper case hostname Hostname.university.internal and update the ssh target string. But once I did, everything works and I’ve successfully run several jobs!

If it is reasonable, perhaps CryoSPARC could be patched to have hostname be case insensitive? Or the error message when hostname does not match could be updated to suggest running a reverse DNS lookup instead of a forward DNA lookup?

Thanks so much for your help, I really appreciate it!

We noted this suggestion for a future CryoSPARC release.

2 Likes