epi2me-labs / wf-metagenomics

Metagenomic classification of long-read sequencing data
Other
56 stars 23 forks source link

[Bug]: Permission denied, I have tried almost everything from another similar issue, also tried to give permissions using chmod, didn't work. #43

Closed chessleensingh closed 1 year ago

chessleensingh commented 1 year ago

What happened?

A bug happened!

Operating System

ubuntu 20.04

Workflow Execution

EPI2ME Labs desktop application

Workflow Execution - EPI2ME Labs Versions

EPI2ME Labs V4.1.3

Workflow Execution - CLI Execution Profile

Docker

Workflow Version

v2.0.10

Relevant log output

Mar-17 10:36:17.078 [main] DEBUG nextflow.cli.Launcher - $> /usr/lib/epi2melabs/resources/nextflow-all -log /home/abiplantlab/epi2melabs/instances/wf-metagenomics_30807338-7952-49c2-a7ce-28712da563b8/nextflow.log run /home/abiplantlab/epi2melabs/workflows/epi2me-labs/wf-metagenomics/main.nf -params-file /home/abiplantlab/epi2melabs/instances/wf-metagenomics_30807338-7952-49c2-a7ce-28712da563b8/params.json -w /home/abiplantlab/epi2melabs/instances/wf-metagenomics_30807338-7952-49c2-a7ce-28712da563b8/work -ansi-log false -offline -profile standard -resume -name reverent_joliot -c /home/abiplantlab/epi2melabs/instances/wf-metagenomics_30807338-7952-49c2-a7ce-28712da563b8/demo.config
Mar-17 10:36:17.143 [main] INFO  nextflow.cli.CmdRun - N E X T F L O W  ~  version 22.04.5
Mar-17 10:36:17.161 [main] DEBUG nextflow.config.ConfigBuilder - Found config base: /home/abiplantlab/epi2melabs/workflows/epi2me-labs/wf-metagenomics/nextflow.config
Mar-17 10:36:17.164 [main] DEBUG nextflow.config.ConfigBuilder - User config file: /home/abiplantlab/epi2melabs/instances/wf-metagenomics_30807338-7952-49c2-a7ce-28712da563b8/demo.config
Mar-17 10:36:17.164 [main] DEBUG nextflow.config.ConfigBuilder - Parsing config file: /home/abiplantlab/epi2melabs/workflows/epi2me-labs/wf-metagenomics/nextflow.config
Mar-17 10:36:17.164 [main] DEBUG nextflow.config.ConfigBuilder - Parsing config file: /home/abiplantlab/epi2melabs/instances/wf-metagenomics_30807338-7952-49c2-a7ce-28712da563b8/demo.config
Mar-17 10:36:17.197 [main] DEBUG nextflow.config.ConfigBuilder - Applying config profile: `standard`
Mar-17 10:36:17.942 [main] DEBUG nextflow.config.ConfigBuilder - Applying config profile: `standard`
Mar-17 10:36:17.995 [main] DEBUG nextflow.cli.CmdRun - Applied DSL=2 from script declararion
Mar-17 10:36:18.012 [main] INFO  nextflow.cli.CmdRun - Launching `/home/abiplantlab/epi2melabs/workflows/epi2me-labs/wf-metagenomics/main.nf` [reverent_joliot] DSL2 - revision: db65d066e8
Mar-17 10:36:18.025 [main] DEBUG nextflow.plugin.PluginsFacade - Setting up plugin manager > mode=prod; plugins-dir=/home/abiplantlab/epi2melabs/workflows/.nextflow/plugins; core-plugins: nf-amazon@1.7.2,nf-azure@0.13.2,nf-console@1.0.3,nf-ga4gh@1.0.3,nf-google@1.1.4,nf-sqldb@0.4.0,nf-tower@1.4.0
Mar-17 10:36:18.026 [main] DEBUG nextflow.plugin.PluginsFacade - Plugins default=[]
Mar-17 10:36:18.038 [main] INFO  org.pf4j.DefaultPluginStatusProvider - Enabled plugins: []
Mar-17 10:36:18.039 [main] INFO  org.pf4j.DefaultPluginStatusProvider - Disabled plugins: []
Mar-17 10:36:18.043 [main] INFO  org.pf4j.DefaultPluginManager - PF4J version 3.4.1 in 'deployment' mode
Mar-17 10:36:18.055 [main] INFO  org.pf4j.AbstractPluginManager - No plugins
Mar-17 10:36:18.111 [main] DEBUG nextflow.Session - Session uuid: 6213c586-62d6-419f-a4d4-58225e8b7a9f
Mar-17 10:36:18.111 [main] DEBUG nextflow.Session - Run name: reverent_joliot
Mar-17 10:36:18.112 [main] DEBUG nextflow.Session - Executor pool size: 12
Mar-17 10:36:18.145 [main] DEBUG nextflow.cli.CmdRun - 
  Version: 22.04.5 build 5709
  Created: 15-07-2022 16:22 UTC (11:22 CDT)
  System: Linux 5.15.0-67-generic
  Runtime: Groovy 3.0.10 on OpenJDK 64-Bit Server VM 11.0.18+10-post-Ubuntu-0ubuntu120.04.1
  Encoding: UTF-8 (UTF-8)
  Process: 148054@abiplantlab-OptiPlex-3070 [127.0.1.1]
  CPUs: 12 - Mem: 15.4 GB (470.8 MB) - Swap: 2 GB (973.2 MB)
