# Unable to Acquire Lock on Session - Already Moved /work Directory

**URL:** <https://community.seqera.io/t/unable-to-acquire-lock-on-session-already-moved-work-directory/1696>\
**Category:** Ask for help\
**Tags:** nextflow, aws, nf-core, ampliseq, platform\
**Created:** [February 3, 2025, 5:03pm UTC](https://community.seqera.io/t/unable-to-acquire-lock-on-session-already-moved-work-directory/1696 "2025-02-03T17:03:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Megan\_Justice](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/megan_justice/32/1405_2.png) [@Megan\_Justice](https://community.seqera.io/u/Megan_Justice)\
**Post date:** [February 3, 2025, 5:03pm UTC](https://community.seqera.io/t/unable-to-acquire-lock-on-session-already-moved-work-directory/1696/1 "2025-02-03T17:03:04Z")

</div>

Hello, all!

Once again, apologies if I don’t do this correctly as I am new to the forum and nextflow.

I had an nf-core pipeline running last night, but it was killed due to memory purposes as I forgot to point to my custom config file.

Command:  
`nextflow run nf-core/ampliseq -params-file ./params.yaml -profile docker --metadata ./Metadata-fixed.txt --outdir ./results --save_intermediates --trunclenf 268 --trunclenr 268`

I tried to -resume the run today by adding -resume marvelous\_ardinghelli (previous run name) to my script.  
Command:  
`nextflow run nf-core/ampliseq -params-file ./params.yaml -profile docker --metadata ./Metadata-fixed.txt --outdir ./results --save_intermediates --email megan.justice@okstate.edu --trunclenf 268 --trunclenr 268 -c nf.config -resume marvelous_ardinghelli`

I got the following warning:

> WARN: nf-core pipelines do not accept positional arguments. The positional argument `marvelous_ardinghelli` has been detected.  
> HINT: A common mistake is to provide multiple values separated by spaces e.g. `-profile test, docker`.

Thinking it did not correctly interpret my -resume command, and fearing it would just kick off a new instance of the pipeline, I hit enter and this resulted in the job Stopping:

> [2]+ Stopped bash nextflow-ampliseq.sh.

Since then, I have been trying to resume my initial job (marvelous\_ardinghelli) by changing the -resume from the run name to the session ID, but keep getting the notice that it is:

> ERROR ~ Unable to acquire lock on session with ID 3a2485f9-35c8-4380-9288-2f7a15d1c93b
> 
> Common reasons for this error are:
> 
> - You are trying to resume the execution of an already running pipeline
> - A previous execution was abruptly interrupted, leaving the session open

If I run lsof on the LOCK object, I see:

> java 1657060 ec2-user 12uW REG 202,1 0 134568842 /home/ec2-user/Alexis16s/.next  
> [3] Exit 1 bash ./nextflow-ampliseq.sh

I found some documentation here `https://nf-co.re/docs/usage/troubleshooting/aquire_lock_error` that says to remove the work directory. That makes me incredibly nervous, though.

So, instead I moved the work directory out of the folder I was working in, just one level higher, and am trying the same nextflow run command. However, I get the same issue of

> Unable to acquire lock on session with ID

I have tried to clean up my directory by doing nextflow log, then nextflow clean . However, I get the same `'Unable to acquire lock on session with ID....'` issue.

Is there any way to recover the \>24 hours of work that has already been done in my original nextflow run? I just need to resume it with my config file.
