DVC GET error self._sslobj.do_handshake() Connection reset by peer

97 views Asked by At

Someone could help me with this issue? I'm newbie on DVC and I dont know what I'm doing wrong. I have a git repository with a dvc project. But when I try to get a file following DVC oficial documentation, I get this error.

dvc get -v https://github.com/iterative/dataset-registry tutorials/versioning/data.zip

2023-11-01 23:01:27,739 DEBUG: v3.27.0 (pip), CPython 3.8.18 on Linux-4.18.0-348.12.2.el8_5.x86_64-x86_64-with-glibc2.34
2023-11-01 23:01:27,740 DEBUG: command: /usr/local/bin/dvc get -v https://github.com/iterative/dataset-registry tutorials/versioning/data.zip
2023-11-01 23:01:29,038 DEBUG: Creating external repo https://github.com/iterative/dataset-registry@None
2023-11-01 23:01:29,039 DEBUG: erepo: git clone 'https://github.com/iterative/dataset-registry' to a temporary dir
2023-11-01 23:02:10,328 ERROR: failed to get 'tutorials/versioning/data.zip' - SCM error: Failed to clone repo 'https://github.com/iterative/dataset-registry' to '/tmp/tmpj90xohbqdvc-clone': name 'urllib3' is not defined
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 404, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 1058, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 419, in connect
    self.sock = ssl_wrap_socket(
  File "/usr/local/lib/python3.8/site-packages/urllib3/util/ssl_.py", line 449, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(
  File "/usr/local/lib/python3.8/site-packages/urllib3/util/ssl_.py", line 493, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
  File "/usr/local/lib/python3.8/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "/usr/local/lib/python3.8/ssl.py", line 1073, in _create
    self.do_handshake()
  File "/usr/local/lib/python3.8/ssl.py", line 1342, in do_handshake
    self._sslobj.do_handshake()
ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/dulwich/client.py", line 2235, in _http_request
    resp = self.pool_manager.request(
  File "/usr/local/lib/python3.8/site-packages/urllib3/request.py", line 77, in request
    return self.request_encode_url(
  File "/usr/local/lib/python3.8/site-packages/urllib3/request.py", line 99, in request_encode_url
    return self.urlopen(method, url, **extra_kw)
  File "/usr/local/lib/python3.8/site-packages/urllib3/poolmanager.py", line 376, in urlopen
    response = conn.urlopen(method, u.request_uri, **kw)
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 827, in urlopen
    return self.urlopen(
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 827, in urlopen
    return self.urlopen(
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 827, in urlopen
    return self.urlopen(
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 799, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /iterative/dataset-registry/info/refs?service=git-upload-pack (Caused by ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/scmrepo/git/backend/dulwich/__init__.py", line 227, in clone
    repo = clone_from()
  File "/usr/local/lib/python3.8/site-packages/dulwich/porcelain.py", line 542, in clone
    return client.clone(
  File "/usr/local/lib/python3.8/site-packages/dulwich/client.py", line 738, in clone
    result = self.fetch(path, target, progress=progress, depth=depth)
  File "/usr/local/lib/python3.8/site-packages/dulwich/client.py", line 816, in fetch
    result = self.fetch_pack(
  File "/usr/local/lib/python3.8/site-packages/dulwich/client.py", line 2110, in fetch_pack
    refs, server_capabilities, url = self._discover_references(
  File "/usr/local/lib/python3.8/site-packages/dulwich/client.py", line 1967, in _discover_references
    resp, read = self._http_request(url, headers)
  File "/usr/local/lib/python3.8/site-packages/scmrepo/git/backend/dulwich/client.py", line 49, in _http_request
    result = super()._http_request(
  File "/usr/local/lib/python3.8/site-packages/dulwich/client.py", line 2241, in _http_request
    except urllib3.exceptions.HTTPError as e:
NameError: name 'urllib3' is not defined

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/dvc/scm.py", line 160, in clone
    git = Git.clone(url, to_path, progress=pbar.update_git, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/scmrepo/git/__init__.py", line 148, in clone
    backend.clone(url, to_path, bare=bare, mirror=mirror, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/scmrepo/git/backend/dulwich/__init__.py", line 235, in clone
    raise CloneError(url, to_path) from exc
scmrepo.exceptions.CloneError: Failed to clone repo 'https://github.com/iterative/dataset-registry' to '/tmp/tmpj90xohbqdvc-clone'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/dvc/commands/get.py", line 33, in _get_file_from_repo
    Repo.get(
  File "/usr/local/lib/python3.8/site-packages/dvc/repo/get.py", line 45, in get
    with Repo.open(
  File "/usr/local/lib/python3.8/site-packages/dvc/repo/__init__.py", line 305, in open
    return open_repo(url, *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/dvc/repo/open_repo.py", line 64, in open_repo
    return _external_repo(url, *args, **kwargs)
  File "/usr/local/lib/python3.8/contextlib.py", line 75, in inner
    return func(*args, **kwds)
  File "/usr/local/lib/python3.8/site-packages/dvc/repo/open_repo.py", line 27, in _external_repo
    path = _cached_clone(url, rev)
  File "/usr/local/lib/python3.8/site-packages/dvc/repo/open_repo.py", line 138, in _cached_clone
    clone_path, shallow = _clone_default_branch(url, rev)
  File "/usr/local/lib/python3.8/site-packages/funcy/decorators.py", line 47, in wrapper
    return deco(call, *dargs, **dkwargs)
  File "/usr/local/lib/python3.8/site-packages/funcy/flow.py", line 246, in wrap_with
    return call()
  File "/usr/local/lib/python3.8/site-packages/funcy/decorators.py", line 68, in __call__
    return self._func(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.8/site-packages/dvc/repo/open_repo.py", line 202, in _clone_default_branch
    git = clone(url, clone_path)
  File "/usr/local/lib/python3.8/site-packages/dvc/scm.py", line 165, in clone
    raise CloneError("SCM error") from exc
dvc.scm.CloneError: SCM error

I dont know how to solve this. I've tried some configuration related to ssl, but without succeess.

0

There are 0 answers