changing the XNAT data location to remote storage

349 views
Skip to first unread message

Fahad Anwar

unread,
Oct 24, 2013, 6:13:56 AM10/24/13
to xnat_di...@googlegroups.com

Hi there

 

I have fresh installation of XNAT 1.6 and like to have the data store on a remote unit, mapped to drive letter “S”.

I have changed the Archive, Pre-archive and cache locations using the web interface (File System screen). When I try to upload the images I get the error (the System cannot find the path specified) see blow

Extraction / Review summary:

Importing file (sample1.zip)

mkdir S:\XNAT\cache\1\uploads\1\20131024_110422431

Uploading to S:\XNAT\cache\1\uploads\1\20131024_110422431\sample1.zip ...

S:\XNAT\cache\1\uploads\1\20131024_110422431\sample1.zip (The system cannot find the path specified)

 

I have looked into the log file “../webapp/xnat/logs” and found following entries

 

2013-10-24 11:04:06,035 [http-8080-2] ERROR org.nrg.xnat.turbine.utils.ArcSpecManager -

java.io.FileNotFoundException: S:\XNAT\cache\archive_specification.xml (The system cannot find the path specified)

                at java.io.FileOutputStream.open(Native Method)

                at java.io.FileOutputStream.<init>(Unknown Source)

                at java.io.FileOutputStream.<init>(Unknown Source)

                at java.io.FileWriter.<init>(Unknown Source)

 

AND

 

2013-10-24 11:04:06,040 [http-8080-2] ERROR org.nrg.xnat.turbine.utils.ArcSpecManager -

java.lang.NullPointerException

 

NOTE:  All three folders (archive,prearchive/cache) do exist on that S drive and the tomcat is running under the same account which has permissions to read, write, and modify these directories?

 

Any suggestion how to solve this issue

 

With regards

 

 

Dr. Fahad Anwar, PhD

Software Development Manager | Prince2 Practitioner

WMIC, The University of Manchester

27 Palatine Road | Withington | Manchester | M20 3LJ

Telephone : +44 (0) 161 275 0033   

Email : Fahad...@manchester.ac.uk

 

fahad...@manchester.ac.uk

unread,
Oct 25, 2013, 5:41:10 AM10/25/13
to xnat_di...@googlegroups.com
Any suggestion how to debug this issue?

Tim Olsen

unread,
Oct 25, 2013, 11:46:30 AM10/25/13
to xnat_di...@googlegroups.com

Fahad,

 

I don’t believe this is currently supported in XNAT.  Changing your prearchive directory might work.  But, the archive directory leaks into to many places to change easily.  Other members of the XNAT team have reviewed this recently, they can correct me if I’m wrong.  But, I think at this point you’d need a new installation if you wanted a new archive directory.

 

That said, we have managed to change the archive directory on some of our in house servers.  However, it requires going directly to Postgres and running some ugly SQL.  We can supply that SQL if a fresh installation and archive migration is required. 

 

Tim

--
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 post to this group, send email to xnat_di...@googlegroups.com.
Visit this group at http://groups.google.com/group/xnat_discussion.
For more options, visit https://groups.google.com/groups/opt_out.

Fahad Anwar

unread,
Oct 25, 2013, 12:09:48 PM10/25/13
to xnat_di...@googlegroups.com

Hi Tim

 

Ok, but bit strange if we can’t change the location, why we have this option in web interface (is this for future implementation).

 

With regards

 

Fahad

Tim Olsen

unread,
Oct 25, 2013, 12:21:21 PM10/25/13
to xnat_di...@googlegroups.com, bu...@xnat.org

Well, you can change it successfully until you create a project.  The option is often used in initial site configuration.  But, once you’ve created a project, we should disable those options.

 

I’m adding It to our issue tracker.

 

Tim

Fahad Anwar

unread,
Oct 25, 2013, 12:38:45 PM10/25/13
to xnat_di...@googlegroups.com

Hi Tim

 

Thanks for all the information;  However my problem is more about setting up the data location to remote storage (map drived).

 

Actually I have deleted all the projects from xnat then change the locations to different folder in local drive (all works fine). However after deleting all the projects again and change he location to (Map drive) folder it is giving me the errors while uploading any images. I have explain the error in detail in my earlier email (see below)

 

Thanks for all your help

 

 

I have fresh installation of XNAT 1.6 and like to have the data store on a remote unit, mapped to drive letter “S”.

I have changed the Archive, Pre-archive and cache locations using the web interface (File System screen). When I try to upload the images I get the error (the System cannot find the path specified) see blow

Extraction / Review summary:

Importing file (sample1.zip)

mkdir S:\XNAT\cache\1\uploads\1\20131024_110422431

Uploading to S:\XNAT\cache\1\uploads\1\20131024_110422431\sample1.zip ...

S:\XNAT\cache\1\uploads\1\20131024_110422431\sample1.zip (The system cannot find the path specified)

 

I have looked into the log file “../webapp/xnat/logs” and found following entries

 

2013-10-24 11:04:06,035 [http-8080-2] ERROR org.nrg.xnat.turbine.utils.ArcSpecManager -

