I’m having problems getting Nextflow to accept `NX...
# nextflow-plugins
a
I’m having problems getting Nextflow to accept
NXF_PLUGINS_DIR
set to a symlink. If I set
NXF_PLUGINS_DIR
to the real folder like
Copy code
/ngc/shared/nf_tools/.plugins-transactions/approved_source/plugins
then everything works. Now, in the folder
/ngc/shared/nf_tools
, I got this (relative) symlink
Copy code
plugins -> .plugins-transactions/approved_source/plugins
but when I set
Copy code
export NXF_PLUGINS_DIR=/ngc/shared/nf_tools/plugins
then, I get
Copy code
N E X T F L O W   ~  version 24.04.2

ERROR ~ Unable to create plugins dir: /ngc/shared/nf_tools/plugins
Don’t know why Nextflow is trying to create the folder
/ngc/shared/nf_tools/plugins
as it already exists, although as a relative symlink. N.B. We also use symlinks for other NXF-variables like
NXF_SINGULARITY_CACHEDIR
, and that doesn’t cause any problems.
🤔 1
j
I think is a Java issue PluginsFacade delegate to FileEx to create the path
Copy code
if( mode!=DEV_MODE && !FilesEx.mkdirs(root) )
            throw new IOException("Unable to create plugins dir: $root")
and FilesExt use the Files system java
Copy code
Files.createDirectories(self,attr)
but it seems some jdk have issue if some part are symlinks https://bugs.openjdk.org/browse/JDK-8130464 maybe you can try with another distro ...
👀 1
a
Thanks for the prompt reply, Jorge. I’ll try to see what versions of java I got available. Currently, I’m using this:
Copy code
openjdk 18 2022-03-22
OpenJDK Runtime Environment (build 18+36-2087)
OpenJDK 64-Bit Server VM (build 18+36-2087, mixed mode, sharing)
It works with
Copy code
openjdk 21.0.1 2023-10-17
OpenJDK Runtime Environment (build 21.0.1+12-29)
OpenJDK 64-Bit Server VM (build 21.0.1+12-29, mixed mode, sharing)
🥳 3
@Jorge: The above-mentioned problem now again poppes up once in a while, and this time I can’t make it go away by switching to another version of Java.
Copy code
java.nio.file.FileSystemException: /ngc/tools/bin/nextflow/plugins: Read-only file system
at java.base/sun.nio.fs.UnixException.translateTo10Exception(UnixException.java: 100)
at java.base/sun.nio.fs.UnixException.rethrowAsI0Exception(UnixException.java: 106)
java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java: 111)
java.base/sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:418)
at java.base/java.nio.file.Files.createDirectory(Files.java:647)
java.base/java.nio.file.Files.createAndCheckIsDirectory(Files.java:734)
java.base/java.nio.file.Files.createDirectories (Files.java:720)
org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
nextflow.extension.FilesEx.mkdirs(FilesEx.groovy:493)
nextflow.plugin.PluginsFacade. init(PluginsFacade.groovy:258)
nextflow.plugin.plugins. init(Plugins.groovy:39)
nextflow.plugin.Plugins.init(Plugins.groovy)
nextflow.cli.CmdRun.run(CmdRun.groovy:362)
at nextflow.cli.Launcher.run(Launcher.groovy:515 )
at nextflow.cli.Launcher.main(Launcher.groovy:675)
Nov-13 14:20:53.856 [main] ERROR nextflow.cli.Launcher - Unable to create plugins dir: /ngc/tools/bin/nextflow/plugins
the folder
/ngc/tools/bin/nextflow/plugins
already exists, and
NXF_OFFLINE=true
and
NXF_PLUGINS_DEFAULT=false
. Running NF v25.10.0 and Java 25+36
j
it seems plugins dir is marked as
Read-only file system
maybe someone changed the permissions of the folder ?
a
Thanks for the prompt reply. Our plugins folder is only writeable to our admin, and that’s the way we’d like to keep it.
j
it makes sense but the first thing PluginsFacade try do at startup is check if it can create the folder https://github.com/nextflow-io/nextflow/blob/master/modules/nf-commons/src/main/nextflow/plugin/PluginsFacade.groovy#L258
a
Is that a bug? Why would it try to create the folder if it is already there?
j
IMHO is not a bug but obviously can be improved with a simple check before to try the creation of the folder mabye you can create an issue in the repo but meantime I think you can try to change the inmutability attribute of the folder with
chattr +i
as root
a
Thanks for the suggestion. Unfortunately, the shared plugin-folder is on an NFS-disk which doesn’t support
chattr +i
🫤
j
the fix is really simple (surely add an if not exists...) but it requires the approval process and wait to be released, you know
a
I understand. I can’t find any open GitHub-issue on this thing in the NF-repo. Should I perhaps open an issue?
j
yes, I think so
a
I took the liberty of mentioning you in the Github-issue: https://github.com/nextflow-io/nextflow/issues/6562
👌 1