azurecopy icon indicating copy to clipboard operation
azurecopy copied to clipboard

Stream was too long

Open raphaelm22 opened this issue 8 years ago • 8 comments

Unknown error generated. 
Please report to Github page https://github.com/kpfaulkner/azurecopy/issues . 
Can view underlying stacktrace by adding -db flag. System.IO.IOException: Stream was too long.
   at System.IO.MemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at azurecopy.S3Handler.ReadBlob(String containerName, String blobName, String cacheFilePath)
   at azurecopycommand.Program.DoNormalCopy(Boolean debugMode)
   at azurecopycommand.Program.Main(String[] args)
   at System.IO.MemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at azurecopy.S3Handler.ReadBlob(String containerName, String blobName, String cacheFilePath)
   at azurecopycommand.Program.DoNormalCopy(Boolean debugMode)
   at azurecopycommand.Program.Main(String[] args)

raphaelm22 avatar Oct 31 '17 11:10 raphaelm22

Hi

How big is the blob you're trying to copy?

Also, can you show me the exact command you're using?

Thanks

Ken

kpfaulkner avatar Oct 31 '17 18:10 kpfaulkner

Sorry for the poor details.

The command: \azurecopy.exe -db -i https://s3-sa-east-1.amazonaws.com/r*********-storage/ -o https://******.blob.core.windows.net/backup

File size: 2.31 GB

raphaelm22 avatar Oct 31 '17 19:10 raphaelm22

Thanks...

Can you try the -blobcopy flag? This means that the blobs aren't copied to your machine first (which seems to be the issue with the large blob) but is copied directly from S3 to Azure without going through your machine.

Please let me know if that helps :)

Cheers

Ken

kpfaulkner avatar Nov 01 '17 20:11 kpfaulkner

I received the following message countless times:

Failed:
Aborted:
Pending:
/backup/Test/training.iso


Failed:
Aborted:
Pending:
/backup/Test/training.iso

raphaelm22 avatar Nov 03 '17 16:11 raphaelm22

Hi

But no errors?

I’d check the Azure container to see if it got copied. If the file was > 2G it might have taken a while. Please check Azure to see if its there.

Cheers

Ken

From: raphaelm22 Sent: Saturday, 4 November 2017 3:27 AM To: kpfaulkner/azurecopy Cc: Ken Faulkner; Comment Subject: Re: [kpfaulkner/azurecopy] Stream was too long (#32)

I received the following message countless times: Failed: Aborted: Pending: /backup/Test/training.iso

Failed: Aborted: Pending: /backup/Test/training.iso — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

kpfaulkner avatar Nov 03 '17 22:11 kpfaulkner

Hi @kpfaulkner,

The file exists, but with zero size

The quoted message is displayed repeatedly after executing the command.

raphaelm22 avatar Nov 08 '17 01:11 raphaelm22

Hi

Hmmm can you try the same command with a smaller file? (just want to confirm the mechanism is working for you in general, and then focus on size issue). Yes, the message should repeat a lot since as Azure copies the file from S3 to itself, azurecopy will just keep polling the status of it.

Any luck with a smaller file?

Cheers

Ken

From: raphaelm22 Sent: Wednesday, 8 November 2017 12:01 PM To: kpfaulkner/azurecopy Cc: Ken Faulkner; Mention Subject: Re: [kpfaulkner/azurecopy] Stream was too long (#32)

Hi @kpfaulkner, The file exists, but with zero size The quoted message is displayed repeatedly after executing the command. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

kpfaulkner avatar Nov 08 '17 20:11 kpfaulkner

@kpfaulkner I'm sorry, I was so impatient at the moment that I did not notice the file was in the "Pending" queue.

That is, the solution was even to use the flag -blobcopy

Once again, I'm sorry for the lack of attention.

raphaelm22 avatar Nov 09 '17 01:11 raphaelm22