xnat Fails to Upload Outputs to Archive Despite Files in Build Directory

18 views
Skip to first unread message

Pasquale

unread,
Oct 1, 2025, 10:23:50 PM (3 days ago) Oct 1
to xnat_discussion
Hi,
I’m learning xnat and i am struggling with  the XNAT’s Container Service Plugin  because it fails to upload output files to the archive despite them being present in the build/ folder. I’d appreciate any insights. 


My test container correctly  writes  the two txt files i use to test the container to the /output mount, which appear in the build directory (/home/almalinux/xnat-docker-compose/xnat-data/build/*/output/), but  theCSP fails to upload them to the archive (/home/almalinux/xnat-docker-compose/xnat-data/archive/projects/ProgettoPilota/resources/ciao-output/). 

The error is: Failed to upload required outputs. Container: Could not upload files to resource: Unable to find the following source files/folders: /output


the container logs shows 
root [DEBUG] Output path: /output/ciao.txt [DEBUG] /output exists: True [DEBUG] /output writable: True [DEBUG] /output permissions: drwxr-x--- [DEBUG] Wrote file to /output/ciao.txt, permissions: -rwxrwxrwx total 8 -rwxrwxrwx. 1 root root 5 Oct 1 19:24 ciao.txt -rw-r--r--. 1 root root 27 Oct 1 19:24 debug.txt

the json command is 
{ "name": "ciao-writer", "label": "Write ciao.txt to Project", "description": "Runs ciao-image and saves results to a Project Resource.", "version": "1.0", "schema-version": "1.0", "image": "ciao-image:1.2", "type": "docker", "command-line": "whoami && python /app/save_ciao.py && ls -l /output", "override-entrypoint": true, "run-as-user": "root", "mounts": [ { "name": "out", "writable": true, "path": "/output" } ], "environment-variables": {}, "ports": {}, "inputs": [], "outputs": [ { "name": "txt_out", "description": "All text files written to /output", "required": true, "mount": "out", "path": "/output", "glob": "*.txt" } ], "xnat": [ { "name": "project", "label": "ciao Project", "description": "Launch at a Project and save results to a Project resource", "contexts": ["xnat:projectData"], "external-inputs": [ { "name": "project", "description": "Target project", "type": "Project", "required": true, "load-children": true } ], "derived-inputs": [], "output-handlers": [ { "name": "save_to_project_resource", "accepts-command-output": "txt_out", "as-a-child-of": "project", "type": "Resource", "label": "ciao-output", "tags": [], "create-if-not-exists": true } ] } ], "container-labels": {}, "generic-resources": {}, "ulimits": {}, "secrets": [], "visibility": "public" }

the paths are set like this 

Paths:
  • Build: /home/almalinux/xnat-docker-compose/xnat-data/build/
  • Archive: /home/almalinux/xnat-docker-compose/xnat-data/archive/projects/ProgettoPilota/resources/ciao-output/
  • CSP Path Translation:
    • XNAT Path Prefix: /data/xnat
    • Docker Server Path Prefix: /home/almalinux/xnat-docker-compose/xnat-data/home
  • XNAT Site Paths:  
    • Build Path: /data/xnat/build
    • Archive Path: /data/xnat/archive
i think i messed up with the permissions but i am not sure what is causing the problem. at the moment they are

Permissions:
  • Parent: /home/almalinux/xnat-docker-compose/: drwxr-x--- almalinux:almalinux
  • Build: /home/almalinux/xnat-docker-compose/xnat-data/build/*/output/: drwxr-x--- or drwxrwxrwx root:root (after chmod 777)
  • Archive:
    • /home/almalinux/xnat-docker-compose/xnat-data/archive/: drwxrwxrwx root:root
    • /home/almalinux/xnat-docker-compose/xnat-data/archive/projects/ProgettoPilota/: drwxrwxrwx root:root
    • /home/almalinux/xnat-docker-compose/xnat-data/archive/projects/ProgettoPilota/resources/ciao-output/: drwxrwxrwx almalinux:almalinux

any advice?

John Flavin

unread,
Oct 2, 2025, 3:51:54 PM (2 days ago) Oct 2
to xnat_di...@googlegroups.com
I think I see the issue.

Your Docker Server Path Prefix is set to /home/almalinux/xnat-docker-compose/xnat-data/home. Note the xnat-data/home at the end.
Your build directory is set to /home/almalinux/xnat-docker-compose/xnat-data/build/. Note that the last two components are xnat-data/build, not xnat-data/home/build.

It looks to me like you should remove the home from the end of your path translation. That might be enough for it to work.

John Flavin 

--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/xnat_discussion/d0c72408-227c-4104-a742-07e0bc27d25an%40googlegroups.com.

Pasquale

unread,
Oct 3, 2025, 10:57:41 AM (yesterday) Oct 3
to xnat_discussion
thanks. unfortunately it didn't fix the problem. (i  thought i had  already sent the message but it doesn't appear. )

Pasquale

unread,
Oct 3, 2025, 11:39:58 AM (yesterday) Oct 3
to xnat_discussion
nvm solved... it was a stupid path mistake
Reply all
Reply to author
Forward
0 new messages