Skip to content
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

Connection refused when upload_async() #177

Open
KTibow opened this issue Mar 24, 2020 · 2 comments
Open

Connection refused when upload_async() #177

KTibow opened this issue Mar 24, 2020 · 2 comments

Comments

@KTibow
Copy link

KTibow commented Mar 24, 2020

This is the traceback:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 159, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw)
  File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 80, in create_connection
    raise err
  File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 70, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 343, in _make_request
    self._validate_conn(conn)
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 841, in _validate_conn
    conn.connect()
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 301, in connect
    conn = self._new_conn()
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 168, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0xb1804cf0>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 638, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 398, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.onedrive.com', port=443): Max retries exceeded with url: /rup/164bf6b70043f25b/eyJSZXNvdXJjZUlEIjoiMTY0QkY2QjcwMDQzRjI1QiExMDMiLCJSZWxhdGlvbnNoaXBOYW1lIjoiYmFja3VwLnppcCJ9/4moWVgN8rXVwlBWoSpz9lXuC-62Xa7SCL8_Hbo2AxZXqJ7haIfurNbL-isjAGs2Q9d9PDKVuikE87V6IuuPkr9b9dKUjiibox2yA0qmbFw5Cs/eyJuYW1lIjoiYmFja3VwLnppcCIsIkBuYW1lLmNvbmZsaWN0QmVoYXZpb3IiOiJyZXBsYWNlIn0/4w2Mfwmnv2tkZPr074rPavmwdtsx9ruSGB0ECE5zyeG_LtOd-w5myhLHXRhfFzP-_XxTnVfqqnbGL_ktwy-PRhUEs4RC7Oae1betlRWAMLXuPzRaVOzc-sHAmVNz2uOv9OSUhjuq3YiTYkD31ZgQ8RWrmQXIxotu4n_s0tYp4R09ahY7JCmcdjz3uImNBCdJAPvOJFReBROXhqbLc4cahQkouelUwcoGknyaRK-LB588YGquPPzjHbxTmAHnh6nWVYBr6QwIp3r6jTCIHEdwMmdsw3Tsgb9R46W1pUCOn8AGayEU65s3i7Gnp-P9BX8YAxy5mozwVSGeCrCKTJs4ewJNKuOPJupw_2nossDXfXOpdytAt2b6Yv7iKtSejX-ee0-D5FB5v-fhcJ_E7SmOCkYGGnhCg3ZRvy8piOxlrLnGrZ7fAN1iKPV6RPJhcGU4FVvlAm-4Z9_Hu18sx5Iln33d9g-9K_mFbY-D4cJAU_AhFvP9jmWledLX4DQ4DFhyZSsd0DE6FQNzTP4xNA5yZMzrbL67SbZ2l2ZTXnVPmSrHhn2egzLO1Yj3gjEghFVduAgwlfBy5tH_rtvll9o9BAH7v1sLIH3k5IJgqGNdf9X5Q (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0xb1804cf0>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/backup.py", line 191, in <module>
    client.item(drive='me', path="backup.zip").upload_asynThis may be a c('/root/backup.zip', upload_status=status)
  File "/usr/local/lib/python3.7/dist-packages/onedrivesdk/version_bridge/fragment_upload.py", line 173, in fragment_upload_async
    resp = upload_builder.post(i * __PART_SIZE, length)
  File "/usr/local/lib/python3.7/dist-packages/onedrivesdk/version_bridge/fragment_upload.py", line 121, in post
    return self.request(begin, length, options).post()
  File "/usr/local/lib/python3.7/dist-packages/onedrivesdk/version_bridge/fragment_upload.py", line 57, in post
    entity = UploadSession(json.loads(self.send(data=self._file_handle).content))
  File "/usr/local/lib/python3.7/dist-packages/onedrivesdk/request_base.py", line 151, in send
    data=data)
  File "/usr/local/lib/python3.7/dist-packages/onedrivesdk/http_provider.py", line 69, in send
    response = session.send(prepped)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.onedrive.com', port=443): Max retries exceeded with url: /rup/164bf6b70043f25b/eyJSZXNvdXJjZUlEIjoiMTY0QkY2QjcwMDQzRjI1QiExMDMiLCJSZWxhdGlvbnNoaXBOYW1lIjoiYmFja3VwLnppcCJ9/4moWVgN8rXVwlBWoSpz9lXuC-62Xa7SCL8_Hbo2AxZXqJ7haIfurNbL-isjAGs2Q9d9PDKVuikE87V6IuuPkr9b9dKUjiibox2yA0qmbFw5Cs/eyJuYW1lIjoiYmFja3VwLnppcCIsIkBuYW1lLmNvbmZsaWN0QmVoYXZpb3IiOiJyZXBsYWNlIn0/4w2Mfwmnv2tkZPr074rPavmwdtsx9ruSGB0ECE5zyeG_LtOd-w5myhLHXRhfFzP-_XxTnVfqqnbGL_ktwy-PRhUEs4RC7Oae1betlRWAMLXuPzRaVOzc-sHAmVNz2uOv9OSUhjuq3YiTYkD31ZgQ8RWrmQXIxotu4n_s0tYp4R09ahY7JCmcdjz3uImNBCdJAPvOJFReBROXhqbLc4cahQkouelUwcoGknyaRK-LB588YGquPPzjHbxTmAHnh6nWVYBr6QwIp3r6jTCIHEdwMmdsw3Tsgb9R46W1pUCOn8AGayEU65s3i7Gnp-P9BX8YAxy5mozwVSGeCrCKTJs4ewJNKuOPJupw_2nossDXfXOpdytAt2b6Yv7iKtSejX-ee0-D5FB5v-fhcJ_E7SmOCkYGGnhCg3ZRvy8piOxlrLnGrZ7fAN1iKPV6RPJhcGU4FVvlAm-4Z9_Hu18sx5Iln33d9g-9K_mFbY-D4cJAU_AhFvP9jmWledLX4DQ4DFhyZSsd0DE6FQNzTP4xNA5yZMzrbL67SbZ2l2ZTXnVPmSrHhn2egzLO1Yj3gjEghFVduAgwlfBy5tH_rtvll9o9BAH7v1sLIH3k5IJgqGNdf9X5Q (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0xb1804cf0>: Failed to establish a new connection: [Errno 111] Connection refused'))

Does anybody know the cause of this, or how to fix this?

@enhee2706
Copy link

Me too i have this problem.

@KTibow
Copy link
Author

KTibow commented Dec 4, 2020

@enhee2706 you might be able to try the other upload method in the meantime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants