kpfaulkner / azurecopy

copy blobs between azure, s3 and local storage
Apache License 2.0
36 stars 13 forks source link

Stream was too long #32

Open raphaelm22 opened 6 years ago

raphaelm22 commented 6 years ago
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)
kpfaulkner commented 6 years ago

Hi

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

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

Thanks

Ken

raphaelm22 commented 6 years ago

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

kpfaulkner commented 6 years ago

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

raphaelm22 commented 6 years ago

I received the following message countless times:

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

Failed:
Aborted:
Pending:
/backup/Test/training.iso
kpfaulkner commented 6 years ago

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.

raphaelm22 commented 6 years ago

Hi @kpfaulkner,

The file exists, but with zero size

The quoted message is displayed repeatedly after executing the command.

kpfaulkner commented 6 years ago

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.

raphaelm22 commented 6 years ago

@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.