nextflow-io / nextflow

A DSL for data-driven computational pipelines
http://nextflow.io
Apache License 2.0
2.73k stars 626 forks source link

fail to initialize nextflow environment when using nextflow container through docker2Singularity #1156

Closed gongyixiao closed 5 years ago

gongyixiao commented 5 years ago

Hi, there,

I'm trying to use nextflow docker container from https://hub.docker.com/r/nextflow/nextflow (I tried many versions starting from 18.10.1).

Using docker2singularity, I got the .img file and then try to use it to run nextflow, but I got error like below:

Error: Unable to access jarfile /.nextflow/framework/19.01.0/nextflow-19.01.0-one.jar
Unable to initialize nextflow environment

Singularity version: 3.1.1 Hope this information is enough for debugging this issue.

But in general, I'm using nextflow to submit nextflow jobs, which requires to use containerized nextflow, from dockerhub and using docker2singularity to make it run-able for HPC which doesn't support docker. I got this error and in addition to the Error like below:

WARNING: destination [some working dir] already in mount list: destination is already in the mount point list
Error: Unable to access jarfile /.nextflow/framework/19.04.1/nextflow-19.04.1-one.jar
Unable to initialize nextflow environment

I replicated this error with run .command.run and only get the Error but not the WARNING so I think it's somehow irrelevant (or relevant)?

More simplified, I run the following command extracted from .command.run and got the same Error but not WARNING: singularity exec -B [some path] -B "$PWD" [some path]/nextflow-nextflow-19.01.0.img nextflow

Thanks.

gongyixiao commented 5 years ago

I would like to update on this case. I have build my own nextflow docker image using miniconda and the Error mentioned above does not appear anymore but the WARNING still exists, and then following below error message:

May-18 18:00:37.144 [main] ERROR nextflow.cli.Launcher - @unknown
java.lang.ExceptionInInitializerError: null
    at nextflow.util.LoggerHelper$RollOnStartupPolicy.isTriggeringEvent(LoggerHelper.groovy:511)
    at ch.qos.logback.core.rolling.RollingFileAppender.subAppend(RollingFileAppender.java:230)
    at ch.qos.logback.core.OutputStreamAppender.append(OutputStreamAppender.java:100)
    at ch.qos.logback.core.UnsynchronizedAppenderBase.doAppend(UnsynchronizedAppenderBase.java:84)
    at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:51)
    at ch.qos.logback.classic.Logger.appendLoopOnAppenders(Logger.java:270)
    at ch.qos.logback.classic.Logger.callAppenders(Logger.java:257)
    at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:421)
    at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:383)
    at ch.qos.logback.classic.Logger.debug(Logger.java:482)
    at nextflow.cli.Launcher.run(Launcher.groovy:416)
    at nextflow.cli.Launcher.main(Launcher.groovy:586)
Caused by: java.nio.file.FileSystemException: /scratch: Read-only file system
    at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91)
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
    at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:384)
    at java.nio.file.Files.createDirectory(Files.java:674)
    at java.nio.file.Files.createAndCheckIsDirectory(Files.java:781)
    at java.nio.file.Files.createDirectories(Files.java:767)
    at nextflow.file.FileHelper.<clinit>(FileHelper.groovy:86)
    ... 12 common frames omitted
pditommaso commented 5 years ago

Sorry this is out of the scope of this channel