B2_Command_Line_Tool icon indicating copy to clipboard operation
B2_Command_Line_Tool copied to clipboard

Broken pipe

Open brianlukoff opened this issue 9 years ago • 19 comments

I'm getting this error frequently when using b2 sync on a large number of files:

MaxRetriesExceeded() FAILED to upload after 5 tries. Encountered exceptions: Broken pipe: unable to send entire request

brianlukoff avatar Nov 03 '16 15:11 brianlukoff

What is your upload speed? What is the file size? How many treads are you using?

ppolewicz avatar Nov 03 '16 16:11 ppolewicz

They are large files, but I'm on a 1Gbps connection so that shouldn't be an issue - but I'm only getting about 70KB/s (most files are skipped, though, since they are already uploaded). I'm using the default number of threads (10?).

brianlukoff avatar Nov 03 '16 16:11 brianlukoff

It's possible that these are because of some operational issues we've had this week with the B2 service. We'll be deploying some bug fixes in a few hours (2pm PDT) that may help.

If you can run with the --debugLogs option, that might give us some useful information for finding the problem.

bwbeach avatar Nov 03 '16 16:11 bwbeach

--debugLogs is not recognized as a valid option in my version of b2.

I am still receiving the same errors when running b2 sync.

brianlukoff avatar Nov 08 '16 17:11 brianlukoff

Could you please upgrade to a newer version of b2 and then run again with --debugLogs?

ppolewicz avatar Nov 08 '16 18:11 ppolewicz

OK -- didn't realize a newer version was available:

$ time b2 sync --keepDays 30 --debugLogs --replaceNewer /Volumes/... b2://.../
b2_upload(..., 1309818392000): MaxRetriesExceeded() FAILED to upload after 5 tries. Encountered exceptions: Broken pipe: unable to send entire request
Broken pipe: unable to send entire request
Broken pipe: unable to send entire request
Broken pipe: unable to send entire request
Broken pipe: unable to send entire request
b2_upload(... 1329019804000): MaxRetriesExceeded() FAILED to upload after 5 tries. Encountered exceptions: Broken pipe: unable to send entire request
Broken pipe: unable to send entire request
Broken pipe: unable to send entire request
Broken pipe: unable to send entire request
Broken pipe: unable to send entire request
b2_upload(..., 1300943123000): MaxRetriesExceeded() FAILED to upload after 5 tries. Encountered exceptions: Broken pipe: unable to send entire request
Broken pipe: unable to send entire request
Connection error: ('Connection aborted.', error(41, 'Protocol wrong type for socket'))
Broken pipe: unable to send entire request
Broken pipe: unable to send entire request

brianlukoff avatar Nov 08 '16 20:11 brianlukoff

There is now a b2_cli.log file in the directory from which you started the tool. Could you please attach it?

ppolewicz avatar Nov 08 '16 21:11 ppolewicz

Is there an address I can send this to privately?

brianlukoff avatar Nov 08 '16 23:11 brianlukoff

You can use the official b2 support form and ask to pass the message to the B2 CLI team (or you can email it to me directly).

ppolewicz avatar Nov 09 '16 11:11 ppolewicz

Thanks - just sent it to you through the support form.

brianlukoff avatar Nov 09 '16 17:11 brianlukoff

@ppolewicz the B2 support folks suggested I send this to you directly as well - what email address should I send it to?

brianlukoff avatar Nov 09 '16 21:11 brianlukoff

I got the log from the support team through a secure channel.

ppolewicz avatar Nov 09 '16 22:11 ppolewicz

Great - thanks!

brianlukoff avatar Nov 09 '16 22:11 brianlukoff

I've seen the log. Some files upload just fine and some fail for some reason. Furthermore the current logs are not sufficient to tell what's happening. Might be an environmental issue. Are you behind some weird firewall or do you have WAF or some anti-exfiltration proxy?

ppolewicz avatar Nov 09 '16 22:11 ppolewicz

Not that I'm aware of - it should be a clean connection to the outside internet. What else can I do to help track this down?

brianlukoff avatar Nov 09 '16 23:11 brianlukoff

Please upgrade b2 CLI to current master (you need to clone the repository and python setup.py install).

Then please run tcpdump -n -C20 -s 68 -W 10 -w issue_283.pcap net 162.244.56.0/21 or net 162.244.56.0/24 from root. The tcpdump process will hang in front, so use another separate terminal to reproduce the problem. When it happens, stop b2 CLI with CTRL+C and do the same with the tcpdump. Share the resulting log and 2 newest pcap files securely with us.

ppolewicz avatar Nov 10 '16 02:11 ppolewicz

I'm getting an error when I run tcpdump - any ideas?

obiwan:brian root# tcpdump -n -C20 -s 68 -W 10 -w issue_283.pcap net 162.244.56.0/21 or net 162.244.56.0/24
tcpdump: data link type PKTAP
tcpdump: listening on pktap, link-type PKTAP (Apple DLT_PKTAP), capture size 68 bytes
tcpdump: pktap_filter_packet: Packet too short

brianlukoff avatar Nov 12 '16 16:11 brianlukoff

That is weird. You could try to increase 68 to a slightly larger value or remove the -s 68 completely, maybe that will help.

ppolewicz avatar Nov 13 '16 01:11 ppolewicz

just capture packets on a specific interface with like tcpdump -i en0 ...

nicoster avatar Jul 11 '18 05:07 nicoster