Copying files from remote side failed. Failure writing network stream.

Advertisement

dotps1
Contributor
Joined:
Posts:
18
Location:
United States

Copying files from remote side failed. Failure writing network stream.

I have a scheduled task that runs during the night and downloads a very large database bak file (around 10GB). And many nights if fails. But when I run the scheduled task (not just run the script) it works fine everytime. Does this error look more like an issue with the remote side FTP server?

WinSCP.SessionRemoteException: Error transferring file '/DatabaseBackupFile.BAK'. ---> WinSCP.SessionRemoteException: Copying files from remote side failed.
                    Failure writing network stream.    

I really don't understand why it works manually everytime, that leads me to believe either a network hiccup or something with the remote side FTP server.
_________________
https://github.com/dotps1
  • SessionLog.txt (20.48 KB, Private file)
Description: I will enabled debugging log as well if need be.

Reply with quote

Advertisement

dotps1
Contributor
Joined:
Posts:
18
Location:
United States

Re: Copying files from remote side failed. Failure writing network stream.

martin wrote:

I've never seem this error before.

Did you read this?
https://serverfault.com/q/599081/168875

huh, ill reach out to the vendor and see if they have any AV on there system, the server I am using to run the task has not AV on it.

Thanks for the info, I will let you know what I find out.

Reply with quote

dotps1
Contributor
Joined:
Posts:
18
Location:
United States

re download with while loop?

Martin,
While I'm waiting on the vendor, is there a way to make the script retry the download on this error? I was thinking of doing like a while loop.

$result = $null
while ($result.Failures.Count -ne 0){
    $result = # Download file here.
}    

but I was wondering if there is a built in way to handle this.

thanks.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

Re: re download with while loop?

dotps1 wrote:

Martin,
While I'm waiting on the vendor, is there a way to make the script retry the download on this error? I was thinking of doing like a while loop.

$result = $null
while ($result.Failures.Count -ne 0){
    $result = # Download file here.
}    

but I was wondering if there is a built in way to handle this.
WinSCP retries only if the connection is lost while transferring. What is probably not this case.

Reply with quote

Advertisement

You can post new topics in this forum