Error uploading images via Xnat Desktop Client

60 views
Skip to first unread message

Luca Peretti

unread,
Apr 10, 2025, 5:55:48 AMApr 10
to xnat_discussion
Hi all,
I have problems uploading data via xnat-desktop-client:
The dicoms are scanned and analysed but when click "finish and upload", the progress bar is stacked and nothing is uploaded. 
The session is created on the platform, but remains empty.

Here is the xnat localhost_access_log:

27.0.0.1 - - [10/Apr/2025:09:46:31 +0000] "GET /data/projects/test1/config/applet/require-date?contents=true&accept-not-found=true HTTP/1.0" 204 -
127.0.0.1 - - [10/Apr/2025:09:46:31 +0000] "GET /data/projects/test1/subjects?columns=group,insert_date,insert_user,project,label HTTP/1.0" 200 229
127.0.0.1 - - [10/Apr/2025:09:46:31 +0000] "GET /data/projects/test1/config/applet/allow-create-subject?contents=true&accept-not-found=true HTTP/1.0" 204 -
127.0.0.1 - - [10/Apr/2025:09:46:31 +0000] "GET /data/projects/test1/experiments?columns=ID,label&format=json HTTP/1.0" 200 243
127.0.0.1 - - [10/Apr/2025:09:46:31 +0000] "GET /data/projects/test1/config/anon/projects/test1?format=json HTTP/1.0" 404 366
127.0.0.1 - - [10/Apr/2025:09:46:31 +0000] "GET /data/projects/test1/config/seriesImportFilter/config?format=json HTTP/1.0" 404 371
127.0.0.1 - - [10/Apr/2025:09:46:31 +0000] "GET /data/projects/test1?format=json HTTP/1.0" 200 252
127.0.0.1 - - [10/Apr/2025:09:46:31 +0000] "GET /data/projects/test1/prearchive_code HTTP/1.0" 200 1
127.0.0.1 - - [10/Apr/2025:09:46:31 +0000] "GET /data/projects/test1/config/tracers/tracers?contents=true&accept-not-found=true HTTP/1.0" 204 -
127.0.0.1 - - [10/Apr/2025:09:46:31 +0000] "GET /data/projects/test1/config/applet/allow-bulk-upload?contents=true&accept-not-found=true HTTP/1.0" 204 -
127.0.0.1 - - [10/Apr/2025:09:46:31 +0000] "GET /data/projects/test1/config/applet/default-subject-labeling-scheme?contents=true&accept-not-found=true HTTP/1.0" 204 -
127.0.0.1 - - [10/Apr/2025:09:46:31 +0000] "GET /data/config/applet/require-date?contents=true&accept-not-found=true HTTP/1.0" 204 -
127.0.0.1 - - [10/Apr/2025:09:46:31 +0000] "GET /data/projects/test1/config/applet/default-session-labeling-scheme?contents=true&accept-not-found=true HTTP/1.0" 204 -
127.0.0.1 - - [10/Apr/2025:09:46:31 +0000] "GET /data/prearchive/projects/test1 HTTP/1.0" 200 27
127.0.0.1 - - [10/Apr/2025:09:46:50 +0000] "GET /data/projects/test1/subjects/FiRMLabXNAT_S00103/visits?open=true HTTP/1.0" 200 84610
127.0.0.1 - - [10/Apr/2025:09:46:50 +0000] "POST /xapi/protocols/generate_label HTTP/1.0" 404 682
127.0.0.1 - - [10/Apr/2025:09:46:59 +0000] "GET / HTTP/1.0" 200 40965
127.0.0.1 - - [10/Apr/2025:09:46:59 +0000] "PUT /data/projects/test1/subjects/TEST_02?group=&event_reason=XNAT+Application&XNAT_CSRF=1ed87be4-35c0-4228-945c-92e94e79bcb9 HTTP/1.0" 201 18
127.0.0.1 - - [10/Apr/2025:09:46:59 +0000] "GET /data/projects/test1/subjects?columns=group,insert_date,insert_user,project,label HTTP/1.0" 200 411
127.0.0.1 - - [10/Apr/2025:09:46:59 +0000] "GET /data/projects/test1/subjects/FiRMLabXNAT_S00104/visits?open=true HTTP/1.0" 200 82967
127.0.0.1 - - [10/Apr/2025:09:46:59 +0000] "POST /xapi/protocols/generate_label HTTP/1.0" 404 682
-------------------------------- -------------------------------- -------------------------------- --------------------------------


nginx configuration:

location / {
        root /var/lib/tomcat/webapps/ROOT;

        proxy_pass                          http://localhost:8080;
        proxy_redirect                      http://localhost:8080 $scheme://customname;
        proxy_set_header Host               $host;
        proxy_set_header X-Real-IP          $remote_addr;
        proxy_set_header X-Forwarded-Host   $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For    $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto  $scheme;
        proxy_connect_timeout               150;
        proxy_send_timeout                  100;
        proxy_read_timeout                  100;
        proxy_buffers                       4 32k;
        client_max_body_size                0;
        client_body_buffer_size             128k;
    }

