Archived Forum Post

Index of archived forum posts

Question:

Chilkat - DownloadFileByName - Local file size not equal to the expected size!

Jul 01 '15 at 08:34
  DownloadFileByName:
    DllDate: Aug 15 2013
    ChilkatVersion: 9.4.1.42
    UnlockPrefix: HOVSERSSH
    Username: XXXXXXX:yyyyy
    Architecture: Little Endian; 64-bit
    Language: .NET 2.0 / x64
    VerboseLogging: 0
    SshVersion: SSH-2.0-XXXXXX Hallmark AFT
    SftpVersion: 3
    PreserveDate: 0
    fromFilePath: /ready/abc.txt
    toFilePath: C:\Temp\abc.txt
    OpenRemoteFile:
      filename: /ready/abc.txt
      access: readOnly
      createDisposition: openExisting
      v3Flags: 0x1
      Sent FXP_OPEN
      handle: 31
      timeToOpenMs: Elapsed time: 16 millisec
    --OpenRemoteFile
    FetchRemoteFileAttributes:
      filename: /ready/abc.txt
      Using FXP_STAT
      Sent message to fetch attributes.
      Received SSH_FXP_ATTRS
      timeToFetchAttrMs: Elapsed time: 31 millisec
    --FetchRemoteFileAttributes
    remoteFileSize: 39961593
    resumeFlag: 0
    numBytesToDownload: 39961593
    downloadLoop:
      socketOptions:
        SO_SNDBUF: 1048576
        SO_RCVBUF: 1048576
        TCP_NODELAY: 1
      --socketOptions
      startingOffset: 0
      numBytesToDownload: 39961593
      bReadUntilEnd: 0
      timeToDownloadFileDataMs: Elapsed time: 4649 millisec
    --downloadLoop
    NumBytesSentToOutput: 13440733
    Num bytes sent to output was not equal to the expected number.
    numBytesExpected: 39961593
    numBytesSentToOutput: 13440733
    closeHandle:
      handle: 31
      Sent FXP_CLOSE
      StatusResponseFromServer:
        Request: FXP_CLOSE
        InformationReceivedFromServer:
          StatusCode: 0
          StatusMessage: Ok
        --InformationReceivedFromServer
      --StatusResponseFromServer
    --closeHandle
    timeToCloseHandleMs: Elapsed time: 16 millisec
    Closing local output file...
    Verifying local output file size...
    localFileSizeAfterDownload: 13440733
    expectedFileSizeAfterDownload: 39961593
    Local file size not equal to the expected size!
    totalTimeMs: Elapsed time: 4945 millisec
    Failed.
  --DownloadFileByName
--ChilkatLog

We are not able to download 30MB file. Failed in between while downloading within 5seconds. Can anyone understand the issue and let us know how to solve the issue?


Answer

Test with this v9.5.0.49 pre-release, and post the LastErrorText if you can. :)

32-bit Download: http://www.chilkatsoft.com/download/preRelease/ChilkatDotNet2-9.5.0-win32.zip
64-bit Download: http://www.chilkatsoft.com/download/preRelease/ChilkatDotNet2-9.5.0-x64.zip


Answer

Hi,

I am facing the same problem with the latest Chilkat DLL.

"ChilkatLog:
DownloadFileByName:
DllDate: Jun 23 2015
ChilkatVersion: 9.5.0.51
UnlockPrefix: bbbb
Username: aaaa
Architecture: Little Endian; 32-bit
Language: .NET 2.0
VerboseLogging: 0
SshVersion: SSH-2.0-WS_FTP-SSH_7.7
SftpVersion: 3
downloadFileByName:
PreserveDate: 0
fromFilePath: /users/interface1/FileMove/october2010/images/issueNumber.png
toFilePath: E:\swcommon\travel_portal_original\october2010\images\issueNumber.png
OpenRemoteFile:
sftpOpenFile:
remotePath: /users/interface1/FileMove/october2010/images/issueNumber.png
access: readOnly
createDisposition: openExisting
v3Flags: 0x1
Sent FXP_OPEN
handle: 33
--sftpOpenFile
timeToOpenMs: Elapsed time: 16 millisec
--OpenRemoteFile
FetchRemoteFileAttributes:
fetchAttributes:
filename: /users/interface1/FileMove/october2010/images/issueNumber.png
Using FXP_STAT
Sent message to fetch attributes.
Received SSH_FXP_ATTRS
--fetchAttributes
timeToFetchAttrMs: Elapsed time: 0 millisec
--FetchRemoteFileAttributes
remoteFileSize: 8095
resumeFlag: 0
numBytesToDownload: 8095
newDownloadLoop:
socketOptions:
SO_SNDBUF: 262144
SO_RCVBUF: 4194304
TCP_NODELAY: 1
SO_KEEPALIVE: 0
--socketOptions
startingOffset: 0
numBytesToDownload: 8095
bReadUntilEnd: 0
dataRequestStatus:
reqId: 1207
statusCode: 4
statusMessage: End of File
--dataRequestStatus
timeToDownloadFileDataMs: Elapsed time: 0 millisec
NumBytesSentToOutput: 0
--newDownloadLoop
Num bytes sent to output was not equal to the expected number.
numBytesExpected: 8095
numBytesSentToOutput: 0
sftpCloseHandle:
handle: 33
Sent FXP_CLOSE
StatusResponseFromServer:
Request: FXP_CLOSE
InformationReceivedFromServer:
StatusCode: 0
StatusMessage:
--InformationReceivedFromServer
--StatusResponseFromServer
--sftpCloseHandle
timeToCloseHandleMs: Elapsed time: 0 millisec
Closing local output file...
totalTimeMs: Elapsed time: 16 millisec
--downloadFileByName
Failed.
--DownloadFileByName
--ChilkatLog
"