login about faq

When I upload files via the SFTP method some files will upload with no issues and then a file will fail. I validated that the file does exist in the local directory. Here is the Chilkat log results of the upload. I was using an older dll prior to trying to figure this out. Same error results with the new dll.

    DllDate: Apr 24 2014
    UnlockPrefix: CALKINSSH
    Username: CORPWEB:Administrator
    Architecture: Little Endian; 32-bit
    Language: ActiveX
    VerboseLogging: 0
    SshVersion: SSH-2.0-SFTP
    SftpVersion: 3
    handle: 4B30486E6833
    fromPath: D:\Current\WWSB\FHP looks at sudden acceleration in daycare crash.xml
        SO_SNDBUF: 8192
        SO_RCVBUF: 8192
        TCP_NODELAY: 1
      handle: 4B30486E6833
      fromLocalPath: D:\Current\WWSB\FHP looks at sudden acceleration in daycare crash.xml
      Failed to open file (2)
      localFilePath: D:\Current\WWSB\FHP looks at sudden acceleration in daycare crash.xml
      currentWorkingDirectory: C:\Program Files\Microsoft Visual StudioVB98
      osErrorInfo: The system cannot find the file specified.
      localWindowsFilePath: D:\Current\WWSB\FHP looks at sudden acceleration in daycare crash.xml

This happens randomly. Sometimes all files will upload, sometimes just 4 or 5. This is a rather new problem since this has been running for years. One caveat, the main core of our network was upgraded recently to a gigabyte core bandwidth. Any ideas? Mike

asked Apr 25 '14 at 11:53

miketriner's gravatar image


edited Apr 29 '14 at 10:41

chilkat's gravatar image

chilkat ♦♦

Is D: a physically connected drive or a mapped network drive? I ask because an intermittent network failure might cause a problem with a mapped network drive and be difficult to diagnose if it gets reconnected by the time you check manually.

Perhaps you could code a short pause and retry when a failed upload is detected. After X retries without success you could then raise an error for a hard-fail.

(Apr 28 '14 at 21:16) jpbro ♦

The error here has nothing to do with SSH/SFTP. The error is that the local file you are trying to upload does not exist. (In other words, if the local file to be uploaded cannot be found and opened, the method call fails before anything pertaining to SSH/SFTP happens.)

Chilkat provide all possible information about the file open failure in the LastErrorText. It provides the exact path, and it also provides the current working directory just in case the path is a relative path. The "osErrorInfo" is what is returned by the system function all to open the file. In the case of Windows, this would be the "CreateFile" Platform SDK function. ( see http://msdn.microsoft.com/en-us/library/windows/desktop/aa363858%28v=vs.85%29.aspx ) There really isn't any more information that can be provided. In other words -- trust the error message: the file is not there.


answered Apr 29 '14 at 10:47

chilkat's gravatar image

chilkat ♦♦

Your answer
toggle preview

Follow this question

By Email:

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



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



Asked: Apr 25 '14 at 11:53

Seen: 3,776 times

Last updated: Apr 29 '14 at 10:47

powered by OSQA