B2_Command_Line_Tool icon indicating copy to clipboard operation
B2_Command_Line_Tool copied to clipboard

Transient errors spam stderr with long stacktraces while syncing

Open tynie opened this issue 6 years ago • 7 comments

Hi

i´m using backblaze command line tool to upload my nextcloud backup. Everything works and it uploads my whole data. But sometimes while uploading i´m getting this errors but the upload continues aynway.

What is the problem at that point?

image

image

tynie avatar Oct 04 '18 19:10 tynie

It is a problem with the b2 server, not b2 command line tool. Looks like sync completed successfully because it retries in case of a transient (temporary) server error. The server cannot possibly achieve 100% uptime and that's why the CLI is designed to handle such errors. All is well.

Perhaps we should not be bothering users with transient errors?

ppolewicz avatar Oct 04 '18 20:10 ppolewicz

That would be nice. I am starting to use b2 for automatic nightly backups, and am having a hard time figuring out what are real errors. Also, given the b2 prints a traceback, it looks to be pretty hard to filter the output to something clean/readable.

prensing avatar Nov 19 '18 21:11 prensing

I'll +1 here. We sync some fairly large directories in scheduled tasks, and the output of those tasks is so verbose with these retries that it's difficult to tell what failed and what didn't. We end up with an "ERROR: sync is incomplete" message at the end so I assume that some files never successfully uploaded, but there are thousands of lines of log output.

ghost avatar Jan 04 '19 21:01 ghost

+1 from me, too. I was using the tool over the weekend to back up some personal files, and having trouble with this.

bwbeach avatar Jan 05 '19 01:01 bwbeach

There are three problems here.

  • sync can sometimes fail due to naive retry policy
  • big stacktraces
  • errors during sync don't clearly tell what the failed file was

EDIT: there's one more

  • transient errors are being printed on stderr as they happen

ppolewicz avatar Jan 05 '19 02:01 ppolewicz

I'm using b2 cli tool to backup my main company's server to the cloud. We have a huge library, and I get these errors all the time. I'm running in a cronjob and I get these errors by email all nights, when effectively, they should not.

Would be nice if we could have an option to disable printing those "soft errors" to stderr, and only printed to stderr fatal errors or warnings.

I understand that the B2 infrastructure is designed in a way that these errors are perfectly normal, so, they should not be printed at all.

Of course, if the retry policy is broken, we should get this printed, but, in a normal situation, this should not be printed.

Am I missing something? Is this option already present?

EDIT: I uninstalled the PIP version and installed the git repo master branch. Will see if there are any improvements regarding this issue, as I saw that there's a change to b2sdk.

Thanks!

0x3333 avatar Apr 18 '19 11:04 0x3333

ok now I get it, thanks

ppolewicz avatar Apr 18 '19 11:04 ppolewicz