Skip to content

Error handling already existing write-protected plugins-folder #6562

@asp8200

Description

@asp8200

Bug report

We have a write-protected shared plugins-folder containing all plugins needed for running sarek v3.6.1, but NF tries to create the already existing plugins-folder:

$ sarek -profile test
NEXTFLOW ~ version 25.10.0
ERROR ~ Unable to create plugins dir: /ngc/tools/bin/nextflow/plugins

The plugins-folder /ngc/tools/bin/nextflow/plugins already exists, and it contains the needed plugins.

I'm running with
NXF_PLUGINS_DIR=/ngc/tools/bin/nextflow/plugins
NXF_OFFLINE=true
NXF_PLUGINS_DEFAULT=false

Expected behavior and actual behavior

NF shouldn't try to create the plugins-folder if it already exists. According to @jagedn, it might just be a matter of checking here whether the plugins-folder already exists.

Steps to reproduce the problem

I guess one can reproduce it by using a write-protected plugins-folder.

Program output

From .nextflow.log :

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

Environment

  • Nextflow version: 25.10.0 (but same behaviour on other versions of NF)
  • Java version: 25+36 (but same behaviour on other versions of Java)
  • Operating system: Rocky Linux v9.6

Additional context

The plugins-folder is on a shared NFS-drive. I'm running on a HPC with no internet-connection.

I had a conversion with @jagedn on slack about this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions