-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Errno 104] Connection reset by peer #16
Comments
Are there any more details in the error? If you catch the error you might be able to get more details:
|
Here is the full error stack. It consistently happens after ~2 min on different connections (home and work) and different computers. I usually manage to upload one file a day. And after I get those errors.
thx |
That's puzzling. I just tested myself with a 5GB upload and it worked fine. The spending cap feature on B2 accounts is now working, so if you're over your storage limit, it will deny uploads. You can check your status on the B2 accounts page. Another thing to check is that your files are not bigger than 5,000,000,000 bytes. I should have done so before, but I just added an explicit check to the b2 tool to verify the file size before trying to upload. |
If the spending cap is hit, user should get the "storage_cap_exceeded" error instead of a closed socket. |
I got similiar error
I replace file name with xxx. I download the latest b2 from github and error become
both b2 file has b2 version 0.3.9 @bwbeach I only upload 100-200 MB file.
why not show these notification on b2 command line instead? |
I'll fix the second error tonight |
The second error is fixed in #39. As for the main issue, I may have a fix but testing it is a bit tricky. It should be done in a few days. |
Thanks, @ppolewicz, for fixing. |
Request this be reopened. I'm showing the same symptoms, with failure almost immediately after beginning the upload. |
@bnyeggen could you confirm you are using the current version (just retrieved from the repository) of b2 command line tool? Could you please paste the resulting stracktrace that you get now? (upload error reporting was greatly improved recently) |
Version 0.3.10, on Python 2.7.6, from https://docs.backblaze.com/public/b2_src_code_bundles/b2 yields: Traceback (most recent call last):
File "/vol1/bin/b2", line 1742, in <module>
main()
File "/vol1/bin/b2", line 1729, in main
ct.upload_file(args)
File "/vol1/bin/b2", line 1527, in upload_file
quiet=quiet,
File "/vol1/bin/b2", line 429, in upload_file
progress_bar=not quiet,
File "/vol1/bin/b2", line 1042, in post_file
with OpenUrl(url, data_file, headers) as response_file:
File "/vol1/bin/b2", line 916, in __enter__
self.file = urllib2.urlopen(request)
File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 404, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 422, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1222, in https_open
return self.do_open(httplib.HTTPSConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1184, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno 104] Connection reset by peer> |
Using version 0.3.9, on Python 2.7.6, from https://raw.githubusercontent.com/Backblaze/B2_Command_Line_Tool/master/b2 yields 5 retries, each consisting of: [Errno 104] Connection reset by peer
Traceback (most recent call last):
File "/vol1/bin/b2", line 1185, in __enter__
self.file = urllib2.urlopen(request)
File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 404, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 422, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1222, in https_open
return self.do_open(httplib.HTTPSConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1184, in do_open
raise URLError(err)
URLError: <urlopen error [Errno 104] Connection reset by peer> |
There should be a part which looks like this:
is it not shown? |
URL: https://pod-000-1012-03.backblaze.com/b2api/v1/b2_upload_file/f636459221c05d3d51200c10/c001_v0001012_t0024 (stripped the authorization key) |
Does the same problem occur for very small files or only above certain treshold? Could you please install tqdm ( |
Uploading small (10K) files failed with a quota-exceeded message. Setting my quota appropriately, small upload succeeded, and now large file upload appears to be proceeding. Hypothesizing that the small quota was the source of the earlier error, and the message was being swallowed. |
It was found in test that the upload progresses by 2.25MB and then freezes. A small upload fails instantly with an error (which is not wrapped in an exception). |
https://github.com/python-git/python/blob/master/Lib/urllib2.py#L1108 I have an idea for a fix |
In python 3 it is broken in the exact same way |
https://bitbucket.org/nikratio/python-dugong alternative library which might overcome this problem (requires python 3.3 or newer though) |
We are going to switch to |
I can confirm this still happens in v0.5.6. It retries 5 times and then just gives up. Also still giving exit code 0, see issue #174 I can hardly imagine the retry is handled as it is supposed to (new url and delay?). It seems to retry without delay. |
Do you have a way to reproduce ECONNRESET errors? I've tried to reproduce such or similar connectivity errors by dropping/corrupting/delaying packets and no method even lead to errors (just slower uploads). I've also tried some obscure Perl script which was supposed to close open sockets, but it was unable to do so. |
Simply upload a bunch of files to b2 and wait for it to happen, shouldn't take long. It's just the infrastructure that can't handle it properly as I see a lot of 'server too busy' errors. Can't remember if that was with the b2 CLI tool or with rclone, but either way it happened. Both clients have to retry a lot of times and eventually give up. Now I gave up until this is fixed (probably on the infrastructure side), only using S3 now. |
Exactly what is a "bunch of files"? I've uploaded some 100 of files and never had any problems with upload failures. |
I upload large files randing from 1GB to 15GB to it every night and every night it's been the same. Probably like 40 files? |
@svonohr since you have nailed this problem in python 2 and 3, will you take over this issue? |
@svonohr trying again with v0.6.2 this week. Tried with a large singe file real quick and that went fine. Will know more in a few days 👍 |
Is anyone still working on this issue? I'm having the same problem as OP. My failure happens at upload of the duplicity signatures file (~2 GB). Archive upload in 100 MB file chunks works fine. I have no caps set at B2. |
No, currently there is nobody working on this issue. What's the exact error that you get? What operating system are you using? |
I'm using Ubuntu Server 16.04. |
I'm also consistently having this error when uploading large files:
b2 command line tool, version 0.7.2 EDIT: just realized there's version 1.1.0 out, upgraded, will monitor if error is still there |
You could also try to reduce the number of threads. B2 CLI defaults to 10 threads which could be to much for some connections. |
I am getting following error while uploading files less than 50 MB using b2 command line tool: I am using CentOS Linux release 7.4.1708 OS |
This is an old issue with environmental-like errors and in the last release of the CLI, we've improved the retry policies, so hopefully similar situations should be less frequent. If something like that happens again, please open a new ticket so that we can investigate it properly. |
Hi,
I am getting quite often the following error when uploading files:
urllib2.URLError: <urlopen error [Errno 104] Connection reset by peer>
What can I do to troubleshoot the issue ?
Thanks
The text was updated successfully, but these errors were encountered: