importer: server error

17 views
Skip to first unread message

lazar.f...@mountsinai.org

unread,
Dec 3, 2025, 12:27:55 PM (2 days ago) Dec 3
to xnat_discussion
hello everybody

suddenly, when using xnat dicom importer

curl -s -k -b JSESSIONID=xxx -X POST -H Content-Type: application/zip; charset=binary
--data-binary @/tmp/aaa.zip
https://YYY.EDU/xnat/data/services/import?inbody=true&import-handler=DICOM-zip&overwrite=delete&dest=/prearchive/projects/projectID

I have started to experience "internal server" error.

that is, the file uploads and I see traffic going, but right after upload finishes,
instead of getting the ID to the pre-archive I am getting html with various things

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>502 Bad Gateway</title> </head><body> <h1>Bad  </p> <hr> <address>Apache/2.4.18 (Ubuntu) Server at YYY.EDU Port 443</address> </body></html>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><html><head><title>502 Bad Gateway</title></head><body><h1>Bad Gateway</h1><p>The proxy server received an invalidresponse from an upstream server.<br /></p><hr><address>Apache/2.4.18 (Ubuntu) Server at YYY.EDU Port 443</address></body></html>



or 

</html>nter>nginx/1.18.0 (Ubuntu)</center></center>d>
<html><head><title>500 Internal Server Error</title></head><body><center><h1>500 Internal Server Error</h1></center><hr><center>nginx/1.18.0 (Ubuntu)</center></body></html>


which error is returned appears to depend on the size of the zip file

restarting xnat did not resolve the problem.

the script was running normally a few days ago.

are there any log files on the xnat side which could sheld some light on what might be the cause of the issue?

Thank you very much for your kind help

Lazar

Timothy Olsen

unread,
Dec 3, 2025, 12:57:22 PM (2 days ago) Dec 3
to xnat_di...@googlegroups.com
Did you check the logs in XNAT_HOME/logs?  Try cd'ing to that directory, do 'tail -f *.log' and then try another import call to see what comes out.

Tim

Timothy R Olsen 

Founder, President



--
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/9a8d7c14-7d01-4277-ac0c-0cdbc497b046n%40googlegroups.com.

lazar.f...@mountsinai.org

unread,
Dec 3, 2025, 1:44:13 PM (2 days ago) Dec 3
to xnat_discussion
Dear Timothy,

nothing useful in the *log

in access.log I see 
POST Authentication "curl/7.38.0" SUCCESS
and 
DELETE http://localhost:9090/xnat/data/JSESSION "curl/7.38.0"

however, between "authentication" and "delete", there was  a "post" to 
xnat/data/services/import

there no update to other log files.

Lazar

Timothy Olsen

unread,
Dec 3, 2025, 4:53:53 PM (2 days ago) Dec 3
to xnat_di...@googlegroups.com
So, the import call isn't showing up in the access.log?  Interesting.

Anything in the TOMCAT_HOME/logs?

Also, please confirm that none of your drives are full (including the local drive for temp).  And monitor the resource usage (CPU/Memory) to see if anything is pegged.  Is your xnat responsive from the browser?

Tim

Timothy R Olsen 

Founder, President



lazar.f...@mountsinai.org

unread,
Dec 3, 2025, 9:56:05 PM (2 days ago) Dec 3
to xnat_discussion
Dear Timothy,

In the tomcat log directory
there is only one file which is updated during operation

its name is
localhost_access_log.2025-12-03.txt

the only records in that file are
"POST /xnat/login HTTP/1.1" 302 -
"DELETE /xnat/data/JSESSION HTTP/1.1" 200 -

nothing else...
for testing,  between login and before the upload I have inserted GET xnat/data/projects/?format=json
and this "get" appeared in the tomcat and in the xnat access log files.
but there is no record of "post" of the zip file to prearchive...

as if the data file is going to youtube instead of xnat

I suspect that the "server error" comes from "above" / "upstream" of tomcat.
what is there? apache?
one of the errors was from nginx ?

any ideas?

Lazar

Martin Boswell

unread,
Dec 4, 2025, 12:43:19 PM (17 hours ago) Dec 4
to xnat_discussion
Lazar,

This is kind of a long shot, but something similar happened to us.  My XNAT server is an origin server to a CloudFlare reverse proxy and they have WAF upload limits.  When we were uploading large MRI sessions that went over 5 GB, the upload just died when it hit the limit and returned errors similar to what you're seeing.  

If your xnat server is on mountsinai.org (based on your email address), then it could be behind akamaiedge.net, and I believe that they also have object size limits, so some of you larger zip files could be blocked in a similar way.  

- Martin

lazar.f...@mountsinai.org

unread,
Dec 4, 2025, 4:45:02 PM (13 hours ago) Dec 4
to xnat_discussion
Dear Martin

I started to suspect a similar thing and your message basically confirms my fear and gives a direction ...

Curious if you started to cut the data or the network security geniuses were able to understand that they should not be
doing things like that .....

Thank you very much 

Lazar
Reply all
Reply to author
Forward
0 new messages