Skip to content

Troubleshooting

When the pipeline fails, follow these steps to understand what went wrong:

  1. Check the terminal output

    The terminal will show you which step failed. Look for lines starting with ERROR or FAILED. This gives you a quick indication of where the problem occurred.

  2. Read the .nextflow.log file

    This file contains detailed information about the pipeline execution. It’s located in your working directory (where you ran the nextflow run command).

    Terminal window
    # View the last 100 lines of the log
    tail -n 100 .nextflow.log
    # Search for errors in the log
    grep -i error .nextflow.log
  3. Check the work directory

    Each process creates a subdirectory in the work/ folder. The terminal output shows you the work directory for the failed process (e.g., work/a1/b2c3d4...).

    Inside this directory, you’ll find:

    • .command.sh - The script that was executed
    • .command.out - Standard output from the process
    • .command.err - Error messages from the process
    • .command.log - Combined output and errors
    Terminal window
    # Navigate to the failed process directory
    cd work/a1/b2c3d4...
    # Check the error output
    cat .command.err
  4. Look for specific error messages

    Sometimes the error message will be self-explanatory, and you will be able to understand the root of the issue. If not, you can look in the common errors and solutions section for some help.

Here are the most frequent issues users encounter and how to fix them:

Error message:

ERROR ~ Validation of pipeline parameters failed!
-- Check '.nextflow.log' file for details
The following invalid input values have been detected:
* --input (input): the file or directory 'input' does not exist

Cause: The pipeline cannot find your input folder.

Solutions:

  • Use absolute paths instead of relative paths: /full/path/to/data not ./data
  • Verify your BIDS directory structure matches the inputs guide
  • Check file naming follows BIDS conventions (you can use the online validator tool)

Missing age column or not formatted correctly

Section titled “Missing age column or not formatted correctly”

Error message:

ERROR ~ Missing 'age' column in participants.tsv

Cause: The participants.tsv file doesn’t contain the required age column.

Solution: Add an age column to your participants.tsv file. See the inputs guide for the correct format. Remember that columns must be tab-separated, not space-separated.

Error message:

ERROR ~ Cannot connect to the Docker daemon

Cause: Docker Desktop is not running or Docker is not installed.

Solutions:

  • Start Docker Desktop
  • Wait a few seconds for Docker to fully start
  • If on an HPC cluster, use -profile apptainer instead of -profile docker

Error message:

ERROR: No b-values are below the dti_max_shell_value threshold of 1200 for subject...

Cause: The pipeline’s default shell selection (b ≤ 1200 for DTI, b ≥ 700 for fODF) doesn’t match your acquisition protocol.

Solution: Specify your shells manually using --dti_shells and --fodf_shells. See the shell selection section for details. Example:

Terminal window
--dti_shells "0 1500" \
--fodf_shells "0 1500 3000"

Error message:

No license file path provided. Please specify the path using --fs_license parameter.

Cause: You’re using the segmentation profile without providing a FreeSurfer license.

Solution: Get a free license from here and specify it with:

Terminal window
--fs_license /path/to/license.txt

Error message:

ERROR ~ Permission denied: '/path/to/output/sub-01/...'

Cause: The pipeline cannot write to the output directory.

Solutions:

  • Check you have write permissions to the --outdir location
  • Ensure the output directory is not owned by a different user
  • On shared systems, verify the directory is not read-only

If you’ve tried the solutions above and are still stuck:

  1. Search existing issues

    Check if someone else has encountered the same problem: GitHub Issues

  2. Open a new issue

    If you can’t find a solution, create a new issue on GitHub with:

    • Your command (the full nextflow run command)
    • Error message (from .nextflow.log or .command.err)
    • Pipeline version (the -r flag value, e.g., 0.2.2)
    • System information (OS, Docker/Apptainer version)
    • Input data description (age range, acquisition parameters)