Mar-17 10:36:18.175 [main] DEBUG nextflow.Session - Work-dir: /home/abiplantlab/epi2melabs/instances/wf-metagenomics_30807338-7952-49c2-a7ce-28712da563b8/work [ext2/ext3]
Mar-17 10:36:18.221 [main] DEBUG nextflow.executor.ExecutorFactory - Extension executors providers=[GoogleLifeSciencesExecutor, AwsBatchExecutor]
Mar-17 10:36:18.234 [main] DEBUG nextflow.Session - Observer factory: DefaultObserverFactory
Mar-17 10:36:18.254 [main] DEBUG nextflow.Session - Observer factory: TowerFactory
Mar-17 10:36:18.284 [main] DEBUG nextflow.cache.CacheFactory - Using Nextflow cache factory: nextflow.cache.DefaultCacheFactory
Mar-17 10:36:18.293 [main] DEBUG nextflow.util.CustomThreadPool - Creating default thread pool > poolSize: 13; maxThreads: 1000
Mar-17 10:36:18.452 [main] DEBUG nextflow.Session - Session start invoked
Mar-17 10:36:18.457 [main] DEBUG nextflow.trace.TraceFileObserver - Flow starting -- trace file: /home/abiplantlab/epi2melabs/instances/wf-metagenomics_30807338-7952-49c2-a7ce-28712da563b8/output/execution/trace.txt
Mar-17 10:36:18.461 [main] DEBUG nextflow.Session - Using default localLib path: /home/abiplantlab/epi2melabs/workflows/epi2me-labs/wf-metagenomics/lib
Mar-17 10:36:18.465 [main] DEBUG nextflow.Session - Adding to the classpath library: /home/abiplantlab/epi2melabs/workflows/epi2me-labs/wf-metagenomics/lib
Mar-17 10:36:18.466 [main] DEBUG nextflow.Session - Adding to the classpath library: /home/abiplantlab/epi2melabs/workflows/epi2me-labs/wf-metagenomics/lib/nfcore_external_java_deps.jar
Mar-17 10:36:19.579 [main] DEBUG nextflow.script.ScriptRunner - > Launching execution
Mar-17 10:36:20.886 [main] WARN  nextflow.NextflowMeta$Preview - NEXTFLOW RECURSION IS A PREVIEW FEATURE - SYNTAX AND FUNCTIONALITY CAN CHANGE IN FUTURE RELEASE
Mar-17 10:36:20.993 [main] INFO  nextflow.Nextflow - 
||||||||||   _____ ____ ___ ____  __  __ _____      _       _
||||||||||  | ____|  _ \_ _|___ \|  \/  | ____|    | | __ _| |__  ___
|||||       |  _| | |_) | |  __) | |\/| |  _| _____| |/ _` | '_ \/ __|
|||||       | |___|  __/| | / __/| |  | | |__|_____| | (_| | |_) \__ \
||||||||||  |_____|_|  |___|_____|_|  |_|_____|    |_|\__,_|_.__/|___/
||||||||||  wf-metagenomics v2.0.10
--------------------------------------------------------------------------------
Core Nextflow options
  runName        : reverent_joliot
  containerEngine: docker
  launchDir      : /home/abiplantlab/epi2melabs/instances/wf-metagenomics_30807338-7952-49c2-a7ce-28712da563b8
  workDir        : /home/abiplantlab/epi2melabs/instances/wf-metagenomics_30807338-7952-49c2-a7ce-28712da563b8/work
  projectDir     : /home/abiplantlab/epi2melabs/workflows/epi2me-labs/wf-metagenomics
  userName       : abiplantlab
  profile        : standard
  configFiles    : /home/abiplantlab/epi2melabs/workflows/epi2me-labs/wf-metagenomics/nextflow.config, /home/abiplantlab/epi2melabs/instances/wf-metagenomics_30807338-7952-49c2-a7ce-28712da563b8/demo.config

Input Options
  fastq          : /home/abiplantlab/epi2melabs/demo/epi2me-labs/wf-metagenomics/wf-metagenomics-demo/test_data

Reference Options
  database_sets  : [ncbi_16s_18s:[reference:https://ont-exd-int-s3-euwst1-epi2me-labs.s3.amazonaws.com/wf-metagenomics/ncbi_16s_18s/ncbi_targeted_loci_16s_18s.fna, refindex:https://ont-exd-int-s3-euwst1-epi2me-labs.s3.amazonaws.com/wf-metagenomics/ncbi_16s_18s/ncbi_targeted_loci_16s_18s.fna.fai, database:https://ont-exd-int-s3-euwst1-epi2me-labs.s3.amazonaws.com/wf-metagenomics/ncbi_16s_18s/ncbi_targeted_loci_kraken2.tar.gz, kmer_dist:https://ont-exd-int-s3-euwst1-epi2me-labs.s3.amazonaws.com/wf-metagenomics/ncbi_16s_18s/database1000mers.kmer_distrib, ref2taxid:https://ont-exd-int-s3-euwst1-epi2me-labs.s3.amazonaws.com/wf-metagenomics/ncbi_16s_18s/ref2taxid.targloci.tsv, taxonomy:https://ftp.ncbi.nlm.nih.gov/pub/taxonomy/taxdump_archive/taxdmp_2023-01-01.zip], ncbi_16s_18s_28s_ITS:[reference:https://ont-exd-int-s3-euwst1-epi2me-labs.s3.amazonaws.com/wf-metagenomics/ncbi_16s_18s_28s_ITS/ncbi_16s_18s_28s_ITS.fna, refindex:https://ont-exd-int-s3-euwst1-epi2me-labs.s3.amazonaws.com/wf-metagenomics/ncbi_16s_18s_28s_ITS/ncbi_16s_18s_28s_ITS.fna.fai, database:https://ont-exd-int-s3-euwst1-epi2me-labs.s3.amazonaws.com/wf-metagenomics/ncbi_16s_18s_28s_ITS/ncbi_16s_18s_28s_ITS_kraken2.tar.gz, kmer_dist:https://ont-exd-int-s3-euwst1-epi2me-labs.s3.amazonaws.com/wf-metagenomics/ncbi_16s_18s_28s_ITS/database1000mers.kmer_distrib, ref2taxid:https://ont-exd-int-s3-euwst1-epi2me-labs.s3.amazonaws.com/wf-metagenomics/ncbi_16s_18s_28s_ITS/ref2taxid.ncbi_16s_18s_28s_ITS.tsv, taxonomy:https://ftp.ncbi.nlm.nih.gov/pub/taxonomy/taxdump_archive/taxdmp_2023-01-01.zip], PlusPF-8:[database:https://genome-idx.s3.amazonaws.com/kraken/k2_pluspf_08gb_20221209.tar.gz, taxonomy:https://ftp.ncbi.nlm.nih.gov/pub/taxonomy/taxdump_archive/taxdmp_2022-09-01.zip]]

Output Options
  out_dir        : /home/abiplantlab/epi2melabs/instances/wf-metagenomics_30807338-7952-49c2-a7ce-28712da563b8/output

Other parameters
  process_label  : wfmetagenomics

!! Only displaying parameters that differ from the pipeline defaults !!
--------------------------------------------------------------------------------
If you use epi2me-labs/wf-metagenomics for your analysis please cite:

* The nf-core framework
  https://doi.org/10.1038/s41587-020-0439-x

--------------------------------------------------------------------------------
This is epi2me-labs/wf-metagenomics v2.0.10.
--------------------------------------------------------------------------------
Mar-17 10:36:21.842 [main] INFO  nextflow.Nextflow - Checking inputs.
Mar-17 10:36:21.893 [main] DEBUG nextflow.script.ProcessConfig - Config settings `withLabel:wfmetagenomics` matches labels `wfmetagenomics` for process with name kraken_pipeline:unpackTaxonomy
Mar-17 10:36:21.909 [main] DEBUG nextflow.executor.ExecutorFactory - << taskConfig executor: null
Mar-17 10:36:21.909 [main] DEBUG nextflow.executor.ExecutorFactory - >> processorType: 'local'
Mar-17 10:36:21.912 [main] DEBUG nextflow.executor.Executor - [warm up] executor > local
Mar-17 10:36:21.916 [main] DEBUG n.processor.LocalPollingMonitor - Creating local task monitor for executor 'local' > cpus=8; memory=8 GB; capacity=12; pollInterval=100ms; dumpInterval=5m
Mar-17 10:36:21.994 [main] DEBUG nextflow.script.ProcessConfig - Config settings `withLabel:wfmetagenomics` matches labels `wfmetagenomics` for process with name kraken_pipeline:unpackDatabase
Mar-17 10:36:21.995 [main] DEBUG nextflow.executor.ExecutorFactory - << taskConfig executor: null
Mar-17 10:36:21.995 [main] DEBUG nextflow.executor.ExecutorFactory - >> processorType: 'local'
Mar-17 10:36:22.001 [main] DEBUG nextflow.script.ProcessConfig - Config settings `withLabel:wfmetagenomics` matches labels `wfmetagenomics` for process with name kraken_pipeline:determine_bracken_length
Mar-17 10:36:22.002 [main] DEBUG nextflow.executor.ExecutorFactory - << taskConfig executor: null
Mar-17 10:36:22.002 [main] DEBUG nextflow.executor.ExecutorFactory - >> processorType: 'local'
Mar-17 10:36:22.008 [main] DEBUG nextflow.script.ProcessConfig - Config settings `withLabel:wfmetagenomics` matches labels `wfmetagenomics` for process with name kraken_pipeline:kraken_server
Mar-17 10:36:22.009 [main] DEBUG nextflow.executor.ExecutorFactory - << taskConfig executor: null
Mar-17 10:36:22.009 [main] DEBUG nextflow.executor.ExecutorFactory - >> processorType: 'local'
Mar-17 10:36:22.011 [main] INFO  nextflow.Nextflow - 
Mar-17 10:36:22.011 [main] INFO  nextflow.Nextflow - Input directory assumed to be containing one or more directories containing fastq files.
Mar-17 10:36:22.045 [main] DEBUG nextflow.script.ProcessConfig - Config settings `withLabel:wfmetagenomics` matches labels `wfmetagenomics` for process with name kraken_pipeline:kraken2_client
Mar-17 10:36:22.046 [main] DEBUG nextflow.executor.ExecutorFactory - << taskConfig executor: null
Mar-17 10:36:22.046 [main] DEBUG nextflow.executor.ExecutorFactory - >> processorType: 'local'
Mar-17 10:36:22.065 [main] DEBUG nextflow.script.ProcessConfig - Config settings `withLabel:wfmetagenomics` matches labels `wfmetagenomics` for process with name kraken_pipeline:progressive_stats
Mar-17 10:36:22.066 [main] DEBUG nextflow.executor.ExecutorFactory - << taskConfig executor: null
Mar-17 10:36:22.066 [main] DEBUG nextflow.executor.ExecutorFactory - >> processorType: 'local'
Mar-17 10:36:22.086 [main] DEBUG nextflow.script.ProcessConfig - Config settings `withLabel:wfmetagenomics` matches labels `wfmetagenomics` for process with name kraken_pipeline:progressive_kraken_reports
Mar-17 10:36:22.086 [main] DEBUG nextflow.executor.ExecutorFactory - << taskConfig executor: null
Mar-17 10:36:22.086 [main] DEBUG nextflow.executor.ExecutorFactory - >> processorType: 'local'
Mar-17 10:36:22.108 [main] DEBUG nextflow.script.ProcessConfig - Config settings `withLabel:wfmetagenomics` matches labels `wfmetagenomics` for process with name kraken_pipeline:progressive_bracken
Mar-17 10:36:22.108 [main] DEBUG nextflow.executor.ExecutorFactory - << taskConfig executor: null
Mar-17 10:36:22.109 [main] DEBUG nextflow.executor.ExecutorFactory - >> processorType: 'local'
Mar-17 10:36:22.111 [main] DEBUG nextflow.script.ProcessConfig - Config settings `withLabel:wfmetagenomics` matches labels `wfmetagenomics` for process with name kraken_pipeline:getVersions
Mar-17 10:36:22.111 [main] DEBUG nextflow.executor.ExecutorFactory - << taskConfig executor: null
Mar-17 10:36:22.111 [main] DEBUG nextflow.executor.ExecutorFactory - >> processorType: 'local'
Mar-17 10:36:22.118 [main] DEBUG nextflow.script.ProcessConfig - Config settings `withLabel:wfmetagenomics` matches labels `wfmetagenomics` for process with name kraken_pipeline:getParams
Mar-17 10:36:22.119 [main] DEBUG nextflow.executor.ExecutorFactory - << taskConfig executor: null
Mar-17 10:36:22.119 [main] DEBUG nextflow.executor.ExecutorFactory - >> processorType: 'local'
Mar-17 10:36:22.126 [main] DEBUG nextflow.script.ProcessConfig - Config settings `withLabel:wfmetagenomics` matches labels `wfmetagenomics` for process with name kraken_pipeline:makeReport
Mar-17 10:36:22.126 [main] DEBUG nextflow.executor.ExecutorFactory - << taskConfig executor: null
Mar-17 10:36:22.126 [main] DEBUG nextflow.executor.ExecutorFactory - >> processorType: 'local'
Mar-17 10:36:22.131 [main] DEBUG nextflow.script.ProcessConfig - Config settings `withLabel:wfmetagenomics` matches labels `wfmetagenomics` for process with name kraken_pipeline:output
Mar-17 10:36:22.131 [main] DEBUG nextflow.executor.ExecutorFactory - << taskConfig executor: null
Mar-17 10:36:22.131 [main] DEBUG nextflow.executor.ExecutorFactory - >> processorType: 'local'
Mar-17 10:36:22.136 [main] DEBUG nextflow.script.ProcessConfig - Config settings `withLabel:wfmetagenomics` matches labels `wfmetagenomics` for process with name kraken_pipeline:stop_kraken_server
Mar-17 10:36:22.136 [main] DEBUG nextflow.executor.ExecutorFactory - << taskConfig executor: null
Mar-17 10:36:22.136 [main] DEBUG nextflow.executor.ExecutorFactory - >> processorType: 'local'
Mar-17 10:36:22.141 [main] DEBUG nextflow.Session - Workflow process names [dsl2]: combineFilterFastq, unpackDatabase, kraken_server, kraken_pipeline:unpackTaxonomy, kraken_pipeline:stop_kraken_server, kraken_pipeline:kraken2_client, progressive_stats, kraken_pipeline:progressive_stats, output, stop_kraken_server, kraken_pipeline:makeReport, makeReport, minimap, getVersions, kraken_pipeline:progressive_kraken_reports, unpackTaxonomy, extractMinimap2Reads, rebatchFastq, kraken_pipeline:getParams, kraken_pipeline:unpackDatabase, kraken2_client, kraken_pipeline:getVersions, isolateSingleFile, progressive_bracken, determine_bracken_length, progressive_kraken_reports, kraken_pipeline:determine_bracken_length, checkSampleSheet, stopCondition, kraken_pipeline:kraken_server, getParams, kraken_pipeline:progressive_bracken, kraken_pipeline:output
Mar-17 10:36:22.141 [main] DEBUG nextflow.Session - Ignite dataflow network (22)
Mar-17 10:36:22.141 [main] DEBUG nextflow.processor.TaskProcessor - Starting process > kraken_pipeline:unpackTaxonomy
Mar-17 10:36:22.141 [main] DEBUG nextflow.processor.TaskProcessor - Starting process > kraken_pipeline:unpackDatabase
Mar-17 10:36:22.141 [main] DEBUG nextflow.processor.TaskProcessor - Starting process > kraken_pipeline:determine_bracken_length
Mar-17 10:36:22.141 [main] DEBUG nextflow.processor.TaskProcessor - Starting process > kraken_pipeline:kraken_server
Mar-17 10:36:22.149 [PathVisitor-1] DEBUG nextflow.file.PathVisitor - files for syntax: glob; folder: /home/abiplantlab/epi2melabs/demo/epi2me-labs/wf-metagenomics/wf-metagenomics-demo/test_data/; pattern: **/*f*q*; options: [:]
Mar-17 10:36:22.151 [main] DEBUG nextflow.processor.TaskProcessor - Starting process > kraken_pipeline:kraken2_client
Mar-17 10:36:22.152 [main] DEBUG nextflow.processor.TaskProcessor - Starting process > kraken_pipeline:progressive_stats
Mar-17 10:36:22.153 [main] DEBUG nextflow.processor.TaskProcessor - Starting process > kraken_pipeline:progressive_kraken_reports
Mar-17 10:36:22.153 [main] DEBUG nextflow.processor.TaskProcessor - Starting process > kraken_pipeline:progressive_bracken
Mar-17 10:36:22.153 [main] DEBUG nextflow.processor.TaskProcessor - Starting process > kraken_pipeline:getVersions
Mar-17 10:36:22.153 [main] DEBUG nextflow.processor.TaskProcessor - Starting process > kraken_pipeline:getParams
Mar-17 10:36:22.153 [main] DEBUG nextflow.processor.TaskProcessor - Starting process > kraken_pipeline:makeReport
Mar-17 10:36:22.154 [main] DEBUG nextflow.processor.TaskProcessor - Starting process > kraken_pipeline:output
Mar-17 10:36:22.154 [main] DEBUG nextflow.processor.TaskProcessor - Starting process > kraken_pipeline:stop_kraken_server
Mar-17 10:36:22.154 [main] DEBUG nextflow.script.ScriptRunner - > Await termination 
Mar-17 10:36:22.154 [main] DEBUG nextflow.Session - Session await
Mar-17 10:36:22.339 [Task submitter] DEBUG nextflow.executor.LocalTaskHandler - Launch cmd line: /bin/bash -ue .command.run
Mar-17 10:36:22.341 [Task submitter] INFO  nextflow.Session - [c1/52af41] Submitted process > kraken_pipeline:kraken2_client (8)
Mar-17 10:36:22.371 [Task submitter] DEBUG nextflow.executor.LocalTaskHandler - Launch cmd line: /bin/bash -ue .command.run
Mar-17 10:36:22.371 [Task submitter] INFO  nextflow.Session - [4a/354869] Submitted process > kraken_pipeline:getVersions
Mar-17 10:36:22.381 [Task submitter] DEBUG nextflow.executor.LocalTaskHandler - Launch cmd line: /bin/bash -ue .command.run
Mar-17 10:36:22.381 [Task submitter] INFO  nextflow.Session - [7b/a2f1a9] Submitted process > kraken_pipeline:getParams
Mar-17 10:36:22.652 [Actor Thread 9] DEBUG nextflow.util.ThreadPoolBuilder - Creating thread pool 'FileTransfer' minSize=4; maxSize=4; workQueue=LinkedBlockingQueue[10000]; allowCoreThreadTimeout=false
Mar-17 10:36:22.781 [FileTransfer-1] DEBUG nextflow.file.FilePorter - Local cache found for foreign file https://ftp.ncbi.nlm.nih.gov/pub/taxonomy/taxdump_archive/taxdmp_2023-01-01.zip at /home/abiplantlab/epi2melabs/instances/wf-metagenomics_30807338-7952-49c2-a7ce-28712da563b8/work/stage/eb/fadd9cb6329e266d718a18310c9408/taxdmp_2023-01-01.zip
Mar-17 10:36:23.392 [Task submitter] DEBUG nextflow.executor.LocalTaskHandler - Launch cmd line: /bin/bash -ue .command.run
Mar-17 10:36:23.392 [Task submitter] INFO  nextflow.Session - [9d/01f361] Submitted process > kraken_pipeline:unpackTaxonomy
Mar-17 10:36:23.928 [Task monitor] DEBUG n.processor.TaskPollingMonitor - Task completed > TaskHandler[id: 3; name: kraken_pipeline:getParams; status: COMPLETED; exit: 1; error: -; workDir: /home/abiplantlab/epi2melabs/instances/wf-metagenomics_30807338-7952-49c2-a7ce-28712da563b8/work/7b/a2f1a9d35dd775f165e7359897617d]
Mar-17 10:36:23.959 [Task monitor] ERROR nextflow.processor.TaskProcessor - Error executing process > 'kraken_pipeline:getParams'

Caused by:
  Process `kraken_pipeline:getParams` terminated with an error exit status (1)

Command executed:

  # Output nextflow params object to JSON
      echo '{
      "help": false,
      "version": false,
      "fastq": "/home/abiplantlab/epi2melabs/demo/epi2me-labs/wf-metagenomics/wf-metagenomics-demo/test_data",
      "sample": null,
      "sample_sheet": null,
      "max_len": null,
      "min_len": 0,
      "taxonomy": null,
      "classifier": "kraken2",
      "reference": null,
      "ref2taxid": null,
      "minimap2filter": null,
      "minimap2exclude": false,
      "split_prefix": false,
      "database": null,
      "bracken_dist": null,
      "bracken_length": null,
      "bracken_level": "S",
      "out_dir": "/home/abiplantlab/epi2melabs/instances/wf-metagenomics_30807338-7952-49c2-a7ce-28712da563b8/output",
      "disable_ping": false,
      "threads": 2,
      "aws_image_prefix": null,
      "aws_queue": null,
      "batch_size": 0,
      "watch_path": false,
      "store_dir": "store_dir",
      "read_limit": null,
      "port": 8080,
      "database_set": "ncbi_16s_18s",
      "database_sets": {
          "ncbi_16s_18s": {
              "reference": "https://ont-exd-int-s3-euwst1-epi2me-labs.s3.amazonaws.com/wf-metagenomics/ncbi_16s_18s/ncbi_targeted_loci_16s_18s.fna",
              "refindex": "https://ont-exd-int-s3-euwst1-epi2me-labs.s3.amazonaws.com/wf-metagenomics/ncbi_16s_18s/ncbi_targeted_loci_16s_18s.fna.fai",
              "database": "https://ont-exd-int-s3-euwst1-epi2me-labs.s3.amazonaws.com/wf-metagenomics/ncbi_16s_18s/ncbi_targeted_loci_kraken2.tar.gz",
              "kmer_dist": "https://ont-exd-int-s3-euwst1-epi2me-labs.s3.amazonaws.com/wf-metagenomics/ncbi_16s_18s/database1000mers.kmer_distrib",
              "ref2taxid": "https://ont-exd-int-s3-euwst1-epi2me-labs.s3.amazonaws.com/wf-metagenomics/ncbi_16s_18s/ref2taxid.targloci.tsv",
              "taxonomy": "https://ftp.ncbi.nlm.nih.gov/pub/taxonomy/taxdump_archive/taxdmp_2023-01-01.zip"
          },
          "ncbi_16s_18s_28s_ITS": {
              "reference": "https://ont-exd-int-s3-euwst1-epi2me-labs.s3.amazonaws.com/wf-metagenomics/ncbi_16s_18s_28s_ITS/ncbi_16s_18s_28s_ITS.fna",
              "refindex": "https://ont-exd-int-s3-euwst1-epi2me-labs.s3.amazonaws.com/wf-metagenomics/ncbi_16s_18s_28s_ITS/ncbi_16s_18s_28s_ITS.fna.fai",
              "database": "https://ont-exd-int-s3-euwst1-epi2me-labs.s3.amazonaws.com/wf-metagenomics/ncbi_16s_18s_28s_ITS/ncbi_16s_18s_28s_ITS_kraken2.tar.gz",
              "kmer_dist": "https://ont-exd-int-s3-euwst1-epi2me-labs.s3.amazonaws.com/wf-metagenomics/ncbi_16s_18s_28s_ITS/database1000mers.kmer_distrib",
              "ref2taxid": "https://ont-exd-int-s3-euwst1-epi2me-labs.s3.amazonaws.com/wf-metagenomics/ncbi_16s_18s_28s_ITS/ref2taxid.ncbi_16s_18s_28s_ITS.tsv",
              "taxonomy": "https://ftp.ncbi.nlm.nih.gov/pub/taxonomy/taxdump_archive/taxdmp_2023-01-01.zip"
          },
          "PlusPF-8": {
              "database": "https://genome-idx.s3.amazonaws.com/kraken/k2_pluspf_08gb_20221209.tar.gz",
              "taxonomy": "https://ftp.ncbi.nlm.nih.gov/pub/taxonomy/taxdump_archive/taxdmp_2022-09-01.zip"
          }
      },
      "process_label": "wfmetagenomics",
      "monochrome_logs": false,
      "validate_params": true,
      "show_hidden_params": false,
      "analyse_unclassified": false,
      "schema_ignore_params": "show_hidden_params,validate_params,monochrome_logs,aws_queue,aws_image_prefix,pangolin_version,wf,process_label",
      "wf": {
          "example_cmd": [
              "--fastq test_data/barcode01/reads.fastq.gz"
          ],
          "agent": "epi2melabs/4.1.3",
          "container_sha": "sha1e115f37e792823e57976e905c62e631d4633206"
      }
  }' > params.json

Command exit status:
  1

Command output:
  (empty)

Command error:
  touch: cannot touch '.command.trace': Permission denied

Work dir:
  /home/abiplantlab/epi2melabs/instances/wf-metagenomics_30807338-7952-49c2-a7ce-28712da563b8/work/7b/a2f1a9d35dd775f165e7359897617d

Tip: view the complete command output by changing to the process work dir and entering the command `cat .command.out`
Mar-17 10:36:23.980 [Task monitor] DEBUG nextflow.Session - Session aborted -- Cause: Process `kraken_pipeline:getParams` terminated with an error exit status (1)
Mar-17 10:36:24.004 [Task monitor] DEBUG nextflow.Session - The following nodes are still active:
[process] kraken_pipeline:unpackDatabase
  status=ACTIVE
  port 0: (value) bound ; channel: database
  port 1: (value) bound ; channel: kmer_distribution
  port 2: (cntrl) -     ; channel: $

[process] kraken_pipeline:determine_bracken_length
  status=ACTIVE
  port 0: (value) OPEN  ; channel: database
  port 1: (cntrl) -     ; channel: $

[process] kraken_pipeline:kraken_server
  status=ACTIVE
  port 0: (value) OPEN  ; channel: database
  port 1: (cntrl) -     ; channel: $

[process] kraken_pipeline:progressive_stats
  status=ACTIVE
  port 0: (queue) OPEN  ; channel: fastcat_stats
  port 1: (cntrl) -     ; channel: $

[process] kraken_pipeline:progressive_kraken_reports
  status=ACTIVE
  port 0: (queue) OPEN  ; channel: kreport
  port 1: (queue) OPEN  ; channel: sample_ids
  port 2: (value) OPEN  ; channel: taxonomy
  port 3: (cntrl) -     ; channel: $

[process] kraken_pipeline:progressive_bracken
  status=ACTIVE
  port 0: (queue) OPEN  ; channel: inputs
  port 1: (queue) OPEN  ; channel: sample_ids
  port 2: (value) OPEN  ; channel: -
  port 3: (cntrl) -     ; channel: $

[process] kraken_pipeline:makeReport
  status=ACTIVE
  port 0: (queue) OPEN  ; channel: lineages
  port 1: (queue) OPEN  ; channel: -
  port 2: (cntrl) -     ; channel: $

[process] kraken_pipeline:output
  status=ACTIVE
  port 0: (queue) OPEN  ; channel: fname
  port 1: (cntrl) -     ; channel: $

[process] kraken_pipeline:stop_kraken_server
  status=ACTIVE
  port 0: (value) OPEN  ; channel: stop
  port 1: (cntrl) -     ; channel: $

Mar-17 10:36:24.149 [main] DEBUG nextflow.Session - Session await > all process finished
Mar-17 10:36:24.150 [main] DEBUG nextflow.Session - Session await > all barriers passed
Mar-17 10:36:24.299 [main] WARN  n.processor.TaskPollingMonitor - Killing running tasks (3)
Mar-17 10:36:24.309 [main] DEBUG nextflow.executor.LocalTaskHandler - Unable to kill kraken_pipeline:getVersions -- command: kill -TERM 148195; exit: 1 
 bash: line 0: kill: (148195) - No such process

Mar-17 10:36:24.318 [main] DEBUG nextflow.trace.WorkflowStatsObserver - Workflow completed > WorkflowStats[succeededCount=0; failedCount=1; ignoredCount=0; cachedCount=0; pendingCount=8; submittedCount=0; runningCount=0; retriesCount=0; abortedCount=3; succeedDuration=0ms; failedDuration=1.5s; cachedDuration=0ms;loadCpus=0; loadMemory=0; peakRunning=4; peakCpus=4; peakMemory=0; ]
Mar-17 10:36:24.318 [main] DEBUG nextflow.trace.TraceFileObserver - Flow completing -- flushing trace file
Mar-17 10:36:24.320 [main] DEBUG nextflow.trace.ReportObserver - Flow completing -- rendering html report
Mar-17 10:36:24.343 [main] DEBUG nextflow.trace.ReportObserver - Execution report summary data:
  [{"cpuUsage":null,"process":"getParams","mem":null,"memUsage":null,"timeUsage":null,"vmem":null,"reads":null,"cpu":null,"time":{"mean":1488,"min":1488,"q1":1488,"q2":1488,"q3":1488,"max":1488,"minLabel":"kraken_pipeline:getParams","maxLabel":"kraken_pipeline:getParams","q1Label":"kraken_pipeline:getParams","q2Label":"kraken_pipeline:getParams","q3Label":"kraken_pipeline:getParams"},"writes":null},{"cpuUsage":null,"process":"kraken2_client","mem":null,"memUsage":null,"timeUsage":null,"vmem":null,"reads":null,"cpu":null,"time":null,"writes":null},{"cpuUsage":null,"process":"getVersions","mem":null,"memUsage":null,"timeUsage":null,"vmem":null,"reads":null,"cpu":null,"time":null,"writes":null},{"cpuUsage":null,"process":"unpackTaxonomy","mem":null,"memUsage":null,"timeUsage":null,"vmem":null,"reads":null,"cpu":null,"time":null,"writes":null}]
Mar-17 10:36:24.437 [FileTransfer-2] DEBUG nextflow.file.FilePorter - Local cache found for foreign file https://ont-exd-int-s3-euwst1-epi2me-labs.s3.amazonaws.com/wf-metagenomics/ncbi_16s_18s/ncbi_targeted_loci_kraken2.tar.gz at /home/abiplantlab/epi2melabs/instances/wf-metagenomics_30807338-7952-49c2-a7ce-28712da563b8/work/stage/da/1b7f80741b42bb7340b4bc109a2f75/ncbi_targeted_loci_kraken2.tar.gz
Mar-17 10:36:24.886 [main] DEBUG nextflow.trace.TimelineObserver - Flow completing -- rendering html timeline
Mar-17 10:36:24.981 [main] WARN  nextflow.dag.GraphvizRenderer - To render the execution DAG in the required format it is required to install Graphviz -- See http://www.graphviz.org for more info.
Mar-17 10:36:25.036 [main] DEBUG nextflow.cache.CacheDB - Closing CacheDB done
Mar-17 10:36:25.044 [main] DEBUG nextflow.script.ScriptRunner - > Execution complete -- Goodbye
FankangMeng commented 1 year ago

@chessleensingh I am having the same errors as you: ' touch: cannot touch '.command.trace': Permission denied' . It happened to almost all epi2melabs workflows on my Ubuntu 22.04.2. Do you have any updates on this? Thank you!

suu-yi commented 1 year ago

@chessleensingh @FankangMeng Hi, I am also having this exact issue... have there been any updates or did anyone resolve this? Thanks!

cjw85 commented 1 year ago

Hi @FankangMeng @chessleensingh @suu-yi,

I apologise that no one has reached out. We've seen this sympton on several user systems now. It appears like a simple file system permissions error, but then the workflow is trying to write a file (.command.trace) into a directory that it has itself just created.

We test workflows on a variety of systems and environments but have never observed a symptom like this. We are currently at a bit of a loss as to the circumstances under which this error can arise.

One thing that would help is to sanity check the file system permissions. For example from the error:

Command error:
  touch: cannot touch '.command.trace': Permission denied

Work dir:
  /home/abiplantlab/epi2melabs/instances/wf-metagenomics_30807338-7952-49c2-a7ce-28712da563b8/work/7b/a2f1a9d35dd775f165e7359897617d

could you, acting as the same user which was used to run nextflow change into that directory and run ls -la to view owners and permissions of the contents. Can you create files there? Is there a .command.trace present already owned by another user?

suu-yi commented 1 year ago

@cjw85 Hi there, thank you for response! Using ls -la, files in that directory have -rw-rw-r-- I can create files in that directory but there is no .command.trace file that I could find.

lhuang3s commented 1 year ago

@cjw85 Hi Chris, I was having the same issue. It is weird to me that the workflow could have permission to create files from .command.begin to .command.sh under the same directory while not having permission to create the .command.trace. What would be the difference between the commands that create all other .command files and the .command.trace file?

Besides, I found people mentioned about this issue in other nextflow workflows touch: cannot touch '.command.trace': Permission denied #142, and the solution was to add docker.runOptions = '-u $(id -u):$(id -g)' to the nextflow.config file. I don't know how to check or modify the nextflow.config file in a docker image.

Could you please let me know how to do that? Or was this setting already included in the nextflow.config file? Thank you!

cjw85 commented 1 year ago

All our workflows already include this in the standard profile:

https://github.com/epi2me-labs/wf-metagenomics/blob/5344ddcd2a5cb0773b3ea27972b650f2e214f86c/nextflow.config#L132

rchapman2000 commented 1 year ago

@lhuang3s Not sure if you have tried this or not, but I was having the same issue and just managed to get it resolved.

There is a small section at the bottom of the Manage Docker as a non-root user section of the Linux Post-Installation Steps Guide from docker that mentions deleting your /.docker/ directory after running these steps. Doing that immediately solved my issue. Docker must store some configuration so if you have run docker using sudo, even once, it messes with the container from EPI2ME.

In all, I followed the steps in the Manage Docker as a non-root user guide (linked above), deleted my /.docker/ directory, and restarted my computer after. I also made sure to delete and reinstall my workflows from the EPI2ME labs interface as well as deleting the docker containers that the workflows installed (I found them in the Docker Desktop app).

FankangMeng commented 1 year ago

@cjw85 , @chessleensingh , @lhuang3s , @rchapman2000 , greetings to you all.

I have currently transitioned from using Docker to leveraging Singularity for running the workflow in epi2me-labs, which has effectively resolved my issues.

Considering that epi2me-labs uses Docker by default, you'll need to make some modifications once you download the workflow. Navigate to the workflow directory, locate the 'nextflow.config' file, and replace the 'profiles' section with the following code. This alteration will set Singularity as the default execution environment:

profiles {
    // the "standard" profile is used implicitly by Nextflow
    // if no other profile is given on the CLI
    standard {
        singularity {
            enabled = true
            autoMounts = true
        }
    }

    // using Docker
    docker {
        docker {
            enabled = true
            // this ensures the container is run as host user and group, but
            //    also adds host user to the within-container group
            runOptions = "--user \$(id -u):\$(id -g) --group-add 100"
        }
    }

    // using Singularity
    singularity {
        singularity {
            enabled = true
            autoMounts = true
        }
    }

    conda {
        conda.enabled = true
    }

    // Using AWS batch.
    // May need to set aws.region and aws.batch.cliPath
    awsbatch {
        process {
            executor = 'awsbatch'
            queue = "${params.aws_queue}"
            memory = '8G'
            withLabel:wfplasmid {
                container = "${params.aws_image_prefix}-wf-clone-validation:${params.wf.container_sha}-root"
            }
            withLabel:medaka {
                container = "${params.aws_image_prefix}-medaka:${params.wf.container_sha_medaka}-root"
            }
            shell = ['/bin/bash', '-euo', 'pipefail']
        }
    }
    aws.region = 'eu-west-1'
    aws.batch.cliPath = '/home/ec2-user/miniconda/bin/aws'

    // local profile for simplified development testing
    local {
        process.executor = 'local'
    }
}
cjw85 commented 1 year ago

There's no need to edit the nextflow.config file to achieve this change. Simply run:

nextflow run -profile singularity ...

More generically you do not need to edit the nextflow.config file in the workflow repository. Nextflow allows you to override configuration by providing additional files, e.g.:

nextflow run -c my_conf.config ...
lhuang3s commented 1 year ago

@rchapman2000 Thank you for your advice! However, since I cannot find the /.docker/ folder in the root directory, I guess using sudo might not be the root cause of this issue. Besides, I have also tried the Linux Post-Installation Steps Guide, and I have no error when running the docker run hello-world without sudo, but the permission issue still occurred when running this workflow.

rchapman2000 commented 1 year ago

@lhuang3s Bad formatting on my part - the .docker/ directory is found in your home directory (of whatever user you installed Docker Desktop with).

I had the same issue - I could run docker run hello-world without sudo, but still got the permission issue in the workflow. Deleting the .docker/ was what fixed it.

Hope this helps!

pvdam3 commented 1 year ago

I can confirm @rchapman2000 's fix, deleting the ~/.docker folder resolved the issue for me.

cjw85 commented 1 year ago

Thats @pvdam3 @rchapman2000 @lhuang3s for the feedback that deleting ~/.docker gets thinks working for each of you. We will investigate further what is being written there that could be causing the issues.

Did you all install docker through Docker Desktop or more directly through a system package manager like sudo apt install docker.io?

suu-yi commented 1 year ago

At first we had Docker Desktop installed which brought up this issue, but when I installed the workflow on another computer, I had it working without an issue with Docker Engine (installed with sudo apt-get install). It might be Docker Desktop that's causing this? Eventually I uninstalled the Docker Desktop, removed all old files as per Docker documentation, removed ~./docker, reinstalled Docker, but this time Engine version and it worked. And yes, it doesn't work if the ~./docker isn't removed before your new install.

cjw85 commented 1 year ago

That's good information, thank you. It does seem like Docker Desktop doesn't do things quite correctly during its installation process. 🤔

lhuang3s commented 1 year ago

@cjw85 I was also using docker desktop. So I uninstalled it and re-install the docker engine with sudo apt-get install. I also uninstalled the old epi2me labs and install the latest version. The good news is that the workflow runs perfectly with the demo data. However, when I tested it with my own data, the workflow gives me the following error message in the log:

This is epi2me-labs/wf-metagenomics v2.2.1.
--------------------------------------------------------------------------------
Checking inputs.
Checking fastq input.
[7d/f7da21] Submitted process > fastcat (1)
[8e/f00a8b] Submitted process > fastcat (3)
[cd/841333] Submitted process > kraken_pipeline:getVersions
[a0/4fba64] Submitted process > fastcat (2)
[ed/ef0a35] Submitted process > kraken_pipeline:getParams
[f8/7e6cfd] Submitted process > fastcat (4)
ERROR ~ Error executing process > 'fastcat (2)'
Caused by:
  Process `fastcat (2)` terminated with an error exit status (127)
Command executed:
  mkdir fastcat_stats
  fastcat             -s barcode82             -r fastcat_stats/per-read-stats.tsv             -f fastcat_stats/per-file-stats.tsv                          barcode82             | bgzip -@ 2 > seqs.fastq.gz
Command exit status:
  127
Command output:
  (empty)
Command error:
  .command.sh: line 3: fastcat: command not found
  .command.sh: line 3: bgzip: command not found
Work dir:
  /home/quintara/epi2melabs/instances/wf-metagenomics_50ebc8a0-3152-414e-927b-4f744a22b8a6/work/a0/4fba6471a500d4121491cc30f3628a
Tip: view the complete command output by changing to the process work dir and entering the command `cat .command.out`
 -- Check '/home/quintara/epi2melabs/instances/wf-metagenomics_50ebc8a0-3152-414e-927b-4f744a22b8a6/nextflow.log' file for details
[86/d4fb2b] Submitted process > kraken_pipeline:output (1)
WARN: Killing running tasks (5)
WARN: Graphviz is required to render the execution DAG in the given format -- See http://www.graphviz.org for more info.
cjw85 commented 1 year ago

We have had cases of this same issues reported for other workflows and have determined that Docker Desktop is the culprit. We are going to be changing our recommendation that on Linux docker is installed through a more traditional route from the system package manager.

Stramon1um commented 1 year ago

@lhuang3s Bad formatting on my part - the .docker/ directory is found in your home directory (of whatever user you installed Docker Desktop with).

I had the same issue - I could run docker run hello-world without sudo, but still got the permission issue in the workflow. Deleting the .docker/ was what fixed it.

Hope this helps!

Hi, same situation here. I can run docker run hello-world with and without sudo + Docker Desktop installed but always problems trying to run the pipeline test. After reading this issue, I removed Docker Desktop, remove the .docker and install docker directly from apt and I was at least able to run the pipeline test but still only with sudo, until I decided to remove also the folder for temporary files 'work' (which i guess had the old privileges of the previous docker installation. After the first test, the folder is recreated and it works like a charm now.

TLDR: remove and purge everything related to the installation of docker desktop. Install docker engine from apt, follow the post-installation instructions for the non-root user, and try to run 'docker run ...' or a test pipeline without sudo...et voilà!

teegman123 commented 4 months ago

@cjw85 Hello running into a similar issue as this chain (error 126).

I have a few quick questions about the program: Is the docker functionality within the wf-metagenomic workflow written in such a way that it will need to have root(admin) access rather than just user access?

Thank you for your assistance :)

cjw85 commented 4 months ago

This depends how docker itself has been installed. Typically the docker daemon is run as root and users must be added to a user group (typically docker) in order to have priveleges to interact with the daemon. You should never need to run nextflow as the root user.