These are chat archives for nextflow-io/nextflow

17th
Apr 2019
KennethLim314
@KennethLim314
Apr 17 02:57

Hi everyone, I've been trying to troubleshoot an odd error with running nextflow on AWS-batch. This trivial pipeline fails, with the following error. Would anyone have any idea where things might be going wrong?

pipeline

process sayHello {
    publishDir params.pub_dir
    output:
    file "test.out" into test1

    script:
    """
    echo Hello World! > test.out
    """
}

error

Status: reasonTask failed to start
Container message: CannotStartContainerError: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"/usr/bin/tini\": stat /usr/bin/tini: no such file or directory": unknown

I get that something involving missing init files is involved here, but both the docker image, as well as the VM from which it was run contain tini at the designated path.

image and VM

ls /usr/bin | grep tin
>>> tini
Ethan Bensman
@ebenz99
Apr 17 04:22
Does anyone have any guidance on how to get nextflow to un-cache settings from the nextflow.config file? I added values for some k8 fields that I'd now like to remove/return to their defaults, but even after deleting those fields and running nextflow with the `-latest' flag, the old values in those fields persist.
KennethLim314
@KennethLim314
Apr 17 04:45
@KennethLim314 Nevermind, figured it out. Default AWS AMI for aws-batch compute environments does not contain tini. A custom AMI is thus necessary for this
KennethLim314
@KennethLim314
Apr 17 07:49

Hi everyone, same setup as earlier, but with a less decipherable error

pipeline

process sayHello {
    publishDir params.pub_dir
    output:
    file "test.out" into test1

    script:
    """
    echo Hello World! > test.out
    """
}

Currently, executing this results in the following error message from AWS batch

Status reasonEssential container in task exited
Container message

/usr/bin/python2.7: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory

However, local execution of the pipeline seems to work fine.

KennethLim314
@KennethLim314
Apr 17 08:08
looking at the nextflow logs, it appears to fail here
Apr-17 06:25:21.803 [Task monitor] DEBUG n.c.aws.batch.AwsBatchTaskHandler - [AWS BATCH] Cannot read exitstatus for task: `sayHello`
Paolo Di Tommaso
@pditommaso
Apr 17 08:17
This looks something bad with python/awscli installation in your Ami
KennethLim314
@KennethLim314
Apr 17 08:28
hm
thing is, I've started an EC2 instance with that same AMI
and local execution there works fine
KochTobi
@KochTobi
Apr 17 08:29
@KennethLim314 Maybe an IAM permission issue?
KennethLim314
@KennethLim314
Apr 17 08:31
the instance has S3 fullaccess, batchservicerole and AmazonEC2ContainerServiceforEC2Role
for the IAM
And the compute environment has the same role as the EC2 instance
@pditommaso @KochTobi Thanks for taking the time to help me out
KochTobi
@KochTobi
Apr 17 08:36
what is batchservicerole in your case? Is it AWSBatchFullAccess?
KennethLim314
@KennethLim314
Apr 17 08:55
The batchservice role is the AWSBatchServiceRole, not AWSBatchFullAccess
Let me see if giving full access throws the same error
Nope, didn't work
KennethLim314
@KennethLim314
Apr 17 09:29

This may happen when Batch is unable to execute the process script. A common cause of this problem is that the Docker container image you have specified uses a non standard entrypoint which does not allow the execution of the Bash launcher script required by Nextflow to run the job.

This was in the documentation.

Tried: Emptied the ENTRYPOINT with "ENTRYPOINT []". Same error

Venkat Malladi
@vsmalladi
Apr 17 12:07
I am trying to work out this proble. I output a versions.txt file from every process and amy trying to collect them for a multiqc report
since the process is run many times I have the same filename every time.
Would this syntax work: file ('version_*.txt') from trimReadsVersions.collect().distinct()
file ('version_*.txt') from trimReadsVersions.collect().distinct()
Mazen Mahdi
@Shamanga_13_twitter
Apr 17 12:52
Hello all,
I have what might be a naive question, but I just started using nextflow, and couldn't find anything online.
I have a docker container that contains an executable, the executable simply takes an input image, does some processing and outputs another image.
How do I pipe the output image from this container to a process after it that would require this image as input?
Paolo Di Tommaso
@pditommaso
Apr 17 13:14
in principle it should be transparent to the container in the meaning it should work as you would do w/o using a docker image
@vsmalladi the file ('version_*.txt') does not catch only the files with that prefix, it does renames all files with that prefix. Then I think you should do trimReadsVersions.distinct().collect() instead
Nicholas Sanderson
@nickdsanderson_twitter
Apr 17 13:35

Hi all, I'm wondering if it is possible to filter a channel by one of the tuples. Currently I'm achieving this with .filter like so

.filter{var_bool || it[3] =~ Eval.me('/penA/')}

But I want to replace the penA with a list of genes to filter by, if the it[3] is not in the list, it should be filtered out. Any suggestions?

Paolo Di Tommaso
@pditommaso
Apr 17 13:35
why eval !??
Nicholas Sanderson
@nickdsanderson_twitter
Apr 17 13:36
It was an example I saw before
open to using anything else
Paolo Di Tommaso
@pditommaso
Apr 17 13:36
.filter{var_bool || it[3] =~ /penA/}
would not be better ? :D
Nicholas Sanderson
@nickdsanderson_twitter
Apr 17 13:37
I'll try it, but can I replace the penA with a list of genes?
Paolo Di Tommaso
@pditommaso
Apr 17 13:37
anyhow is list contains less than 3 elems, the [x] returns null
that's a regex
not a regex parser sorry :D
Nicholas Sanderson
@nickdsanderson_twitter
Apr 17 13:39
it doesn't need regex, they should be exact matches
Paolo Di Tommaso
@pditommaso
Apr 17 13:41
eh.. =~ is a regex matching operator
if you want to check the content of a list use el in ['a','b', ... ]
nextflow console is your friend
Nicholas Sanderson
@nickdsanderson_twitter
Apr 17 13:46
Thanks, thats working
Venkat Malladi
@vsmalladi
Apr 17 14:34
Thanks @pditommaso Paolo I will try that
KochTobi
@KochTobi
Apr 17 17:44
Is there an easy way to generate a timeline (like -with-timeline) from the tracefile using nextflow (without rerunning the pipeline)?
Tobias "Tobi" Schraink
@tobsecret
Apr 17 19:25
How can I substitute a bash variable in a regular NF string? Motivation:
I want to have a consistent singularity cacheDir location on $SCRATCH for each user cacheDir = "\$SCRATCH/singularity_nf_image_caches"