I have used cryosparctools before and it worked well. Recently, we reinstalled all the cryosparctools and cryosparc (still same license-ID) but somehow we have problem to connect.
It worked before with the correct license, host, base_port, email and password info.
Now, when I run it, after a while, it complains:
**data/user/.conda/envs/cryosparctools/lib/python3.9/site-packages/cryosparc/command.py:135: UserWarning: *** CommandClient: command (http://cajal:61003/api) did not reply within timeout of 300 seconds, attempt 1 of 3**
Do you define the host parameter with "localhost" or "cajal"?
Are you running the script on the CryoSPARC master computer, or another computer?
Does the computer where the script runs have continuous access to the relevant ports on the CryoSPARC master
i. directly
ii. via port forwarding or similar
Does the script only “complain” after a while, but not immediately?
What does the script do, or is supposed to do, between when it starts and when it complains?
What is the output (on the computer where the script runs) of the command
curl cajal:61003
Are there any errors in the command_vis log. You can browse the log on CryoSPARC master host with the command
I assumed yes since I could connect and run scripts a few months ago. There should not be a drastic change in port. But I have to say I don’t know.
It only complained after 5-6 minutes but not immediately. It probably corresponds to the 300 s time out.
The main script is for symmetry_expand_filter but I ran a test script, which only contained the portion to connect to the cryosparc instance to test first. I did this in the past and it worked well.
Apparently, it took at least 10 mins without any response.
There is no error with the command_vis log that is related to any recent events.
There are some ports blocked for sure. I asked the sys admin, and he enabled 61003 but cryosparctool still did not connect.
$host localhost
localhost has address 127.0.0.1
$cryosparcm status | grep -v LICENSE
Doesn't work
So I located the cryosparcm location and type:
$/data2/apps/cryosparc/master/bin/cryosparcm status | grep -v LICENSE
ERROR: This command can only be called by the owner of this script: cryosparc. You are xxxxxx!
Alternatively, set CRYOSPARC_FORCE_USER=true in cryosparc_master/config.sh to suppress this error.
That was run after the admin enabled the port.
curl localhost:61003
Still did not respond like before.
But if I ran (61000 is the default on used for port forwarding in our case instead of the default 39000)
Please can you provide details how port forwarding is used in the current scenario, showing the full command(s) and describing the computers involved.
If the cryosparc-tools script is to be run on the CryoSPARC master computer, no port forwarding should be necessary to run the script.
Within cs = CryoSPARC(...), host= could be defined as "localhost" and base_port= could be defined using the value of the CRYOSPARC_BASE_PORT variable of the CryoSPARC instance.
Please can you re-run the cryosparcm command under the Linux account under which CryoSPARC was installed and also post the outputs of the commands
To connect using cryosparctools, I logged in to cajal
ssh xxx@cajal.campus.mcgill.ca
and run either the Python script directly or through Jupyter Notebook.
I ran the script and within
cs = CryoSPARC(...)
with host = “localhost”, base_port=61000
It didn’t connect. Basically, it was stuck at the step of connecting.
I can ask the admin to run it again to see but I can ask him to open the port. But I need more information to give him since port 61000 is already open.
Apparently, after asking the sys admin to restart cryosparc, everything works. So I guess it is the easiest way to try to fix the problem. Thanks a lot for your help.
Update 2024-09-19: Information in this post is outdated.
@builab Another user reported a problem that may be related to the problem you reported. Please can you try suggestions in https://discuss.cryosparc.com/t/volume-viewer-error/14501/3 and let us know whether that setting helps in your case?
Update 2024-09-19: Information in this post is outdated.
[quote="builab, post:12, topic:14399"]
We use 4.5.1 though.
[/quote]
The [`GUNICORN_CMD_ARGS=`](https://discuss.cryosparc.com/t/volume-viewer-error/14501/3) suggestion would apply to v4.5.1 also, in case you encounter the issue again.
Patch 240807 for CryoSPARC v4.5.3 includes a fix for this issue.
Before applying the patch, ensure the CryoSPARC version is 4.5.3 and remove from or comment out in
Based on new information, we recommend the custom GUNICORN_CMD_ARGS definition be disabled/removed. Please see Volume viewer error - #5 by wtempel for details.