login about faq

I'm trying to "DownloadFileByName" via SFTP from a particular site. My code works fine on other SFTP servers, however for this site im getting the below error:

ChilkatLog:
  DownloadFileByName:
    DllDate: Jun 23 2009   
    UnlockPrefix: MRCEPSSSH   
    Username: neal   
    Component: .NET 2.0   
    SshVersion: SSH-2.0-http://3sp.com_Maverick_SSHD   
    SftpVersion: 0   
    fromFilePath: out/Summary_051714_sttlmnt.csv   
    toFilePath: E:\WebSanApps\eRec\Logs\Summary_051714_sttlmnt.csv   
    OpenRemoteFile:   
      filename: out/Summary_051714_sttlmnt.csv <-- Note: I've tried both absolute (/out/) and relative (out/) paths here   
      access: readOnly   
      createDisposition: openExisting   
      v3Flags: 0x1   
      Sent FXP_OPEN   
      Received CHANNEL REQUEST message   
      requestType: exit-status   
      exitStatusCode: 0   
      Sent SSH Channel CLOSE   
      Received Close   
      Failed to read packet.   
      Failed to receive response to FXP_OPEN   
      SshLog:      
SFTP> Sending SSH_FXP_OPEN  
TRAN> CHANNEL_DATA  
TRAN* NumBytes: 51  
TRAN< CHANNEL_REQUEST  
TRAN* Request Type: exit-status  
TRAN* Channel: 200  
TRAN< CHANNEL_CLOSE  
TRAN> CHANNEL_CLOSE  
TRAN* svrChannel=0  
SFTP! Failed to read packet.

Failed.

asked May 18 '14 at 10:32

nsantin's gravatar image

nsantin
16113

edited May 18 '14 at 14:24

jpbro's gravatar image

jpbro ♦
1.1k2618


UPDATE:

I was able to resolve this by requesting the realpath before opening the file handle.

Once I added this code: absPath = SFTPClient.RealPath(".", "")

the download was successful.

I have no idea why this work (as Im not even using the value returned by the function) however I suspect requesting the path triggered something on the host side. I got the idea from looking at filezilla, I was always able to download the file when using Filezilla and I noticed it requested the current directory before requesting a file listing. So I tried the same logic in my code and it now works.

This is only an issue for this specific host Im connecting to (WesternUnion), all other hosts I connect to worked fine prior to adding this. Strange...

link

answered May 18 '14 at 14:35

nsantin's gravatar image

nsantin
16113

Probably something that the proxy requires in front of that server for some reason - maybe a bug. Glad you found a solution, and thanks for posting it here!

(May 18 '14 at 14:38) jpbro ♦

UPDATE: I updated the DLL to latest version 9.5 and now Im getting a different error. Any ideas?

ChilkatLog:   
  DownloadFileByName:   
    DllDate: May  8 2014   
    ChilkatVersion: 9.5.0.39   
    UnlockPrefix: MRCEPSSSH   
    Username: C4YSERVER3A:neal   
    Architecture: Little Endian; 32-bit   
    Language: .NET 2.0   
    VerboseLogging: 0    
    SshVersion: SSH-2.0-http://3sp.com_Maverick_SSHD   
    SftpVersion: 3   
    downloadFileByName:   
      PreserveDate: 0   
      fromFilePath: out/Summary_051714_sttlmnt.csv   
      toFilePath: E:\WebSanApps\eRec\Logs\Summary_051714_sttlmnt.csv   
      OpenRemoteFile:   
        sftpOpenFile:   
          remotePath: out/Summary_051714_sttlmnt.csv   
          access: readOnly   
          createDisposition: openExisting   
          v3Flags: 0x1   
          Sent FXP_OPEN   
          StatusResponseFromServer:   
            Request: FXP_OPEN   
            InformationReceivedFromServer:   
              StatusCode: 3   
              StatusMessage: [2014/05/18 13:16:12.172] SSE2636 Command rejected due to sftp proxy    policy settings: SSH_FXP_OPEN   
            --InformationReceivedFromServer   
          --StatusResponseFromServer   
        --sftpOpenFile   
        timeToOpenMs: Elapsed time: 125 millisec   
      --OpenRemoteFile   
      totalTimeMs: Elapsed time: 125 millisec   
    --downloadFileByName   
    Failed.   
  --DownloadFileByName   
--ChilkatLog   
link

answered May 18 '14 at 13:19

nsantin's gravatar image

nsantin
16113

edited May 18 '14 at 14:24

jpbro's gravatar image

jpbro ♦
1.1k2618

Maybe a bug in IBM Sterling Secure Proxy? I Googled error SSE2636 as reported in the second LastErrorText you provided, and got this:

http://www-01.ibm.com/support/docview.wss?uid=swg21560137

link

answered May 18 '14 at 14:27

jpbro's gravatar image

jpbro ♦
1.1k2618

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:

×200
×2

Asked: May 18 '14 at 10:32

Seen: 1,881 times

Last updated: May 18 '14 at 14:38

powered by OSQA