-------------------------------- -------------------------------- -------------------------------- --------------------------------
Here the dev log of the client applicationxnat-dev0log.png


Zip uploading work well as well as REST Api, but I want to let user upload data via desktop client because is the best solution for anonymization and simplicity. 
Do you have any suggestions on how to fix the problem? 
Thanks,
Luca

Luca Peretti

unread,
Apr 10, 2025, 6:11:50 AMApr 10
to xnat_discussion

I forgot some useful info:
xnat version: 1.8.9.2
xnat-desktop-client version: 3.2.5

also notice that if I completely uninstall and reinstall the tool, I manage to upload data just once, after that I will not be able again.

Thanks again
Luca

Simon Doran

unread,
Apr 11, 2025, 4:50:58 AMApr 11
to xnat_discussion
Hi Luca,

  You are not alone in experiencing this. We have been seeing this error for some time now but have had very little success in tracking it down, largely because the problem happens only at the collaborating healthcare institutions who are trying to upload data to us, where we are not permitted the necessary IT access to install diagnostic tools or have our own hands-on session to diagnose the issue.  We have been completely unable to reproduce this error on our own systems, and so have been assuming that the issue relates to something within the environment of our collaborators (for example, some local security on the workstation, or firewall settings). It appears that all the REST API GET and PUT calls issued by the client make it through successfully to the server (as evidenced by the fact that the Desktop Client can create a new user and session just fine), but that POST calls with a data payload attached never reach the server.

  We have previously raised this with the XNAT dev team (previously at Flywheel and now at XNATWorks), but have none of us has yet been successful in figuring out what is going on.

  Your last observation is very interesting and a new piece of information. We didn't try this, but most of our sites have never managed to upload data, not even once.

  Best wishes,

Simon  

Kenan

unread,
Apr 11, 2025, 11:32:58 AMApr 11
to xnat_discussion
Hi everyone.

In our case, with this same issue, we discovered that the school is using an SSL-intercepting proxy (often part of firewalls or endpoint protection tools), which performs a man-in-the-middle-style HTTPS inspection. It replaces the real site certificate with one signed by the school’s internal certificate authority.
We uncovered this issue by having the person at the school check the security certificate in the web browser before logging in to the site (in our case CNDA) and then check it again after logging in. After logging in, the school certificate showed up. The proper XNAT one had been replaced.

The XNAT Desktop Client performs strict certificate pinning or validation, so when it detects that the cert doesn’t match, it refuses to upload.

By whitelisting the domain, the school's IT team excluded it from SSL inspection, allowing the original certificate to pass through untouched. This was confirmed by checked the security certificate again in the web browser after logging in. After the whitelisting, it remained unchanged after login. This allowed uploads to work again.
When it failed a second time a few weeks later, and certificate was still good, what we shifted our focus next to is size. Schools can and I suspect some do, filter/block traffic by size. So if someone is using the XNAT Desktop client, but instead of uploading 1 or 2 sessions at a time they attach 10 at once and they are very big, the huge payload size can be flagged and it will be blocked. This second issue was resolved by having them upload 1 or 2 sessions at a time - making sure the payload size is not too big.

I hope this helps some of you.

Kenan

unread,
Oct 24, 2025, 10:46:41 AM (3 days ago) Oct 24
to xnat_discussion
Well we had another breakthrough in the category of why do XNAT Desktop Uploader Image uploads not complete and stall while archiving.

To make a long story short, if the POST requests are not working for someone to get the images uploaded, the first thing they should check is if post requests are working at all.

run this in the terminal or in the cmd I guess for windows (you can search for cmd in the Search at the bottom)

run

curl -X POST -u userid https://yourwebsite.edu/data/JSESSION

If you use the correct username and password, and this returns a real value...that will let you know that POST requests are still working and allowed.

If you use the correct username and password, and this does not return a real value..you may get an error message of some sort...that will let you know that POST requests are not allowed and being blocked by the institution.

double check that your username and passwords are correct in the steps above.


if you find that POST requests are working

there is a folder that stores all the cache for XNAT Desktop Uploader and a few other things.

The process to find it on windows is:

     1. You have to press WIN + R

     2. Search for %AppData% and hit Enter

    3. Inside that folder should be a Roaming folder and in that Roaming a XNAT Desktop Client

         folder.

     4. Delete the XNAT Desktop Client Folder

     5. In XNAT Desktop Client remove/delete all the saved server logins on home page

     6. Have person start by making a new server login/connection with the ADD NEW XNAT

          SERVER BUTTON

    7. Consider flushing the user cache just to be safe. That option is available after  you log in to the XNAT Desktop Client and at the top press the blue Home button. There is a button to flush cache there

        8. But the main task here that gets things working is deleting the XNAT Desktop Client

            Folder. After that folder is deleted and you start over uploads start working.
Reply all
Reply to author
Forward
0 new messages