Killing or removing a project

I am trying to kill on very old job listed as active on the interface.

I get the following message,

Unable to kill P2 J14: ServerError: validation error: lock file for P2 at /ourdisk/hpc/bsc/lenthomas/dont_archive/test/P2/cs.lock absent or otherwise inaccessible.

The directory no longer exists which is why it can not find it. How do I kill/remove/delete the Project and job?

Thanks,
Len

  1. Are you referring to the job or project directory?
  2. How (inside or outside of CryoSPARC) was the directory removed?

Directory was deleted outside of CryoSparc.

Len

You may try these commands on the master computer’s shell, under the Linux account that runs CryoSPARC services:

cryosparcm icli # access the CryoSPARC interactive cli console
db.jobs.update_one({'uid': 'J14', 'project_uid': 'P2'}, {'$set': {'status': 'failed'}})
db.projects.update_one({'uid': 'P2'}, {'$set': {'deleted': True}})
exit

[edited: command corrected]
[edited 2023-06-21: update_one query modified]

1 Like

Tried running the given commands and this is what is happening.

/ourdisk/hpc/bsc/cryosparc/cryosparc_master/bin/cryosparcm cli
db.jobs.update_one(Traceback (most recent call last):
File “/ourdisk/hpc/bsc/cryosparc/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.8/runpy.py”, line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File “/ourdisk/hpc/bsc/cryosparc/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.8/runpy.py”, line 87, in _run_code
exec(code, run_globals)
File “/ourdisk/hpc/bsc/cryosparc/cryosparc_master/cryosparc_compute/client.py”, line 57, in
print(eval(“cli.”+command))
File “”, line 1
cli.
^
SyntaxError: unexpected EOF while parsing
[lenthomas@schooner2 cryosparc]$ db.jobs.update_one({‘uid’: ‘J14’,‘project_uid’: ‘P2’}, {‘status’: ‘failed’})
-bash: syntax error near unexpected token `{‘uid’:’

Does this error occur on the same CryoSPARC instance that is also the subject of Interface Input to Job Hangs - #10 by lmthomas?
If so, the command is likely to fail because of an underlying database corruption.

Not the same instance. I was clearing old jobs listed as active at the bottom of the interface. Most of those failed for various reasons, usually GPU access problems, but they cleared fine so I figured they might have been contributing to the overall problems we were having.

I apologize for initially providing the wrong command, which was missing an i. The command should be

/ourdisk/hpc/bsc/cryosparc/cryosparc_master/bin/cryosparcm icli

Okay, that gets me into cli console,

When I type in the commands I now get this 

In [2]: db.jobs.update_one ({'uid': 'J14', 'project_uid': 'P2'}, {'status': 'failed'})
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-2-c77540a3071e> in <cell line: 1>()
----> 1 db.jobs.update_one ({'uid': 'J14', 'project_uid': 'P2'}, {'status': 'failed'})

/ourdisk/hpc/bsc/cryosparc/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.8/site-packages/pymongo/collection.py in update_one(self, filter, update, upsert, bypass_document_validation, collation, array_filters, hint, session)
   1125         """
   1126         common.validate_is_mapping("filter", filter)
-> 1127         common.validate_ok_for_update(update)
   1128         common.validate_list_or_none("array_filters", array_filters)
   1129 

/ourdisk/hpc/bsc/cryosparc/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.8/site-packages/pymongo/common.py in validate_ok_for_update(update)
    563     first = next(iter(update))
    564     if is_document and not first.startswith("$"):
--> 565         raise ValueError("update only works with $ operators")
    566 
    567 

ValueError: update only works with $ operators

I have again modified the commands in Killing or removing a project - #4 by wtempel
If you would like to try again… (in case you have not resolved the issue already).

1 Like

That worked, thank you!

1 Like

Thanks @wtempel - stumbled upon this and cleared out a bunch of old projects :ok_hand: