Hi,

I'm using Rebex Sftp component to perform a long time job on the server. This job should be able to recover after server/network errors. First, I tried to call SftpClient.Connect second time (after failure), this didn't help. Then I tried to disconnects and dispose a broken SftpClient, create new, connect and continue with the new one. Now I could connect to the server successfully, but when I called PutFile I got an exception with the message "Failure; Failure".

What should I do to be able to recover after network falures? Many thanks.

asked 30 Aug '10, 09:01

Sergey%20Z.'s gravatar image

Sergey Z.
16
accept rate: 0%


Disconnecting or disposing the broken SFTP object and connecting again using a new one (which is exactly what you do) should work fine.

It actually looks like you were able to successfully connect and authenticate and it only failed when PutFile was called. The "failure" message comes from the SFTP server and it is not very helpful, unfortunately. Were you trying to upload the same file as before? It is possible that the server is still not aware that the previous session is over and keeps the file locked not available to be open again. Hopefully it will free the file after several minutes. Are you able to upload to a different filename instead?

link

answered 30 Aug '10, 11:00

Lukas%20Pokorny's gravatar image

Lukas Pokorny ♦♦
2.2k18
accept rate: 32%

Thanks, that works. It was a server failure...

(30 Aug '10, 12:40) Sergey Z.
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:

×115

Asked: 30 Aug '10, 09:01

Seen: 260 times

Last updated: 28 Mar '11, 20:22