java.io.FileNotFoundException: S:\XNAT\cache\archive_specification.xml (The system cannot find the path specified)

                at java.io.FileOutputStream.open(Native Method)

                at java.io.FileOutputStream.<init>(Unknown Source)

                at java.io.FileOutputStream.<init>(Unknown Source)

                at java.io.FileWriter.<init>(Unknown Source)

 

AND

 

2013-10-24 11:04:06,040 [http-8080-2] ERROR org.nrg.xnat.turbine.utils.ArcSpecManager -

java.lang.NullPointerException

 

NOTE:  All three folders (archive,prearchive/cache) do exist on that S drive and the tomcat is running under the same account which has permissions to read, write, and modify these directories?

 

 

 

 

With regards

fahad...@manchester.ac.uk

unread,
Oct 28, 2013, 6:58:47 AM10/28/13
to xnat_di...@googlegroups.com
Hi All

Since tomcat is running as a service it cannot access to the mapped drive. A service or any process that is running in a different security context must access a remote resource using the Universal Naming Convention (UNC) name. Reference (http://support.microsoft.com/kb/180362)

I have used UNC path in XNAT configuration and it is working fine now.

With regards

Fahad

fahad...@manchester.ac.uk

unread,
Oct 28, 2013, 8:21:01 AM10/28/13
to xnat_di...@googlegroups.com
By using UNC path xnat is working file (upload images, I can see the images in respective folders) however on MR Session page it is using "DICOM (0 files, 0 bytes)". Any suggestion how to resolve this issue or actually how to use the Remort Storage Location with XNAT in general.

With regards

Fahad

Herrick, Rick

unread,
Oct 28, 2013, 9:54:19 AM10/28/13
to xnat_di...@googlegroups.com

Were the images uploaded before or after changing the URL for the location?

 

Rick Herrick

Sr. Programmer/Analyst

Neuroinformatics Research Group

Washington University School of Medicine

(314) 827-4250

--

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 post to this group, send email to xnat_di...@googlegroups.com.
Visit this group at http://groups.google.com/group/xnat_discussion.
For more options, visit https://groups.google.com/groups/opt_out.




The material in this message is private and may contain Protected Healthcare Information (PHI). If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

Fahad Anwar

unread,
Oct 28, 2013, 10:08:33 AM10/28/13
to xnat_di...@googlegroups.com

Images are uploaded after changing the paths

 

Laura Konerth

unread,
Oct 29, 2013, 5:05:04 AM10/29/13
to xnat_di...@googlegroups.com
Hello Fahad and Rick, hello everybody,

I have the same problem using UNC-paths for archiving on remote storage (XNAT version 1.6.2.1, Tomcat_6_0_36, running on Windows Server 2008)... The images are uploaded and are in the archive, but the Autorun.xml is interrupted after a while ("process failed") and the MR Session page  shows "DICOM (0 files, 0 bytes)", even if the folders can be seen on this page. The image viewer shows the images, but the download doesn`t work...
I suppose that the batches in the pipeline engine have a problem using UNC-paths... What should we change?
I attach the files AutoRun.err and AutoRun.log, found in the cache folder: 
\\mristorage7\MRI_Human_Data\Incoming\XNAT\cache\test\t-01_MR2

What other logs do you need?

Best regards from Laura
AutoRun_2_info.err
AutoRun_2_info.log

Herrick, Rick

unread,
Oct 29, 2013, 10:47:54 AM10/29/13
to xnat_di...@googlegroups.com

I really have no idea how to resolve that. We’ve never worked with resources through UNC addresses. I’m kind of surprised it doesn’t resolve, but it’s probably an issue with the Java-Windows bridge in terms of how it’s trying to resolve that path. It’s worth noting that those UNC paths are problematic in LOTS of Windows applications as well. A previous project I worked on just abandoned them altogether because they never worked and went instead to requiring the network locations to be mapped to a mounted drive.

 

The best suggestion I can come up with is to change from just //server/some/path/there to using a URL, which from this article I THINK would have the form:

 

file:////server/some/path/there

 

Will XNAT handle that properly? I honestly don’t know! But it’s worth a shot.

 

By the time of XNAT 2.0, we will have fully transitioned to Java 7 (or even Java 8) and be using NIO, which is a much cleaner and more robust handling for various storage schemes. But that’s not the case for 1.6 and earlier, which is stuck on Java 6.

 

Rick Herrick

Sr. Programmer/Analyst

Neuroinformatics Research Group

Washington University School of Medicine

(314) 827-4250

 

From: xnat_di...@googlegroups.com [mailto:xnat_di...@googlegroups.com] On Behalf Of Laura Konerth
Sent: Tuesday, October 29, 2013 4:05 AM
To: xnat_di...@googlegroups.com
Subject: Re: [XNAT Discussion] Re: changing the XNAT data location to remote storage

 

Hello Fahad and Rick, hello everybody,

--

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 post to this group, send email to xnat_di...@googlegroups.com.
Visit this group at http://groups.google.com/group/xnat_discussion.
For more options, visit https://groups.google.com/groups/opt_out.

Fahad Anwar

unread,
Oct 29, 2013, 2:07:28 PM10/29/13
to xnat_di...@googlegroups.com

I tried with URL path but it is not working. Anybody have experience of using remote storage for XNAT on Windows platform?

 

With regards

 

Fahad

Fahad Anwar

unread,
Nov 1, 2013, 3:07:15 PM11/1/13
to xnat_di...@googlegroups.com

Hi

 

I am able to solve the problem (However due to my specific scenario, I am still facing the problem)

 

Basically I created the symbolic link using mklink command (See below)

 

C:\mklink /d “c:\yourfolder\SymboliclinkName”  \\remorteStorageUNCPath\

 

Update the paths using web-interface to “c:\yourfolder\SymboliclinkName” for archive, pre-archive etc

 

Now it is working fine (including the pipelines as well).

 

For me the problem is bit more difficult, as my external storage is on central university domain (which can be  accessed using central university userID and password). Therefore when I try to upload the images, it gives me the error (wrong userid, password); which is understandable as Tomcat services is running under the account of local domain.

 

To overcome the issue I mapped the external storage (and change the paths using web interface to that mapped drive).  Then I ran the tomcat from the command line (as any application running as window services cannot access the map drive on windows platform). Now when I try to upload the images all the images are copied to my external drives and I received the email that data is achieved; however on the page it shows DICOM (0 files, 0 bytes). To my understanding the xnat pipeline engine is not able to find the files or breaking due to different domains, I found following AutoRun log fine in cache folder with errors please see the attached file.

 

Can anybody give me any hints how to progress on this.

 

With regards

 

Fahad

 

 

 

 

From: xnat_di...@googlegroups.com [mailto:xnat_di...@googlegroups.com] On Behalf Of Laura Konerth
Sent: 29 October 2013 09:05
To: xnat_di...@googlegroups.com
Subject: Re: [XNAT Discussion] Re: changing the XNAT data location to remote storage

 

Hello Fahad and Rick, hello everybody,

--

AutoRun.err

Renaud Morin

unread,
Aug 6, 2014, 10:56:41 AM8/6/14
to xnat_di...@googlegroups.com
Hi everyone,

Anything new regarding this topic? I'm experiencing the same problem on Windows Server 2008 R2 Standard.
Basically, I have an XNAT 1.6.3 deployment working perfectly but I'd like to change the data folders location to a network share on a different domain. To do so, I had to use Tomcat as a service with an account that has access to this share.

Using the UNC path seemed to work nicely since the upload succeeded without a problem. The data is correctly stored in the share. The problem is that it is impossible to download any data afterwards. There isn't any error with the Java applet, I can choose the download folder and when I click the "Start" button, the message "Download complete" appears right away without having downloaded anything. The "Option 2" doesn't work either, I have a "Firefox can't find this file" error when I try to use the URL. I couldn't find anything relevant in the logs.

It's quite strange because I can actually visualize the images on XNAT using the "View Images" tool. I have the same problem as mentioned by Fahad, namely, it shows "DICOM (0 files, 0 bytes)" for every scan.
I've also noticed the creation of a folder at the C:/ drive root where XNAT is installed, and this folder has the same name as the share. There is no imaging data in it, all the images are correctly uploaded onto the share as expected.

I'm really confused, does anyone has any suggestion about that?

Many thanks for your help!
Renaud

Herrick, Rick

unread,
Aug 7, 2014, 12:40:07 PM8/7/14
to xnat_di...@googlegroups.com

I honestly have no idea how to deal with this. It¹s something that comes up not infrequently with various deployment scenarios. The root problem is that XNAT is currently locked into using absolute local file paths for lots of operations, which means we¹re yoked to whatever means of translating symbolic links is supported by the various OSes and file system mounting technologies (NFS, Samba, Windows networking, etc.). The only real way to fix this long-term is to support URLs to resource locations directly in the code, but even that will have to rely on how the various servers manage the file links.

 

Basically, what I’m saying is that there’s not really anything XNAT can do to mitigate this problem. We’ve spent a fair amount of time on our back-end servers so that the references through NFS and symlinks work properly. I know on *nix there are a number of ways you can configure your file system so that symlinks look more or less like actual files and folders. I’m not sure what your options are on Windows Server, because the whole file system works differently at the OS level.

 

Rick Herrick

Sr. Programmer/Analyst

Neuroinformatics Research Group

Washington University School of Medicine

(314) 827-4250

 

For more options, visit https://groups.google.com/d/optout.

Renaud Morin

unread,
Sep 1, 2014, 6:34:23 AM9/1/14
to xnat_di...@googlegroups.com
Hi everyone,

Thank you very much Rick for the hint regarding the symbolic link. It seems to be a fine solution for Windows Server 2008 too since XNAT is now working nicely with the data location set to a network share on a different domain.
In case this would help others, here is a summary for such a config:
- Tomcat is configured as a service with an account that has access to the share.
- A symbolic link to the share directory is set up on the same file system as the XNAT installation.

Everything works like a charm using these settings. Thanks again!

Renaud
Reply all
Reply to author
Forward
0 new messages