login about faq

Using perl 5.10 on Centos 6.2 32 bit with the FTP2 module.

When trying to put a file using PutFile() onto a remote server I get the error "Failed to get local file size". The file is large at 2193626527 bytes.

If I try MPutFiles() I get the error <oserrormessage>Value too large for defined data type</oserrormessage>

Does anyone have any ideas as this is a transfer script that needs to handle all files sizes.

Thanks in advance

asked Oct 12 '12 at 05:57

srstanley's gravatar image

srstanley
46226


Here are the pre-releases with the changes I described above:

32-bit Linux Perl 5.10

multi-thread build: http://www.chilkatsoft.com/preRelease/chilkat-9.3.2-perl-5.10-x86-thread-multi-linux.tar.gz

single-thread build: http://www.chilkatsoft.com/preRelease/chilkat-9.3.2-perl-5.10-x86-linux.tar.gz

link

answered Oct 19 '12 at 17:50

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

Thank you for the quick response. Sorry for my delay in replying (major oops moment here at the moment).

Thanks again

(Oct 23 '12 at 10:30) srstanley

Thanks! The "stat" system call to get the file size failed. I did two things:

(1) Added logging to see the internal size of the "off_t" data type for the stat system call (see http://linux.die.net/man/2/stat ) and also logged the reason for the stat failure to LastErrorText.

(2) Allow the FTP upload to continue even if the local file size is unknown.

I'll provide a new build and post the link here ASAP.

link

answered Oct 19 '12 at 17:19

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

Please post the full contents of the LastErrorText for the case of calling PutFile.

link

answered Oct 12 '12 at 08:20

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

Here is the full LastErrorText for PutFile thanks

<chilkatlog> <putfile> <dlldate>Aug 7 2012</dlldate> <unlockprefix>PHENXSFTP</unlockprefix> <username>bottomless-pit:stanles</username> <architecture>Little Endian; 32-bit</architecture> <language>Linux Perl</language> <verboselogging>0</verboselogging> <localfilename>/u01/crimson-rec/simon.test</localfilename> <remotefilename>simon.test</remotefilename> <idletimeoutms>60000</idletimeoutms> <receivetimeoutms>60000</receivetimeoutms> <connecttimeoutseconds>60</connecttimeoutseconds> <error>Failed to get local file size.</error> <localfilepath>/u01/crimson-rec/simon.test</localfilepath> </putfile> <totaltime>Elapsed time: 0 millisec</totaltime> <error>Failed.</error> </chilkatlog>

link

answered Oct 12 '12 at 08:27

srstanley's gravatar image

srstanley
46226

Sorry forgot the tags

<chilkatlog>
<putfile>
<dlldate>Aug  7 2012</dlldate>
<unlockprefix>PHENXSFTP</unlockprefix>
<username>bottomless-pit:stanles</username>
<architecture>Little Endian; 32-bit</architecture>
<language>Linux Perl</language>
<verboselogging>0</verboselogging>
<localfilename>/u01/crimson-rec/simon.test</localfilename>
<remotefilename>simon.test</remotefilename>
<idletimeoutms>60000</idletimeoutms>
<receivetimeoutms>60000</receivetimeoutms>
<connecttimeoutseconds>60</connecttimeoutseconds>
<error>Failed to get local file size.</error>
<localfilepath>/u01/crimson-rec/simon.test</localfilepath>
</putfile>
<totaltime>Elapsed time: 0 millisec</totaltime>
<error>Failed.</error>
</chilkatlog>
link

answered Oct 12 '12 at 08:30

srstanley's gravatar image

srstanley
46226

Thanks! I'll have a look..

(Oct 12 '12 at 08:56) chilkat ♦♦

Futher info, I have also tried to transfer the file using SFTP and it also fails (sorry not got the lastlog message for SFTP though). It transfers fine manually using filezilla.

(Oct 19 '12 at 08:40) srstanley

The error here has nothing to do with FTP. It's simply a local file problem -- probably an incorrect path for the file in the local filesystem. Notice the word "local" in the error:

<error>Failed to get local file size.</error>
<localfilepath>/u01/crimson-rec/simon.test</localfilepath>

link

answered Oct 19 '12 at 09:01

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

Could also be a permissions issue.

(Oct 19 '12 at 09:01) chilkat ♦♦

Unfortunatley this cannot be the case as the file is one of a number, in the same folder. The other files transfer fine, this one file (over 2Gb in size) fails.

(Oct 19 '12 at 10:57) srstanley
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×131
×90
×11
×9

Asked: Oct 12 '12 at 05:57

Seen: 6,193 times

Last updated: Oct 23 '12 at 10:30

powered by OSQA