-
Notifications
You must be signed in to change notification settings - Fork 123
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
b2.py 0.3.6 occasionally completely barfs on uploads #94
Comments
It happened again the morning of January 20, starting at 2016-01-20T15:38:31.408646+00:00 UTC, a batch of ~180 files completely failed to transfer to B2. All of the failures look the same: B2 exception for /home/iverad/KDKA/ive2rad_kdka_2016_01_20_12_36_01.aac:
Traceback (most recent call last):
File "iveradvpsdel.py", line 177, in <module>
b2.upload_file(['--contentType', content_type, B2_BUCKET_NAME, b, b2_name])
File "/home/iverad/b2.py", line 715, in upload_file
bucket_upload_data = ensure_upload_data(bucket_id, info)
File "/home/iverad/b2.py", line 606, in ensure_upload_data
response = post_json(url, params, auth_token)
File "/home/iverad/b2.py", line 321, in post_json
json_text = f.read()
AttributeError: 'NoneType' object has no attribute ‘read' The subsequent batches starting 30 minutes after that were fine. Had another one January 21 starting 2016-01-21T17:47:40.056902+00:00 UTC, just a single file within a batch this time: B2 exception for /home/iverad/KOMO/ive2rad_komo_2016_01_21_14_45_23.mp3:
Traceback (most recent call last):
File "iveradvpsdel.py", line 177, in <module>
b2.upload_file(['--contentType', content_type, B2_BUCKET_NAME, b, b2_name])
File "/home/iverad/b2.py", line 715, in upload_file
bucket_upload_data = ensure_upload_data(bucket_id, info)
File "/home/iverad/b2.py", line 606, in ensure_upload_data
response = post_json(url, params, auth_token)
File "/home/iverad/b2.py", line 320, in post_json
with OpenUrl(url, data, headers) as f:
File "/home/iverad/b2.py", line 298, in __enter__
self.file = urllib2.urlopen(request)
File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 431, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 449, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1240, in https_open
context=self._context)
File "/usr/lib/python2.7/urllib2.py", line 1197, in do_open
raise URLError(err)
URLError: <urlopen error [Errno 104] Connection reset by peer> Saw several more of these midday January 22, same type of traceback. Also, these happen from two different servers that are uploading to B2, in two different geographic locations with two different providers. February 7: B2 exception for /home/iverad/WBBR/ive2rad_wbbr_2016_02_08_00_42_34.aac:
Traceback (most recent call last):
File "iveradvpsdel.py", line 177, in <module>
b2.upload_file(['--contentType', content_type, B2_BUCKET_NAME, b, b2_name])
File "/home/iverad/b2.py", line 715, in upload_file
bucket_upload_data = ensure_upload_data(bucket_id, info)
File "/home/iverad/b2.py", line 606, in ensure_upload_data
response = post_json(url, params, auth_token)
File "/home/iverad/b2.py", line 321, in post_json
json_text = f.read()
AttributeError: 'NoneType' object has no attribute 'read' February 23: B2 exception for /home/iverad/WTOP/ive3rad_wtop_2016_02_23_12_23_08.aac:
Traceback (most recent call last):
File "iveradvpsdel.py", line 177, in <module>
b2.upload_file(['--contentType', content_type, B2_BUCKET_NAME, b, b2_name])
File "/home/iverad/b2.py", line 715, in upload_file
bucket_upload_data = ensure_upload_data(bucket_id, info)
File "/home/iverad/b2.py", line 606, in ensure_upload_data
response = post_json(url, params, auth_token)
File "/home/iverad/b2.py", line 321, in post_json
json_text = f.read()
AttributeError: 'NoneType' object has no attribute ‘read' They're a little less frequent now, every couple of weeks instead of every few days. |
There are 3 issues really reported here:
Also, please upgrade to new version of b2 command line tool - we are improving it continuously with weekly releases. |
Thanks for the reply, @ppolewicz. There's a related issue to 2 I've started seeing, but haven't captured data for yet, where I believe the B2 service keeps the connection open, but stops accepting data, so my uploads appear to hang indefinitely, and never recover. Is this something you/others have seen? I'll be sure to upgrade b2 as I add in debugging to log data about this. |
That might be #16 or another server-side issue |
The http communication layer as well as the retrying has been reworked recently. Also B2 experienced upgrades on the server side. As this issue has not been observed for a while now, I am going to close this ticket. If the problem reoccurs, please file a new one and reference this one. |
This was B2 support tickets #187260 and #191398, Nilay suggested I post here instead.
I'm trying out B2 as a secondary store alongside Glacier, and I'm (ab)using b2.py as an import in a Python script that regularly uploads files to both.
Every few days, B2 will completely barf on uploads. It happened January 13th, and it happened on the 8th before that, and the 4th before that. The traceback looks like this:
Or this:
Right now I'm just letting b2.py do its thing, it retries five times (or whatever) and then gives up, and it just logs these errors for me to eventually manually retry later.
Is there something else I could/should be doing?
The text was updated successfully, but these errors were encountered: