GithubHelp home page GithubHelp logo

Comments (5)

vitorio avatar vitorio commented on June 21, 2024

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 attributeread'

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 attributeread'

They're a little less frequent now, every couple of weeks instead of every few days.

from b2_command_line_tool.

ppolewicz avatar ppolewicz commented on June 21, 2024

There are 3 issues really reported here:

  1. When you get a AttributeError: 'NoneType' object has no attribute ‘read', it should not happen. In such case, we should handle it gracefully and retry... Fixing it now by a specific code for such issue does not make much sense as this issue is specific to urllib2, which we are now switching for requests. That will solve this issue and other problems along with it.
  2. Connection reset: sever-side issue. B2 service is in beta and from time to time it does something crazy like close a connection without an apparent reason. Backblaze is working fast on resolving those issues as their service matures, so in the future it their servers are less and less likely to become overloaded and you should not see those. As you said, this problem was temporary and their ops team seems to have taken care of it rather quickly.
  3. BadStatusLine: same as 2.

Also, please upgrade to new version of b2 command line tool - we are improving it continuously with weekly releases.

from b2_command_line_tool.

vitorio avatar vitorio commented on June 21, 2024

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.

from b2_command_line_tool.

ppolewicz avatar ppolewicz commented on June 21, 2024

That might be #16 or another server-side issue

from b2_command_line_tool.

ppolewicz avatar ppolewicz commented on June 21, 2024

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.

from b2_command_line_tool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.