cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Error occurred during file transfer

rkandasamy
7-Bedrock

Error occurred during file transfer

When i transfer a file from server to SDK, i am getting the result as "Error occurred during file transfer" and don't get any other additional information in the logs.

Can anybody suggest how to get more detailed information so that it would be easy find out the issue?

Note:

1.I am using dot net edge sdk 5.6 version and connecting to secured(https) thingworx 7.0 server.

2. we have also turned off windows firewall.

3. we have tried running the dot net sdk both from corporate and open network.

8 REPLIES 8

Rdhakrishnan,

The best way to debug this is put your logging in Verbose mode for the .NET SDK and then review any additional messages that print out around that error. I typically like to look at all the logging for the entire file transfer to see if there are any timeouts or any additional messages that could provide further insight into why there was a failure.

A few questions I have for you:

  • How large is the file?
  • Does the file transfer run for a bit and then fail, or does it fail a few milliseconds/seconds after starting?
  • Do other file sizes transfer to completion?

Meghan

Hi Meghan Hollenbach,

I have added to logs to my dot net SDK. I could get the reason for this partially.

Please find the error logs below:

FT_Test_1469179182472.txt | targetChecksum: c92e63a7bd53737f78a9b49e6df1b6b0 | startTime: 1469179182473 | endTime: 1469179184526 | duration: 2053 | state: ERROR | isComplete: False | size: 111 | user: CNHInfosys | message: Error occured during transfer.

2016-07-22 14:53:17.852Z [L: Error] [T: 14] [U: Radhakrishnan_K02] [O: com.thingworx.communications.client.TwApiWrapper] [Error] twFileManager_GetRealPath: Error getting vdirPath,

2016-07-22 14:53:17.854Z [L: Warning] [T: 14] [U: Radhakrishnan_K02] [O: com.thingworx.communications.client.TwApiWrapper] [Warning] twFileManager_ListVirtualDirs: Error getting file info for \../Test_FT

From this i could figure out that, the file transfer fails because the virtual directory is not loaded properly.

I am not sure why it is not able to get this virtual directory path though i have defined it well using below C# code,

Dictionary<string, string> virtualDirectories1 = new Dictionary<string, string>();

            virtualDirectories1.Add("Test_FT", "../Test_FT");

            virtualDirectories1.Add("Incoming", "../Incoming");

Prescription DeviceObject = new Prescription(ThingName, "Thing corresponding to Vehicle", mClient, virtualDirectories1);

mClient.bindThing(DeviceObject);

Test_FT directory is not getting listed on Remote thing's service BrowseDirectory on Thingworx composer. I don't get more details for this from error logs.

Have you tried using an absolute path instead of a relative path? Try that, and let me know if the vdir still can't be found. Something like "C:\\some_folder\\some_other_folder\Test_FT"

Meghan

Hi Meghan,

It helps. I was adding two directories(Test_FT,Incoming) as mentioned in my query. by changing to absolute path for Test_FT, it works.

But for Incoming directory, i have not added any absolute path. Still that Incoming directory works(means listed under the result of service BrowseDirectory in remote thing at server side)

Hi Radhakrishnan,

     Have you tried to set the MaxFileSize property for FileTransferInfo? I need to transfer a 4GB file using .net SDK. Right now I'm able to transfer only file upto 2GB. Can you provide any pointers on how to do it?

Hi Swathi,

I have not transferred with that much big file size. May be some body who has done or who has idea on it could provide their inputs here!

Thanks @Rdhakrishnan

Aanjan
12-Amethyst
(To:sselva)

Swathi, this has been fixed in 7.2.5 and 7.3.0 releases (the copy service in the FileTransfer Subsystem previously failed when moving a file over 2.1 gigs, which is the max integer size).

Announcements


Top Tags